@Joseph, the semantics of O_DIRECT are different that O_SYNC. 
In case of NFS, O_DIRECT *bypasses the page cache on the client* entirely. The 
NFS protocol does not support passing this flag to the server. By passing the 
client side cache could have other side effects like not being able to optimize 
the rpc requests. O_DIRECT on its own does not give the guarantee of writing 
your data to the backing store like O_SYNC.

O_SYNC on the other hand says that whatever data is requested for a
write is synced to the backing store before the write operation returns.
Its a synchronous write rather than an asynchronous one.

A user may want to use O_SYNC but not O_DIRECT. Coupling the two
together would give you the O_SYNC effect of putting data on the disk,
but would have an unwanted effect on the client side cache and could
most probably degrade performance.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/709392

Title:
  NFS client does not submit "nfs_file_sync" write requests when the
  file open call includes O_SYNC.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to