xfs: log the inode in ->write_inode calls for kupdate
commitb32a7304bea14c51fe279281db1ff02eefad2e3a
authorChristoph Hellwig <hch@infradead.org>
Wed, 4 Jan 2012 14:48:35 +0000 (4 09:48 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 6 Jan 2012 22:14:12 +0000 (6 14:14 -0800)
tree2e615cb52dd906367eafd873f82c6e1b0df3d85e
parent3b26fd897af35e9d48cfbadef1e7f24287d6f1ba
xfs: log the inode in ->write_inode calls for kupdate

Commit 0b8fd3033c308e4088760aa1d38ce77197b4e074 upstream.

If the writeback code writes back an inode because it has expired we currently
use the non-blockin ->write_inode path.  This means any inode that is pinned
is skipped.  With delayed logging and a workload that has very little log
traffic otherwise it is very likely that an inode that gets constantly
written to is always pinned, and thus we keep refusing to write it.  The VM
writeback code at that point redirties it and doesn't try to write it again
for another 30 seconds.  This means under certain scenarious time based
metadata writeback never happens.

Fix this by calling into xfs_log_inode for kupdate in addition to data
integrity syncs, and thus transfer the inode to the log ASAP.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Tested-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/xfs/linux-2.6/xfs_super.c