What I tried to say before with my test is just that for the test case,
the O_DIRECT flag results in the fallback behavior which seems to be
described in section 5.9 of http://www.faqs.org/docs/Linux-HOWTO/NFS-
HOWTO.html#MOUNTOPTIONS (which is that the use of O_SYNC, when the
export is sync should result in all requests being done with the
NFS_FILE_SYNC flag set in the request and reply). This removes the need
of the COMMIT call as the reply to a WRITE with NFS_FILE_SYNC only
returns when the data is written to disk on the server.

What we see on both Lucid and Natty is that, regardless of the O_SYNC
file flag used on open, it keeps using the newer style WRITE with
UNSTABLE set plus COMMIT. I extended the testcase to write 100 blocks
and checked the tcpdump for that. Both clients produce a commit for
every write request sent even without fsync calls. So from a data
integrity point of view there is no difference between the old mode and
the new mode.

So in the end this is a matter of documentation and to a degree
performance. Should a client be able to influence the method used for
the transfer? Also the way chosen for now requires more network traffic.
Doing a write and commit for all the writes just seems a waste of
network bandwidth (as the same could be done with just a write with the
file sync flag set).

-- 
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