android_kernel_xiaomi_sm8350/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
dm-bio-list.h
dm-bio-record.h
dm-crypt.c
dm-delay.c
dm-exception-store.c
dm-io.c
dm-ioctl.c
dm-kcopyd.c
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
dm-path-selector.c
dm-path-selector.h
dm-raid1.c
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-target.c
dm-uevent.c
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
Makefile
md.c
mktables.c
multipath.c
raid0.c
raid1.c
raid5.c
raid6.h
raid6algos.c
raid6altivec.uc
raid6int.uc
raid6mmx.c
raid6recov.c
raid6sse1.c
raid6sse2.c
raid6x86.h
raid10.c
unroll.pl