]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: Fix an unstable write data integrity race
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 22 Apr 2010 19:35:57 +0000 (15:35 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 22 Apr 2010 19:35:57 +0000 (15:35 -0400)
commitbb49ad8e6b654b0d406d019d67eafbe4e9676728
treefc22ab92565fb61a37a77f829a82fa9b8ea6497f
parenta0ebffce5a19e583ddb0c669d49bfe494b0eb43a
NFS: Fix an unstable write data integrity race

Commit e9e076233c08fe89d1523addb33a96ffa16b4139 (NFS: Ensure that the WRITE
and COMMIT RPC calls are always uninterruptible) exposed a race on file
close. In order to ensure correct close-to-open behaviour, we want to wait
for all outstanding background commit operations to complete.

This patch adds an inode flag that indicates if a commit operation is under
way, and provides a mechanism to allow ->write_inode() to wait for its
completion if this is a data integrity flush.

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