]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
xfs: fix xfs_mark_inode_dirty during umount
authorChristoph Hellwig <hch@infradead.org>
Sat, 27 Aug 2011 05:57:44 +0000 (05:57 +0000)
committerAlex Elder <aelder@sgi.com>
Wed, 31 Aug 2011 22:44:37 +0000 (17:44 -0500)
commitda6742a5a4cc844a9982fdd936ddb537c0747856
treeb4c8917b28e67738c7c4ee58e5fe386104d70f46
parent57b5a91db28542a8d8a697b9e3da2bd0e062f7d3
xfs: fix xfs_mark_inode_dirty during umount

During umount we do not add a dirty inode to the lru and wait for it to
become clean first, but force writeback of data and metadata with
I_WILL_FREE set.  Currently there is no way for XFS to detect that the
inode has been redirtied for metadata operations, as we skip the
mark_inode_dirty call during teardown.  Fix this by setting i_update_core
nanually in that case, so that the inode gets flushed during inode reclaim.

Alternatively we could enable calling mark_inode_dirty for inodes in
I_WILL_FREE state, and let the VFS dirty tracking handle this.  I decided
against this as we will get better I/O patterns from reclaim compared to
the synchronous writeout in write_inode_now, and always marking the inode
dirty in some way from xfs_mark_inode_dirty is a better safetly net in
either case.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
fs/xfs/xfs_iops.c