]> git.karo-electronics.de Git - karo-tx-linux.git/commit
NFS: Fix fdatasync/fsync() when confronted with a server reboot
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 11 Sep 2012 20:01:22 +0000 (16:01 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 19 Sep 2012 22:16:18 +0000 (18:16 -0400)
commit713252cfab6fdf51e5b9ec32c86327de678f8ea1
treee24ba1341b016d8378397fef79bfc7eb55347115
parentb81b55e8d96b3b9fa6d124b25496ebaaf2982c04
NFS: Fix fdatasync/fsync() when confronted with a server reboot

If the server reboots before it can commit the unstable writes to disk,
then nfs_commit_release_pages() will detect this when it compares the
verifier returned by COMMIT to the one returned by WRITE. When this
happens, the client needs to resend those writes in order to guarantee
that they make it to stable storage.

This patch adds a signalling mechanism to notify fsync() that it
needs to retry all writes before it can exit.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/file.c
fs/nfs/nfs4file.c
fs/nfs/write.c
include/linux/nfs_fs.h