diff options
author | Dave Chinner <david@fromorbit.com> | 2010-01-02 02:38:56 +0000 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2010-01-10 12:22:02 -0600 |
commit | fd45e4784164d1017521086524e3442318c67370 (patch) | |
tree | aaaf8f524d4bf094f6debadc6e580f81038f4915 /fs/xfs/xfs_ialloc.c | |
parent | 44e08c45cc14e6190a424be8d450070c8e508fad (diff) |
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>
Diffstat (limited to 'fs/xfs/xfs_ialloc.c')
0 files changed, 0 insertions, 0 deletions