android_kernel_xiaomi_sdm845/include
FUJITA Tomonori f18573abcc block: move the padding adjustment to blk_rq_map_sg
blk_rq_map_user adjusts bi_size of the last bio. It breaks the rule
that req->data_len (the true data length) is equal to sum(bio). It
broke the scsi command completion code.

commit e97a294ef6 was introduced to fix
the above issue. However, the partial completion code doesn't work
with it. The commit is also a layer violation (scsi mid-layer should
not know about the block layer's padding).

This patch moves the padding adjustment to blk_rq_map_sg (suggested by
James). The padding works like the drain buffer. This patch breaks the
rule that req->data_len is equal to sum(sg), however, the drain buffer
already broke it. So this patch just restores the rule that
req->data_len is equal to sub(bio) without breaking anything new.

Now when a low level driver needs padding, blk_rq_map_user and
blk_rq_map_user_iov guarantee there's enough room for padding.
blk_rq_map_sg can safely extend the last entry of a scatter list.

blk_rq_map_sg must extend the last entry of a scatter list only for a
request that got through bio_copy_user_iov. This patches introduces
new REQ_COPY_USER flag.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Tejun Heo <htejun@gmail.com>
Cc: Mike Christie <michaelc@cs.wisc.edu>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-04-21 09:50:08 +02:00
..
acpi ACPI, cpuidle: Clarify C-state description in sysfs 2008-02-14 00:09:55 -05:00
asm-alpha Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 2008-04-18 08:39:24 -07:00
asm-arm Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 2008-04-18 08:39:24 -07:00
asm-avr32 Generic semaphore implementation 2008-04-17 10:42:34 -04:00
asm-blackfin Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 2008-04-18 08:39:24 -07:00
asm-cris Generic semaphore implementation 2008-04-17 10:42:34 -04:00
asm-frv Generic semaphore implementation 2008-04-17 10:42:34 -04:00
asm-generic kvm: provide kvm.h for all architecture: fixes headers_install 2008-04-02 15:28:18 -07:00
asm-h8300 Generic semaphore implementation 2008-04-17 10:42:34 -04:00
asm-ia64 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2008-04-18 09:44:55 -07:00
asm-m32r Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 2008-04-18 08:39:24 -07:00
asm-m68k Generic semaphore implementation 2008-04-17 10:42:34 -04:00
asm-m68knommu Generic semaphore implementation 2008-04-17 10:42:34 -04:00
asm-mips Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 2008-04-18 08:39:24 -07:00
asm-mn10300 Generic semaphore implementation 2008-04-17 10:42:34 -04:00
asm-parisc Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 2008-04-18 08:39:24 -07:00
asm-powerpc Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 2008-04-18 08:39:24 -07:00
asm-ppc [PPC] 8xx: swap bug-fix 2008-03-07 16:56:54 -06:00
asm-s390 Merge branch 'semaphore' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc 2008-04-18 08:25:29 -07:00
asm-sh Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 2008-04-18 08:39:24 -07:00
asm-sparc Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 2008-04-18 08:39:24 -07:00
asm-sparc64 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 2008-04-18 08:39:24 -07:00
asm-um Generic semaphore implementation 2008-04-17 10:42:34 -04:00
asm-v850 Generic semaphore implementation 2008-04-17 10:42:34 -04:00
asm-x86 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 2008-04-18 08:39:24 -07:00
asm-xtensa Generic semaphore implementation 2008-04-17 10:42:34 -04:00
crypto [CRYPTO] skcipher: Fix section mismatches 2008-03-08 20:29:43 +08:00
keys
linux block: move the padding adjustment to blk_rq_map_sg 2008-04-21 09:50:08 +02:00
math-emu
media V4L/DVB (7192): Adds support for Genius TVGo A11MCE 2008-02-18 11:15:19 -03:00
mtd
net [INET]: Uninline the __inet_inherit_port call. 2008-04-17 23:18:15 -07:00
pcmcia
rdma IB/core: Add support for modify CQ 2008-04-16 21:09:33 -07:00
rxrpc
scsi [SCSI] iscsi: extended cdb support 2008-04-18 11:51:19 -05:00
sound [ALSA] opl3 - Fix compilation without sequencer support 2008-02-22 14:20:08 -08:00
video
xen
Kbuild