android_kernel_xiaomi_sm8350/fs/xfs/linux-2.6
Christoph Hellwig 07fec73625 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>
2010-02-09 11:43:49 +11:00
..
kmem.c xfs: replace KM_LARGE with explicit vmalloc use 2010-01-21 13:44:56 -06:00
kmem.h xfs: replace KM_LARGE with explicit vmalloc use 2010-01-21 13:44:56 -06:00
mrlock.h
sv.h
time.h
xfs_acl.c xfs: convert attr to use unsigned names 2010-01-20 10:47:48 +11:00
xfs_aops.c cleanup blockdev_direct_IO locking 2009-12-16 12:16:49 -05:00
xfs_aops.h xfs: event tracing support 2009-12-14 23:08:16 -06:00
xfs_buf.c xfs: Don't issue buffer IO direct from AIL push V2 2010-02-02 10:13:42 +11:00
xfs_buf.h xfs: Don't issue buffer IO direct from AIL push V2 2010-02-02 10:13:42 +11:00
xfs_cred.h
xfs_dmapi_priv.h
xfs_export.c
xfs_export.h
xfs_file.c xfs: remove IO_ISAIO 2009-12-11 15:11:21 -06:00
xfs_fs_subr.c xfs: remove duplicate buffer flags 2010-01-21 13:44:36 -06:00
xfs_fs_subr.h
xfs_globals.c
xfs_globals.h
xfs_ioctl32.c xfs: convert attr to use unsigned names 2010-01-20 10:47:48 +11:00
xfs_ioctl32.h
xfs_ioctl.c xfs: more reserved blocks fixups 2010-02-08 17:41:48 -06:00
xfs_ioctl.h xfs: convert attr to use unsigned names 2010-01-20 10:47:48 +11:00
xfs_iops.c xfs: convert attr to use unsigned names 2010-01-20 10:47:48 +11:00
xfs_iops.h
xfs_linux.h xfs: event tracing support 2009-12-14 23:08:16 -06:00
xfs_lrw.c xfs: move more buffer helpers into xfs_buf.c 2010-01-15 15:35:17 -06:00
xfs_lrw.h xfs: move more buffer helpers into xfs_buf.c 2010-01-15 15:35:17 -06:00
xfs_quotaops.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/fs/xfs/xfs 2009-10-31 12:12:49 -07:00
xfs_stats.c xfs: switch to seq_file 2009-09-15 12:29:24 -05:00
xfs_stats.h
xfs_super.c xfs: log changed inodes instead of writing them synchronously 2010-02-09 11:43:49 +11:00
xfs_super.h xfs: event tracing support 2009-12-14 23:08:16 -06:00
xfs_sync.c xfs: Use delayed write for inodes rather than async V2 2010-02-06 12:39:36 +11:00
xfs_sync.h xfs: make several more functions static 2010-01-15 15:31:38 -06:00
xfs_sysctl.c sysctl: Drop & in front of every proc_handler. 2009-11-18 08:37:40 -08:00
xfs_sysctl.h
xfs_trace.c xfs: event tracing support 2009-12-14 23:08:16 -06:00
xfs_trace.h xfs: Don't issue buffer IO direct from AIL push V2 2010-02-02 10:13:42 +11:00
xfs_version.h
xfs_vnode.h xfs: event tracing support 2009-12-14 23:08:16 -06:00
xfs_xattr.c xfs: convert attr to use unsigned names 2010-01-20 10:47:48 +11:00