kernel-fxtec-pro1x/drivers/md
Milan Broz 393b47ef23 dm crypt: fix async split
When writing io, dm-crypt has to allocate a new cloned bio
and encrypt the data into newly-allocated pages attached to this bio.
In rare cases, because of hw restrictions (e.g. physical segment limit)
or memory pressure, sometimes more than one cloned bio has to be used,
each processing a different fragment of the original.

Currently there is one waitqueue which waits for one fragment to finish
and continues processing the next fragment.

But when using asynchronous crypto this doesn't work, because several
fragments may be processed asynchronously or in parallel and there is
only one crypt context that cannot be shared between the bio fragments.
The result may be corruption of the data contained in the encrypted bio.

The patch fixes this by allocating new dm_crypt_io structs (with new
crypto contexts) and running them independently.

The fragments contains a pointer to the base dm_crypt_io struct to
handle reference counting, so the base one is properly deallocated
after all the fragments are finished.

In a low memory situation, this only uses one additional object from the
mempool.  If the mempool is empty, the next allocation simple waits for
previous fragments to complete.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-10-21 17:45:02 +01:00
..
raid6test md: raid6: clean up the style of raid6test/test.c 2008-02-06 10:41:18 -08:00
.gitignore
bitmap.c Fix problem with waiting while holding rcu read lock in md/bitmap.c 2008-09-01 12:48:13 +10:00
dm-bio-list.h
dm-bio-record.h
dm-crypt.c dm crypt: fix async split 2008-10-21 17:45:02 +01:00
dm-delay.c dm: remove dm header from targets 2008-10-21 17:44:59 +01:00
dm-exception-store.c dm: remove dm header from targets 2008-10-21 17:44:59 +01:00
dm-io.c dm: remove dm header from targets 2008-10-21 17:44:59 +01:00
dm-ioctl.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm 2008-10-10 11:11:47 -07:00
dm-kcopyd.c dm: remove dm header from targets 2008-10-21 17:44:59 +01:00
dm-linear.c dm: remove dm header from targets 2008-10-21 17:44:59 +01:00
dm-log.c dm: remove dm header from targets 2008-10-21 17:44:59 +01:00
dm-mpath.c dm: remove dm header from targets 2008-10-21 17:44:59 +01:00
dm-mpath.h dm mpath: remove is_active from struct dm_path 2008-10-10 13:36:58 +01:00
dm-path-selector.c dm: remove dm header from targets 2008-10-21 17:44:59 +01:00
dm-path-selector.h
dm-raid1.c dm: remove dm header from targets 2008-10-21 17:44:59 +01:00
dm-round-robin.c dm: remove dm header from targets 2008-10-21 17:44:59 +01:00
dm-snap.c dm snapshot: drop unused last_percent 2008-10-21 17:44:53 +01:00
dm-snap.h dm: remove dm header from targets 2008-10-21 17:44:59 +01:00
dm-stripe.c dm: remove dm header from targets 2008-10-21 17:44:59 +01:00
dm-table.c dm: detect lost queue 2008-10-10 13:37:13 +01: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: remove dm header from targets 2008-10-21 17:44:59 +01:00
dm.c block: move stats from disk to part0 2008-10-09 08:56:08 +02:00
dm.h dm: publish array_too_big 2008-10-21 17:44:57 +01:00
faulty.c md: check for memory allocation failure in faulty personality 2008-10-16 14:16:53 +11:00
Kconfig raid, fastboot: hide RAID autodetect option if MD is compiled as a module 2008-10-12 08:25:14 -07:00
linear.c md: Remove unnecessary #includes, #defines, and function declarations. 2008-10-13 11:55:12 +11:00
Makefile [SCSI] scsi_dh: Remove hardware handler infrastructure from dm 2008-06-05 09:23:42 -05:00
md.c md: fix input truncation in safe_delay_store() 2008-10-16 17:03:08 +11:00
mktables.c md: raid6: Fix mktable.c 2008-02-06 10:41:18 -08:00
multipath.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2008-10-17 09:00:23 -07:00
raid0.c md: Remove unnecessary #includes, #defines, and function declarations. 2008-10-13 11:55:12 +11:00
raid1.c md: build failure due to missing delay.h 2008-10-15 21:57:05 +11:00
raid5.c md: Relax minimum size restrictions on chunk_size. 2008-10-13 11:55:12 +11:00
raid6.h md: Remove unnecessary #includes, #defines, and function declarations. 2008-10-13 11:55:12 +11:00
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: build failure due to missing delay.h 2008-10-15 21:57:05 +11:00
unroll.pl