tmp_suning_uos_patched/drivers/md
Mikulas Patocka a8d41b59f3 dm snapshot: fix race during exception creation
Fix a race condition that returns incorrect data when a write causes an
exception to be allocated whilst a read is still in flight.

The race condition happens as follows:
* A read to non-reallocated sector in the snapshot is submitted so that the
  read is routed to the original device.
* A write to the original device is submitted. The write causes an exception
  that reallocates the block.  The write proceeds.
* The original read is dequeued and reads the wrong data.

This race can be triggered with CFQ scheduler and one thread writing and
multiple threads reading simultaneously.

(This patch relies upon the earlier dm-kcopyd-per-device.patch to avoid a
deadlock.)

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-07-21 12:00:34 +01:00
..
raid6test
.gitignore
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: use cond_resched 2008-07-02 09:34:28 +01:00
dm-delay.c
dm-exception-store.c dm: move include files 2008-04-25 13:26:55 +01:00
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 log: make dm_dirty_log init and exit static 2008-07-21 12:00:27 +01:00
dm-mpath.c dm mpath: fix test for reinstate_path 2008-07-21 12:00:31 +01:00
dm-mpath.h [SCSI] scsi_dh: Remove hardware handler infrastructure from dm 2008-06-05 09:23:42 -05:00
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 snapshot: fix race during exception creation 2008-07-21 12:00:34 +01:00
dm-snap.h dm snapshot: track snapshot reads 2008-07-21 12:00:32 +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 io: remove struct padding 2008-07-21 12:00:28 +01:00
dm.h dm log: make dm_dirty_log init and exit static 2008-07-21 12:00:27 +01:00
faulty.c
Kconfig [SCSI] scsi_dh: fix kconfig related build errors 2008-07-15 09:16:43 -05:00
linear.c Add bvec_merge_data to handle stacked devices and ->merge_bvec() 2008-07-03 13:21:15 +02:00
Makefile [SCSI] scsi_dh: Remove hardware handler infrastructure from dm 2008-06-05 09:23:42 -05:00
md.c Fix error paths if md_probe fails. 2008-06-28 08:31:17 +10:00
mktables.c
multipath.c md: restart recovery cleanly after device failure. 2008-05-24 09:56:10 -07:00
raid0.c Add bvec_merge_data to handle stacked devices and ->merge_bvec() 2008-07-03 13:21:15 +02:00
raid1.c md: restart recovery cleanly after device failure. 2008-05-24 09:56:10 -07:00
raid5.c Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block 2008-07-14 13:15:14 -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 Add bvec_merge_data to handle stacked devices and ->merge_bvec() 2008-07-03 13:21:15 +02:00
unroll.pl