android_kernel_xiaomi_sm8350/fs/xfs/linux-2.6
Dave Chinner fd45e47841 xfs: Ensure we force all busy extents in range to disk
When we search for and find a busy extent during allocation we
force the log out to ensure the extent free transaction is on
disk before the allocation transaction. The current implementation
has a subtle bug in it--it does not handle multiple overlapping
ranges.

That is, if we free lots of little extents into a single
contiguous extent, then allocate the contiguous extent, the busy
search code stops searching at the first extent it finds that
overlaps the allocated range. It then uses the commit LSN of the
transaction to force the log out to.

Unfortunately, the other busy ranges might have more recent
commit LSNs than the first busy extent that is found, and this
results in xfs_alloc_search_busy() returning before all the
extent free transactions are on disk for the range being
allocated. This can lead to potential metadata corruption or
stale data exposure after a crash because log replay won't replay
all the extent free transactions that cover the allocation range.

Modified-by: Alex Elder <aelder@sgi.com>

(Dropped the "found" argument from the xfs_alloc_busysearch trace
event.)

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
2010-01-10 12:22:02 -06:00
..
kmem.c Fix congestion_wait() sync/async vs read/write confusion 2009-07-10 20:31:53 +02:00
kmem.h
mrlock.h
sv.h
time.h
xfs_acl.c xfs: fix timestamp handling in xfs_setattr 2010-01-10 12:21:58 -06: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: Free buffer pages array unconditionally 2009-12-16 13:41:20 -06:00
xfs_buf.h xfs: improve metadata I/O merging in the elevator 2009-12-16 13:41:19 -06: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: event tracing support 2009-12-14 23:08:16 -06:00
xfs_fs_subr.h
xfs_globals.c
xfs_globals.h
xfs_ioctl32.c xfs: event tracing support 2009-12-14 23:08:16 -06:00
xfs_ioctl32.h
xfs_ioctl.c xfs: event tracing support 2009-12-14 23:08:16 -06:00
xfs_ioctl.h
xfs_iops.c kill I_LOCK 2009-12-17 11:03:25 -05:00
xfs_iops.h
xfs_linux.h xfs: event tracing support 2009-12-14 23:08:16 -06:00
xfs_lrw.c xfs: event tracing support 2009-12-14 23:08:16 -06:00
xfs_lrw.h xfs: event tracing support 2009-12-14 23:08:16 -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: event tracing support 2009-12-14 23:08:16 -06:00
xfs_super.h xfs: event tracing support 2009-12-14 23:08:16 -06:00
xfs_sync.c xfs: event tracing support 2009-12-14 23:08:16 -06:00
xfs_sync.h xfs: simplify inode teardown 2009-12-11 15:11:19 -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: Ensure we force all busy extents in range to disk 2010-01-10 12:22:02 -06:00
xfs_version.h
xfs_vnode.h xfs: event tracing support 2009-12-14 23:08:16 -06:00
xfs_xattr.c sanitize xattr handler prototypes 2009-12-16 12:16:49 -05:00