linux/drivers/md
Dan Williams e0a115e5aa md: fix prexor vs sync_request race
During the initial array synchronization process there is a window between
when a prexor operation is scheduled to a specific stripe and when it
completes for a sync_request to be scheduled to the same stripe.  When
this happens the prexor completes and the stripe is unconditionally marked
"insync", effectively canceling the sync_request for the stripe.  Prior to
2.6.23 this was not a problem because the prexor operation was done under
sh->lock.  The effect in older kernels being that the prexor would still
erroneously mark the stripe "insync", but sync_request would be held off
and re-mark the stripe as "!in_sync".

Change the write completion logic to not mark the stripe "in_sync" if a
prexor was performed.  The effect of the change is to sometimes not set
STRIPE_INSYNC.  The worst this can do is cause the resync to stall waiting
for STRIPE_INSYNC to be set.  If this were happening, then STRIPE_SYNCING
would be set and handle_issuing_new_read_requests would cause all
available blocks to eventually be read, at which point prexor would never
be used on that stripe any more and STRIPE_INSYNC would eventually be set.

echo repair > /sys/block/mdN/md/sync_action will correct arrays that may
have lost this race.

Cc: <stable@kernel.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-06 11:29:08 -07:00
..
raid6test
.gitignore
Kconfig
Makefile dm: move include files 2008-04-25 13:26:55 +01:00
bitmap.c md: kill file_path wrapper 2008-05-24 09:56:09 -07:00
dm-bio-list.h
dm-bio-record.h
dm-crypt.c dm crypt: fix ctx pending 2008-03-28 14:45:22 -07:00
dm-delay.c
dm-emc.c block: no need to initialize rq->cmd with blk_get_request 2008-04-29 14:48:55 +02:00
dm-exception-store.c dm: move include files 2008-04-25 13:26:55 +01:00
dm-hw-handler.c
dm-hw-handler.h
dm-io.c dm: unplug queues in threads 2008-04-25 13:26:57 +01:00
dm-ioctl.c
dm-kcopyd.c dm: unplug queues in threads 2008-04-25 13:26:57 +01:00
dm-linear.c
dm-log.c dm: move include files 2008-04-25 13:26:55 +01:00
dm-mpath-hp-sw.c block: no need to initialize rq->cmd with blk_get_request 2008-04-29 14:48:55 +02:00
dm-mpath-rdac.c block: no need to initialize rq->cmd with blk_get_request 2008-04-29 14:48:55 +02:00
dm-mpath.c
dm-mpath.h
dm-path-selector.c
dm-path-selector.h
dm-raid1.c dm: unplug queues in threads 2008-04-25 13:26:57 +01:00
dm-round-robin.c
dm-snap.c dm: move include files 2008-04-25 13:26:55 +01:00
dm-snap.h dm kcopyd: clean interface 2008-04-25 13:26:44 +01:00
dm-stripe.c
dm-table.c dm: use unlocked variants of queue flag check/set 2008-04-29 10:21:12 -07:00
dm-target.c
dm-uevent.c md: replace remaining __FUNCTION__ occurrences 2008-04-28 08:58:42 -07:00
dm-uevent.h
dm-zero.c
dm.c dm: remove md argument from specific_minor 2008-04-25 13:27:02 +01:00
dm.h dm: expose macros 2008-04-25 13:26:53 +01:00
faulty.c
linear.c Remove blkdev warning triggered by using md 2008-05-14 19:11:15 -07:00
md.c md: restart recovery cleanly after device failure. 2008-05-24 09:56:10 -07:00
mktables.c
multipath.c md: restart recovery cleanly after device failure. 2008-05-24 09:56:10 -07:00
raid0.c Remove blkdev warning triggered by using md 2008-05-14 19:11:15 -07:00
raid1.c md: restart recovery cleanly after device failure. 2008-05-24 09:56:10 -07:00
raid5.c md: fix prexor vs sync_request race 2008-06-06 11:29:08 -07:00
raid6.h
raid6algos.c drivers/md: use time_before, time_before_eq, etc 2008-04-28 08:58:42 -07:00
raid6altivec.uc
raid6int.uc
raid6mmx.c
raid6recov.c
raid6sse1.c
raid6sse2.c
raid6x86.h
raid10.c md: restart recovery cleanly after device failure. 2008-05-24 09:56:10 -07:00
unroll.pl