linux/include
Kiyoshi Ueda 32fab448e5 block: add request update interface
This patch adds blk_update_request(), which updates struct request
with completing its data part, but doesn't complete the struct
request itself.
Though it looks like end_that_request_first() of older kernels,
blk_update_request() should be used only by request stacking drivers.

Request-based dm will use it in bio->bi_end_io callback to update
the original request when a data part of a cloned request completes.
Followings are additional background information of why request-based
dm needs this interface.

  - Request stacking drivers can't use blk_end_request() directly from
    the lower driver's completion context (bio->bi_end_io or rq->end_io),
    because some device drivers (e.g. ide) may try to complete
    their request with queue lock held, and it may cause deadlock.
    See below for detailed description of possible deadlock:
    <http://marc.info/?l=linux-kernel&m=120311479108569&w=2>

  - To solve that, request-based dm offloads the completion of
    cloned struct request to softirq context (i.e. using
    blk_complete_request() from rq->end_io).

  - Though it is possible to use the same solution from bio->bi_end_io,
    it will delay the notification of bio completion to the original
    submitter.  Also, it will cause inefficient partial completion,
    because the lower driver can't perform the cloned request anymore
    and request-based dm needs to requeue and redispatch it to
    the lower driver again later.  That's not good.

  - So request-based dm needs blk_update_request() to perform the bio
    completion in the lower driver's completion context, which is more
    efficient.

Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-10-09 08:56:18 +02:00
..
acpi ACPICA: Additional error checking for pathname utilities 2008-08-15 02:12:16 +02:00
asm-arm [ARM] 5191/1: ARM: remove CVS keywords 2008-08-16 20:01:18 +01:00
asm-cris Reduce brokenness of CRIS headers_install 2008-08-20 13:19:51 -07:00
asm-frv FRV: Provide ioremap_wc() for FRV 2008-08-20 13:19:52 -07:00
asm-generic warn: Turn the netdev timeout WARN_ON() into a WARN() 2008-09-16 19:39:33 -07:00
asm-m32r [PATCH] kill altroot 2008-07-26 20:53:20 -04:00
asm-m68k m68k{,nommu}: Wire up new system calls 2008-08-11 10:37:34 -07:00
asm-mips [MIPS] IP27: Fix build errors if CONFIG_MAPPED_KERNEL=y 2008-10-06 01:22:29 +01:00
asm-mn10300 MN10300: Supply ioremap_wc() for MN10300 2008-08-20 13:19:51 -07:00
asm-parisc lib: Correct printk %pF to work on all architectures 2008-09-09 11:51:15 -07:00
asm-um [PATCH] kill altroot 2008-07-26 20:53:20 -04:00
asm-x86 inotify: fix lock ordering wrt do_page_fault's mmap_sem 2008-10-02 15:53:13 -07:00
asm-xtensa [PATCH] kill altroot 2008-07-26 20:53:20 -04:00
crypto crypto: hash - Add missing top-level functions 2008-08-13 20:08:44 +10:00
drm drm/radeon: fixup issue with radeon and PAT support. 2008-07-15 15:48:05 +10:00
keys
linux block: add request update interface 2008-10-09 08:56:18 +02:00
math-emu
media V4L/DVB (8610): Add suspend/resume capabilities to soc_camera. 2008-08-06 06:57:32 -03:00
mtd Merge branch 'linux-next' of git://git.infradead.org/~dedekind/ubi-2.6 2008-07-25 10:40:14 -04:00
net sctp: Fix kernel panic while process protocol violation parameter 2008-09-30 05:32:24 -07:00
pcmcia
rdma RDMA/cma: Remove padding arrays by using struct sockaddr_storage 2008-08-04 11:02:14 -07:00
rxrpc
scsi block: unify request timeout handling 2008-10-09 08:56:13 +02:00
sound ALSA: ASoC: Export dapm_reg_event() fully 2008-07-29 16:00:33 +02:00
video atmel_lcdfb: add board parameter specify framebuffer memory size 2008-08-12 16:07:29 -07:00
xen xen: implement Xen-specific spinlocks 2008-07-16 11:15:53 +02:00
Kbuild kbuild: only one call for include/ in make headers_* 2008-07-25 22:11:44 +02:00