dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/drivers/md
Alasdair G Kergon b4b610f684 [PATCH] device-mapper snapshot: replace sibling list
The siblings "list" is used unsafely at the moment.

Firstly, only the element on the list being changed gets locked (via the
snapshot lock), not the next and previous elements which have pointers that
are also being changed.

Secondly, if you have two or more snapshots and write to the same chunk a
second time before every snapshot has finished making its private copy of the
data, if you're unlucky, _origin_write() could attempt its list_merge() and
dereference a 'last' pointer to a pending_exception structure that has just
been freed.

Analysis reveals that the list is actually only there for reference counting.
If 5 pending_exceptions are needed in origin_write, then the 5 are joined
together into a 5-element list - without a separate list head because there's
nowhere suitable to store it.  As the pending_exceptions complete, they are
removed from the list one-by-one and any contents of origin_bios get moved
across to one of the remaining pending_exceptions on the list.  Whichever one
is last is detected because list_empty() is then true and the origin_bios get
submitted.

The fix proposed here uses an alternative reference counting mechanism by
choosing one of the pending_exceptions as primary and maintaining an atomic
counter there.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-27 08:44:58 -08:00
..
raid6test [PATCH] RAID6 Altivec fix 2005-09-17 11:49:58 -07:00
.gitignore gitignore: misc files 2006-01-01 22:21:50 +01:00
Kconfig Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile [PATCH] md: optimised resync using Bitmap based intent logging 2005-06-21 19:07:43 -07:00
bitmap.c [PATCH] mempool: use common mempool kmalloc allocator 2006-03-26 08:56:59 -08:00
dm-bio-list.h [PATCH] device-mapper snapshot: bio_list fix 2005-11-22 09:14:31 -08:00
dm-bio-record.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dm-crypt.c [PATCH] mempool: use mempool_create_slab_pool() 2006-03-26 08:57:00 -08:00
dm-emc.c [PATCH] device-mapper dm-emc: Fix a memset 2005-05-05 16:36:46 -07:00
dm-exception-store.c [PATCH] vfree and kfree cleanup in drivers/ 2005-09-10 10:06:30 -07:00
dm-hw-handler.c BUG_ON() Conversion in md/dm-hw-handler.c 2006-03-24 18:36:27 +01:00
dm-hw-handler.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dm-io.c [PATCH] mempool: use common mempool kmalloc allocator 2006-03-26 08:56:59 -08:00
dm-io.h [PATCH] device-mapper: remove unused definition 2006-01-06 08:34:00 -08:00
dm-ioctl.c [PATCH] device-mapper ioctl: reduce PF_MEMALLOC usage 2006-02-01 08:53:10 -08:00
dm-linear.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dm-log.c [PATCH] device-mapper log bitset: fix big endian find_next_zero_bit 2006-02-02 15:07:13 -08:00
dm-log.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dm-mpath.c [PATCH] mempool: use mempool_create_slab_pool() 2006-03-26 08:57:00 -08:00
dm-mpath.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dm-path-selector.c BUG_ON() Conversion in md/dm-path-selector.c 2006-03-26 18:21:58 +02:00
dm-path-selector.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dm-raid1.c [PATCH] mempool: use common mempool kmalloc allocator 2006-03-26 08:56:59 -08:00
dm-round-robin.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dm-snap.c [PATCH] device-mapper snapshot: replace sibling list 2006-03-27 08:44:58 -08:00
dm-snap.h [PATCH] device-mapper snapshot: load metadata on creation 2006-02-01 08:53:10 -08:00
dm-stripe.c [PATCH] dm stripe: Fix bounds 2006-03-17 07:51:25 -08:00
dm-table.c BUG_ON() Conversion in md/dm-table.c 2006-03-26 18:22:50 +02:00
dm-target.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dm-zero.c [PATCH] device-mapper: Some missing statics 2005-05-05 16:36:46 -07:00
dm.c [PATCH] mempool: use mempool_create_slab_pool() 2006-03-26 08:57:00 -08:00
dm.h [PATCH] device-mapper: make lock_fs optional 2006-01-06 08:34:01 -08:00
faulty.c [PATCH] md: allow array level to be set textually via sysfs 2006-01-06 08:34:09 -08:00
kcopyd.c [PATCH] mempool: use mempool_create_slab_pool() 2006-03-26 08:57:00 -08:00
kcopyd.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
linear.c [PATCH] md: allow array level to be set textually via sysfs 2006-01-06 08:34:09 -08:00
md.c [PATCH] regularize blk_cleanup_queue() use 2006-03-18 18:34:20 -05:00
mktables.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
multipath.c [PATCH] mempool: use common mempool kzalloc allocator 2006-03-26 08:56:59 -08:00
raid0.c [PATCH] md: Assorted little md fixes 2006-02-03 08:32:00 -08:00
raid1.c [PATCH] md: Fix several raid1 bugs which cause a memory leak 2006-03-09 19:47:37 -08:00
raid5.c [PATCH] md: Assorted little md fixes 2006-02-03 08:32:00 -08:00
raid6.h [PATCH] RAID6 Altivec fix 2005-09-17 11:49:58 -07:00
raid6algos.c [PATCH] RAID6 Altivec fix 2005-09-17 11:49:58 -07:00
raid6altivec.uc [PATCH] RAID6 Altivec fix 2005-09-17 11:49:58 -07:00
raid6int.uc Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
raid6main.c [PATCH] md: Assorted little md fixes 2006-02-03 08:32:00 -08:00
raid6mmx.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
raid6recov.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
raid6sse1.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
raid6sse2.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
raid6x86.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
raid10.c [PATCH] md: Assorted little md fixes 2006-02-03 08:32:00 -08:00
unroll.pl Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
xor.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00