summaryrefslogtreecommitdiff
path: root/fs/xfs/linux-2.6/xfs_buf.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2010-02-09 00:43:49 (GMT)
committerDave Chinner <david@fromorbit.com>2010-02-09 00:43:49 (GMT)
commit07fec73625dc0db6f9aed68019918208a2ca53f5 (patch)
tree04f4ad3f829c3d64d6b2a3c0bddf11a4374eb93d /fs/xfs/linux-2.6/xfs_buf.h
parente8b217e7530c6a073ac69f1c85b922d93fdf5647 (diff)
downloadlinux-07fec73625dc0db6f9aed68019918208a2ca53f5.tar.xz
xfs: log changed inodes instead of writing them synchronously
When an inode has already be flushed delayed write, xfs_inode_clean() returns true and hence xfs_fs_write_inode() can return on a synchronous inode write without having written the inode. Currently these sycnhronous writes only come sync(1), unmount, a sycnhronous NFS export and cachefiles so should be relatively rare and out of common performance paths. Realistically, a synchronous inode write is not necessary here; we can avoid writing the inode by logging any non-transactional changes that are pending. This needs to be done with synchronous transactions, but it avoids seeking between the log and inode clusters as we do now. We don't force the log if the inode is pinned, though, so this differs from the fsync case. For normal sys_sync and unmount behaviour this is fine because we do a synchronous log force in xfs_sync_data which is called from the ->sync_fs code. It does however break the NFS synchronous export guarantees for now, but work is under way to fix this at a higher level or for the higher level to provide an additional flag in the writeback control to tell us that a log force is needed. Portions of this patch are based on work from Dave Chinner. Signed-off-by: Christoph Hellwig <hch@infradead.org> Reviewed-by: Dave Chinner <david@fromorbit.com> Reviewed-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_buf.h')
0 files changed, 0 insertions, 0 deletions