• Tristan Ye's avatar
    ocfs2: Add a mount option "coherency=*" to handle cluster coherency for O_DIRECT writes. · 7bdb0d18
    Tristan Ye authored
    Currently, the default behavior of O_DIRECT writes was allowing
    concurrent writing among nodes to the same file, with no cluster
    coherency guaranteed (no EX lock held).  This can leave stale data in
    the cache for buffered reads on other nodes.
    
    The new mount option introduce a chance to choose two different
    behaviors for O_DIRECT writes:
    
        * coherency=full, as the default value, will disallow
                          concurrent O_DIRECT writes by taking
                          EX locks.
    
        * coherency=buffered, allow concurrent O_DIRECT writes
                              without EX lock among nodes, which
                              gains high performance at risk of
                              getting stale data on other nodes.
    Signed-off-by: default avatarTristan Ye <tristan.ye@oracle.com>
    Signed-off-by: default avatarJoel Becker <joel.becker@oracle.com>
    7bdb0d18
ocfs2.txt 4.04 KB