Revision fd45e4784164d1017521086524e3442318c67370 authored by Dave Chinner on 02 January 2010, 02:38:56 UTC, committed by Alex Elder on 10 January 2010, 18:22:02 UTC
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>
1 parent 44e08c4
History
File Mode Size
fc
Kbuild -rw-r--r-- 118 bytes
fc_encode.h -rw-r--r-- 10.2 KB
fc_frame.h -rw-r--r-- 6.0 KB
iscsi_if.h -rw-r--r-- 12.8 KB
iscsi_proto.h -rw-r--r-- 15.0 KB
libfc.h -rw-r--r-- 31.1 KB
libfcoe.h -rw-r--r-- 5.9 KB
libiscsi.h -rw-r--r-- 12.8 KB
libiscsi_tcp.h -rw-r--r-- 4.2 KB
libsas.h -rw-r--r-- 17.5 KB
libsrp.h -rw-r--r-- 1.5 KB
osd_attributes.h -rw-r--r-- 15.0 KB
osd_initiator.h -rw-r--r-- 15.6 KB
osd_protocol.h -rw-r--r-- 16.7 KB
osd_sec.h -rw-r--r-- 1.5 KB
osd_sense.h -rw-r--r-- 9.9 KB
osd_types.h -rw-r--r-- 972 bytes
sas.h -rw-r--r-- 11.7 KB
sas_ata.h -rw-r--r-- 1.6 KB
scsi.h -rw-r--r-- 15.9 KB
scsi_bsg_fc.h -rw-r--r-- 8.5 KB
scsi_cmnd.h -rw-r--r-- 8.2 KB
scsi_dbg.h -rw-r--r-- 968 bytes
scsi_device.h -rw-r--r-- 16.5 KB
scsi_devinfo.h -rw-r--r-- 1.9 KB
scsi_dh.h -rw-r--r-- 2.6 KB
scsi_driver.h -rw-r--r-- 1.0 KB
scsi_eh.h -rw-r--r-- 2.7 KB
scsi_host.h -rw-r--r-- 26.7 KB
scsi_ioctl.h -rw-r--r-- 1.2 KB
scsi_netlink.h -rw-r--r-- 4.2 KB
scsi_netlink_fc.h -rw-r--r-- 1.9 KB
scsi_scan.h -rw-r--r-- 256 bytes
scsi_tcq.h -rw-r--r-- 4.3 KB
scsi_tgt.h -rw-r--r-- 807 bytes
scsi_tgt_if.h -rw-r--r-- 2.5 KB
scsi_transport.h -rw-r--r-- 3.9 KB
scsi_transport_fc.h -rw-r--r-- 25.1 KB
scsi_transport_iscsi.h -rw-r--r-- 9.5 KB
scsi_transport_sas.h -rw-r--r-- 6.1 KB
scsi_transport_spi.h -rw-r--r-- 7.1 KB
scsi_transport_srp.h -rw-r--r-- 902 bytes
scsicam.h -rw-r--r-- 674 bytes
sg.h -rw-r--r-- 14.0 KB
srp.h -rw-r--r-- 5.5 KB

back to top