]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xfs: fix xfs_mark_inode_dirty during umount
authorChristoph Hellwig <hch@infradead.org>
Sat, 19 Nov 2011 18:13:38 +0000 (13:13 -0500)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Thu, 8 Dec 2011 19:19:20 +0000 (11:19 -0800)
commit0b55a8f65b085185704a60b3ebd9bc86482efdf4
treea299433325b3f0712e0b60475a33e65c6fc2efb4
parenteac682f86ebf9f34d18591ba2fcc9094509567f4
xfs: fix xfs_mark_inode_dirty during umount

commit 866e4ed77448a0c311e1b055eb72ea05423fd799 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/xfs/linux-2.6/xfs_iops.c