NFS client does not fall back to v2 synchronous mode when using O SYNC
From Linux NFS
(Difference between revisions)
(Created page with "== About == * Kernel version: 2.6.32 to 2.6.38-rc3 * [https://bugzilla.kernel.org/show_bug.cgi?id=28502 Bug 28502] * Reported by: Stefan Bader (February 7, 2011) * Closed by: Tro...") |
|||
Line 6: | Line 6: | ||
== How to reproduce == | == How to reproduce == | ||
- | * | + | * /etc/exports configured with: |
<pre>/nfs_export (rw,no_root_squash,sync,no_wdelay,no_subtree_check)</pre> | <pre>/nfs_export (rw,no_root_squash,sync,no_wdelay,no_subtree_check)</pre> | ||
* Mount NFS mount from Client: | * Mount NFS mount from Client: |
Latest revision as of 18:08, 29 July 2011
About
- Kernel version: 2.6.32 to 2.6.38-rc3
- Bug 28502
- Reported by: Stefan Bader (February 7, 2011)
- Closed by: Trond Myklebust (April 15, 2011)
How to reproduce
- /etc/exports configured with:
/nfs_export (rw,no_root_squash,sync,no_wdelay,no_subtree_check)
- Mount NFS mount from Client:
sudo mount server:/nfs_export /nfs_mount
- Start collecting tcpdump data on client and server.
- Perform a simple dd to cause and NFS write (Using oflag=sync):
strace -o /tmp/strace.dd.joe.out dd if=/dev/zero of=/nfs_mount/syncfile bs=1k count=1 oflag=sync
- Review tcpdump data and notice the client does not issue the "nfs_file_sync" +-write requests.
- Client should be in FILE_SYNC mode, but the client would only use FILE_SYNC for retries or writeback writes for reclaim
Resolution
- This problem was fixed by commit b31268ac793fd300da66b9c28bbf0a200339ab96
commit b31268ac793fd300da66b9c28bbf0a200339ab96 Author: Trond Myklebust <Trond.Myklebust@netapp.com> Date: Mon Mar 21 17:02:00 2011 -0400 FS: Use stable writes when not doing a bulk flush If we're only doing a single write, and there are no other unstable writes being queued up, we might want to just flip to using a stable write RPC call. Reviewed-by: NeilBrown <neilb@suse.de> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>