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
Alasdair G Kergon eccf081799 [PATCH] device-mapper snapshot: fix origin_write pending_exception submission
Say you have several snapshots of the same origin and then you issue a write
to some place in the origin for the first time.

Before the device-mapper snapshot target lets the write go through to the
underlying device, it needs to make a copy of the data that is about to be
overwritten.  Each snapshot is independent, so it makes one copy for each
snapshot.

__origin_write() loops through each snapshot and checks to see whether a copy
is needed for that snapshot.  (A copy is only needed the first time that data
changes.)

If a copy is needed, the code allocates a 'pending_exception' structure
holding the details.  It links these together for all the snapshots, then
works its way through this list and submits the copying requests to the kcopyd
thread by calling start_copy().  When each request is completed, the original
pending_exception structure gets freed in pending_complete().

If you're very unlucky, this structure can get freed *before* the submission
process has finished walking the list.

This patch:

  1) Creates a new temporary list pe_queue to hold the pending exception
     structures;

  2) Does all the bookkeeping up-front, then walks through the new list
     safely and calls start_copy() for each pending_exception that needed it;

  3) Avoids attempting to add pe->siblings to the list if it's already
     connected.

[NB This does not fix all the races in this code.  More patches will follow.]

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
..
acorn [PATCH] move capable() to capability.h 2006-01-11 18:42:13 -08:00
acpi [PATCH] more s/fucn/func/ typo fixes 2006-03-26 08:57:09 -08:00
amba
atm Merge master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild 2006-03-25 08:48:48 -08:00
base [PATCH] Notifier chain update: API changes 2006-03-27 08:44:50 -08:00
block [PATCH] mempool: use mempool_create_slab_pool() 2006-03-26 08:57:00 -08:00
bluetooth [Bluetooth] Fix firmware loading problem of BT3C driver 2006-02-13 11:40:07 +01:00
cdrom [PATCH] Remove MODULE_PARM 2006-03-25 08:22:52 -08:00
char [PATCH] RTC subsystem: ARM cleanup 2006-03-27 08:44:50 -08:00
connector [PATCH] sem2mutex: drivers: raw, connector, dcdbas, ppp_generic 2006-03-23 07:38:10 -08:00
cpufreq [PATCH] Notifier chain update: API changes 2006-03-27 08:44:50 -08:00
crypto [CRYPTO] api: Align tfm context as wide as possible 2006-03-21 20:14:08 +11:00
dio [PATCH] hp300: fix driver_register() return handling, remove dio_module_init() 2006-03-25 08:22:53 -08:00
edac [PATCH] EDAC: use EXPORT_SYMBOL_GPL 2006-03-26 08:57:08 -08:00
eisa [PATCH] EISA: Ignore generated file drivers/eisa/devlist.h 2006-03-25 08:23:01 -08:00
fc4 [PATCH] drivers/fc4/fc.c: memset correct length 2006-02-20 20:00:11 -08:00
firmware [PATCH] Notifier chain update: API changes 2006-03-27 08:44:50 -08:00
hwmon [PATCH] s/;;/;/g 2006-03-24 07:33:24 -08:00
i2c [PATCH] RTC subsystem: I2C cleanup 2006-03-27 08:44:51 -08:00
ide [PATCH] ide: fix section mismatch warning 2006-03-25 08:22:53 -08:00
ieee1394 [PATCH] bitops: hweight() related cleanup 2006-03-26 08:57:15 -08:00
infiniband IPoIB: P_Key change event handling 2006-03-24 15:47:30 -08:00
input Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2006-03-26 09:41:18 -08:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2006-03-26 09:41:18 -08:00
macintosh [PATCH] Notifier chain update: API changes 2006-03-27 08:44:50 -08:00
mca
md [PATCH] device-mapper snapshot: fix origin_write pending_exception submission 2006-03-27 08:44:58 -08:00
media Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb 2006-03-25 08:37:36 -08:00
message [PATCH] mempool: use mempool_create_slab_pool() 2006-03-26 08:57:00 -08:00
mfd [PATCH] show MCP menu only on ARCH_SA1100 2006-03-24 07:33:28 -08:00
misc [PATCH] Notifier chain update: API changes 2006-03-27 08:44:50 -08:00
mmc [PATCH] Remove MODULE_PARM 2006-03-25 08:22:52 -08:00
mtd Kconfig help: MTD_JEDECPROBE already supports Intel 2006-03-26 19:15:03 +02:00
net [PATCH] pnp: IRDA: adjust pnp_register_driver signature 2006-03-27 08:44:53 -08:00
nubus
oprofile [PATCH] more for_each_cpu() conversions 2006-03-23 07:38:17 -08:00
parisc [PATCH] Notifier chain update: API changes 2006-03-27 08:44:50 -08:00
parport [PATCH] pnp: parport: adjust pnp_register_driver signature 2006-03-27 08:44:52 -08:00
pci [PATCH] sem2mutex: misc static one-file mutexes 2006-03-26 08:56:55 -08:00
pcmcia [PATCH] handle errors returned by platform_get_irq*() 2006-03-20 13:42:57 -08:00
pnp [PATCH] pnp: PNP: adjust pnp_register_driver signature 2006-03-27 08:44:53 -08:00
rapidio [PATCH] Add rio_bus_type probe and remove methods 2006-01-13 11:26:10 -08:00
rtc [PATCH] RTC subsystem: M48T86 driver 2006-03-27 08:44:52 -08:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2006-03-26 09:41:18 -08:00
sbus [SPARC]: Respect vm_page_prot in io_remap_page_range(). 2006-03-22 01:15:13 -08:00
scsi [PATCH] Notifier chain update: API changes 2006-03-27 08:44:50 -08:00
serial Merge master.kernel.org:/home/rmk/linux-2.6-serial 2006-03-25 20:31:32 -08:00
sh [PATCH] Add superhyway_bus_type probe and remove methods 2006-01-13 11:26:09 -08:00
sn Pull sem2mutex-ioc4 into release branch 2006-03-21 08:17:15 -08:00
spi [PATCH] spi: Fix modular master driver remove and device suspend/remove 2006-02-20 20:00:09 -08:00
tc [PATCH] kill _INLINE_ 2006-03-23 07:38:16 -08:00
telephony [PATCH] sem2mutex: misc static one-file mutexes 2006-03-26 08:56:55 -08:00
usb [PATCH] Notifier chain update: API changes 2006-03-27 08:44:50 -08:00
video [PATCH] video/sis/init301.c:SiS_ChrontelDoSomething2(): remove dead code 2006-03-27 08:44:58 -08:00
w1 fix typos "wich" -> "which" 2006-03-24 18:23:14 +01:00
zorro [PATCH] amiga: fix driver_register() return handling, remove zorro_module_init() 2006-03-25 08:22:53 -08:00
Kconfig [PATCH] RTC Subsystem: library functions 2006-03-27 08:44:50 -08:00
Makefile [PATCH] RTC Subsystem: library functions 2006-03-27 08:44:50 -08:00