Skip to content
Commit 7bdb0d18 authored by Tristan Ye's avatar Tristan Ye Committed by Joel Becker
Browse files

ocfs2: Add a mount option "coherency=*" to handle cluster coherency for O_DIRECT writes.



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>
parent 75d9bbc7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment