]> git.baikalelectronics.ru Git - kernel.git/commit
make sure data is on disk before calling ->write_inode
authorChristoph Hellwig <hch@lst.de>
Fri, 5 Mar 2010 08:21:21 +0000 (09:21 +0100)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 5 Mar 2010 18:25:10 +0000 (13:25 -0500)
commitb7a53dc640370ecc79bcc818f2477e9ef8a8293e
tree40cd0fed705ec59dd3c909b96452bae1fc532796
parent5ba93cd9307d7aa9a4259f2a6fe557320b47a44d
make sure data is on disk before calling ->write_inode

Similar to the fsync issue fixed a while ago in commit
e6bf7e20f2b55385b9d731d99f0e65e91917fafb we need to write for data to
actually hit the disk before writing out the metadata to guarantee
data integrity for filesystems that modify the inode in the data I/O
completion path.  Currently XFS and NFS handle this manually, and AFS
has a write_inode method that does nothing but waiting for data, while
others are possibly missing out on this.

Fortunately this change has a lot less impact than the fsync change
as none of the write_inode methods starts data writeout of any form
by itself.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/afs/internal.h
fs/afs/super.c
fs/afs/write.c
fs/fs-writeback.c
fs/nfs/inode.c
fs/xfs/linux-2.6/xfs_super.c