alistair23-linux/drivers
Mikulas Patocka a6e50b409d dm snapshot: skip reading origin when overwriting complete chunk
If we write a full chunk in the snapshot, skip reading the origin device
because the whole chunk will be overwritten anyway.

This patch changes the snapshot write logic when a full chunk is written.
In this case:
  1. allocate the exception
  2. dispatch the bio (but don't report the bio completion to device mapper)
  3. write the exception record
  4. report bio completed

Callbacks must be done through the kcopyd thread, because callbacks must not
race with each other.  So we create two new functions:

  dm_kcopyd_prepare_callback: allocate a job structure and prepare the callback.
  (This function must not be called from interrupt context.)

  dm_kcopyd_do_callback: submit callback.
  (This function may be called from interrupt context.)

Performance test (on snapshots with 4k chunk size):
  without the patch:
    non-direct-io sequential write (dd):    17.7MB/s
    direct-io sequential write (dd):        20.9MB/s
    non-direct-io random write (mkfs.ext2): 0.44s

  with the patch:
    non-direct-io sequential write (dd):    26.5MB/s
    direct-io sequential write (dd):        33.2MB/s
    non-direct-io random write (mkfs.ext2): 0.27s

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2011-08-02 12:32:04 +01:00
..
accessibility
acpi Merge branch 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 2011-07-26 09:21:09 -07:00
amba
ata drivers: use kzalloc/kcalloc instead of 'kmalloc+memset', where possible 2011-07-25 20:57:13 -07:00
atm atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
auxdisplay
base atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
bcma Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2011-07-25 13:56:39 -07:00
block atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
bluetooth Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem 2011-07-15 10:05:24 -04:00
cdrom
char Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6 2011-07-27 19:26:38 -07:00
clk ARM: Consolidate the clkdev header files 2011-07-19 18:09:45 +02:00
clocksource Merge branch 'timers-clocksource-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-07-23 10:34:47 -07:00
connector atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
cpufreq Merge branch 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 2011-07-26 09:21:09 -07:00
cpuidle
crypto Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2011-07-25 12:53:15 -07:00
dca
dio
dma Merge branch 'next/devel' of ssh://master.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc 2011-07-26 17:41:04 -07:00
edac atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
eisa eisa/pci_eisa.c: fix section mismatch 2011-07-25 20:57:14 -07:00
firewire atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
firmware Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 2011-07-25 23:06:24 -07:00
gpio Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2011-07-25 13:56:39 -07:00
gpu atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
hid Merge branches 'roccat', 'upstream' and 'wiimote' into for-linus 2011-07-22 22:47:08 +02:00
hwmon atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
hwspinlock
i2c i2c-eg20t : Fix the issue of Combined R/W transfer mode 2011-07-27 00:02:28 +01:00
ide Merge branch 'master' into for-next 2011-07-11 14:15:55 +02:00
idle
ieee802154 IEEE 802.15.4: do not enable driver debugging by default 2011-06-30 16:18:09 +04:00
infiniband Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2011-07-27 13:21:40 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2011-07-27 09:24:56 -07:00
iommu iommu/amd: Don't use MSI address range for DMA addresses 2011-07-06 17:14:44 +02:00
isdn atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
leds arch/arm/mach-ux500/board-u5500.c: calibrate ALS input voltage 2011-07-25 20:57:15 -07:00
lguest lguest: Fix in/out emulation 2011-07-22 14:39:51 +09:30
macintosh drivers: fix up various ->llseek() implementations 2011-07-20 20:47:58 -04:00
mca
md dm snapshot: skip reading origin when overwriting complete chunk 2011-08-02 12:32:04 +01:00
media atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
memstick
message atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
mfd Merge branch 'next/devel2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc 2011-07-26 17:42:18 -07:00
misc atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
mmc MMC / TMIO: Fix build issue related to struct scatterlist 2011-07-26 11:52:55 -07:00
mtd Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2011-07-25 13:56:39 -07:00
net atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
nfc NFC: pn533: add NXP pn533 nfc device driver 2011-07-05 15:26:58 -04:00
nubus
of Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2011-07-25 22:59:39 -07:00
oprofile atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
parisc
parport Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 2011-07-25 23:09:27 -07:00
pci Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2011-07-26 18:30:20 -07:00
pcmcia Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2011-07-25 13:56:39 -07:00
platform asus-wmi: ->is_visible() can't return negative 2011-07-24 10:12:19 -04:00
pnp Merge 'akpm' patch series 2011-07-25 21:00:19 -07:00
power
pps
ps3
ptp
rapidio
regulator regulator: Convert tps65023 to use regmap API 2011-07-23 07:57:02 +01:00
rtc rtc: fix hrtimer deadlock 2011-07-26 16:49:42 -07:00
s390 atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
sbus atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
scsi Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2011-07-27 13:21:40 -07:00
sfi
sh switch assorted clock drivers to debugfs_remove_recursive() 2011-07-20 20:47:51 -04:00
sn
spi Merge branch 'spi/next' of git://git.secretlab.ca/git/linux-2.6 2011-07-22 14:52:44 -07:00
ssb Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2011-07-25 13:56:39 -07:00
staging staging: brcm80211: Fix double include introduced by bad merge 2011-07-27 09:23:35 -07:00
target Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2011-07-27 13:21:40 -07:00
tc
telephony
thermal
tty atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
uio Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 2011-07-25 23:06:24 -07:00
usb atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
uwb uwb: Fix misspelling of neighbourhood in comment 2011-07-21 14:03:41 +02:00
vhost atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
video atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
virt drivers/virt: add missing linux/interrupt.h to fsl_hypervisor.c 2011-07-22 09:24:39 -05:00
virtio virtio: expose for non-virtualization users too 2011-07-23 16:20:30 +09:30
vlynq
w1 atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
watchdog atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
xen xen/balloon: memory hotplug support for Xen balloon driver 2011-07-25 20:57:08 -07:00
zorro
Kconfig Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2011-07-25 22:59:39 -07:00
Makefile Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2011-07-25 22:59:39 -07:00