linux/drivers/scsi
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
..
aacraid [SCSI] aacraid: Do not describe check_reset parameter with its value 2008-04-16 09:34:03 -05:00
aic7xxx [SCSI] aic7xxx: Test opcode, not definition in aicasm:type_check() 2008-04-07 12:18:59 -05:00
aic7xxx_old
aic94xx [SCSI] aic94xx: cleanups 2008-04-07 12:19:08 -05:00
arcmsr [SCSI] arcmsr: fix iounmap error for Type B adapter 2008-03-14 15:25:26 -05:00
arm [SCSI] Remove random noop unchecked_isa_dma users 2008-04-07 12:15:40 -05:00
dpt
ibmvscsi [SCSI] tgt: fix build errors when dprintk is defined 2008-03-03 13:19:52 -06:00
libsas Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2008-04-18 11:25:31 -07:00
lpfc [SCSI] lpfc 8.2.6 : Update lpfc driver version to 8.2.6 2008-04-10 07:53:34 -05:00
megaraid [SCSI] megaraid_sas: Add the new controller(1078DE) support to the driver 2008-04-07 12:19:00 -05:00
pcmcia
qla2xxx [SCSI] qla2xxx: Update version number to 8.02.01-k1. 2008-04-07 12:19:16 -05:00
qla4xxx [SCSI] qla4xxx: fix scsi command completion, lun reset and target reset code 2008-04-07 12:19:00 -05:00
sym53c8xx_2 [SCSI] sym53c8xx: fix resid calculation 2008-02-07 18:02:34 -06:00
.gitignore
3w-9xxx.c [SCSI] 3w-9xxx, 3w-xxxx: memset not needed in probe 2008-04-07 12:18:59 -05:00
3w-9xxx.h
3w-xxxx.c [SCSI] 3w-9xxx, 3w-xxxx: memset not needed in probe 2008-04-07 12:18:59 -05:00
3w-xxxx.h
53c700_d.h_shipped
53c700.c
53c700.h
53c700.scr
a100u2w.c [SCSI] a100u2w: fix bitmap lookup routine 2008-03-20 09:19:25 -05:00
a100u2w.h
a2091.c [SCSI] wd33c93: fix up cut and paste error 2008-04-07 12:19:07 -05:00
a2091.h
a3000.c [SCSI] WD33C93: let platform stub override no_sync/fast/dma_mode 2008-04-07 12:19:01 -05:00
a3000.h
a4000t.c
advansys.c [SCSI] advansys: Fix bug in AdvLoadMicrocode 2008-03-07 10:05:43 -06:00
aha152x.c
aha152x.h
aha1542.c
aha1542.h
aha1740.c
aha1740.h
aic7xxx_old.c
atari_dma_emul.c
atari_NCR5380.c
atari_scsi.c
atari_scsi.h
atp870u.c
atp870u.h
BusLogic.c [SCSI] BusLogic: make FlashPoint support x86-32 only 2008-04-07 12:15:44 -05:00
BusLogic.h [SCSI] BusLogic: make FlashPoint support x86-32 only 2008-04-07 12:15:44 -05:00
bvme6000_scsi.c
ch.c [SCSI] ch: fix sparse shadowed variable warnings 2008-04-07 12:19:08 -05:00
constants.c
dc395x.c [SCSI] Remove random noop unchecked_isa_dma users 2008-04-07 12:15:40 -05:00
dc395x.h
dmx3191d.c
dpt_i2o.c
dpti.h
dtc.c
dtc.h
eata_generic.h
eata_pio.c [SCSI] Remove random noop unchecked_isa_dma users 2008-04-07 12:15:40 -05:00
eata_pio.h
eata.c
esp_scsi.c
esp_scsi.h
fd_mcs.c
fdomain.c
fdomain.h
FlashPoint.c [SCSI] BusLogic: make FlashPoint support x86-32 only 2008-04-07 12:15:44 -05:00
g_NCR5380_mmio.c
g_NCR5380.c
g_NCR5380.h
gdth_ioctl.h
gdth_proc.c [SCSI] gdth: don't call pci_free_consistent under spinlock 2008-02-18 09:02:25 -06:00
gdth_proc.h
gdth.c [SCSI] gdth: remove command accessors 2008-04-07 12:15:39 -05:00
gdth.h [SCSI] gdth: PCI probe cleanups, prep for PCI hotplug API conversion 2008-04-07 12:15:36 -05:00
gvp11.c [SCSI] wd33c93: fix up cut and paste error 2008-04-07 12:19:07 -05:00
gvp11.h
hosts.c [SCSI] hosts.c: removed one unneeded shost->active_mode assignment 2008-04-07 12:19:05 -05:00
hptiop.c [SCSI] hptiop: fix header.context usage 2008-04-07 12:19:08 -05:00
hptiop.h
ibmmca.c
ide-scsi.c ide-scsi: do non-atomic pc->flags testing 2008-04-18 00:46:27 +02:00
imm.c
imm.h
in2000.c
in2000.h
initio.c [SCSI] initio: fix big endian problems for auto request sense 2008-04-11 17:16:28 -04:00
initio.h
ipr.c libata: kill ata_noop_dev_select() 2008-04-17 15:44:24 -04:00
ipr.h
ips.c [SCSI] ips: remove spurious cpu_to_leX on outX statements 2008-04-07 12:19:11 -05:00
ips.h
iscsi_tcp.c [SCSI] iscsi: bidi support for iscsi_tcp 2008-04-18 11:53:24 -05:00
iscsi_tcp.h
jazz_esp.c
Kconfig [SCSI] BusLogic: make FlashPoint support x86-32 only 2008-04-07 12:15:44 -05:00
lasi700.c
libiscsi.c [SCSI] iscsi: bidi support at the generic libiscsi level 2008-04-18 11:53:00 -05:00
libsrp.c
mac53c94.c
mac53c94.h
mac_scsi.c [SCSI] Remove random noop unchecked_isa_dma users 2008-04-07 12:15:40 -05:00
mac_scsi.h
Makefile [SCSI] mvsas: Add Marvell 6440 SAS/SATA driver 2008-02-23 07:29:31 -06:00
megaraid.c [SCSI] megaraid: outb_p extermination 2008-02-18 08:57:16 -06:00
megaraid.h
mesh.c PM: Introduce PM_EVENT_HIBERNATE callback state 2008-02-23 10:40:04 -08:00
mesh.h
mvme16x_scsi.c
mvme147.c [SCSI] wd33c93: fix up cut and paste error 2008-04-07 12:19:07 -05:00
mvme147.h
mvsas.c [SCSI] mvsas: check subsystem id 2008-03-28 12:32:22 -05:00
ncr53c8xx.c
ncr53c8xx.h
NCR53c406a.c
NCR5380.c
NCR5380.h
NCR_D700.c
NCR_D700.h
NCR_Q720.c
NCR_Q720.h
nsp32_debug.c
nsp32_io.h
nsp32.c
nsp32.h
osst_detect.h
osst_options.h
osst.c
osst.h
pas16.c
pas16.h
ppa.c
ppa.h
ps3rom.c [SCSI] ps3rom: use scsi_build_sense_buffer 2008-04-07 12:19:02 -05:00
ql1040_fw.h
ql1280_fw.h
ql12160_fw.h
qla1280.c [SCSI] qla1280: remove version check 2008-04-17 12:59:21 -05:00
qla1280.h
qlogicfas408.c
qlogicfas408.h
qlogicfas.c
qlogicpti_asm.c
qlogicpti.c [SCSI] qlogicpt: section fixes 2008-02-23 09:07:32 -06:00
qlogicpti.h
raid_class.c [SCSI] transport_class: BUG if we can't release the attribute container 2008-04-07 12:19:10 -05:00
script_asm.pl
scsi_debug.c [SCSI] scsi_debug: remove unnecessary function declarations 2008-04-07 12:19:07 -05:00
scsi_devinfo.c
scsi_error.c [SCSI] add scsi_build_sense_buffer helper function 2008-04-07 12:19:01 -05:00
scsi_ioctl.c
scsi_lib_dma.c
scsi_lib.c [SCSI] fix barrier failure issue 2008-04-07 12:19:10 -05:00
scsi_logging.h
scsi_module.c
scsi_netlink.c
scsi_priv.h
scsi_proc.c
scsi_sas_internal.h
scsi_scan.c [SCSI] docbook: fix scsi source file 2008-03-03 13:17:14 -06:00
scsi_sysctl.c
scsi_sysfs.c Revert "[SCSI] fix bsg queue oops with iscsi logout" 2008-03-26 09:09:19 -07:00
scsi_tgt_if.c
scsi_tgt_lib.c [SCSI] tgt: use KMEM_CACHE macro 2008-04-16 09:22:19 -05:00
scsi_tgt_priv.h
scsi_transport_api.h
scsi_transport_fc_internal.h
scsi_transport_fc.c
scsi_transport_iscsi.c [SCSI] iscsi class: regression - fix races with state manipulation and blocking/unblocking 2008-03-05 12:04:09 -06:00
scsi_transport_sas.c
scsi_transport_spi.c
scsi_transport_srp_internal.h
scsi_transport_srp.c
scsi_typedefs.h
scsi_wait_scan.c
scsi.c block: move the padding adjustment to blk_rq_map_sg 2008-04-21 09:50:08 +02:00
scsi.h
scsicam.c
sd.c [SCSI] sd, sr: do not emit change event at device add 2008-03-19 11:28:56 -05:00
ses.c [SCSI] ses: fix data corruption 2008-02-18 08:57:15 -06:00
sg.c Convert SG from nopage to fault. 2008-02-07 19:09:22 -08:00
sgiwd93.c [SCSI] WD33C93: let platform stub override no_sync/fast/dma_mode 2008-04-07 12:19:01 -05:00
sim710.c
sni_53c710.c
sr_ioctl.c [SCSI] sr: fix test unit ready responses 2008-02-07 18:02:44 -06:00
sr_vendor.c
sr.c [SCSI] sd, sr: do not emit change event at device add 2008-03-19 11:28:56 -05:00
sr.h [SCSI] sr: fix test unit ready responses 2008-02-07 18:02:44 -06:00
st_options.h [SCSI] st: add option to use SILI in variable block reads 2008-04-07 12:15:39 -05:00
st.c [SCSI] st: rename flush_write_buffer() 2008-04-16 09:23:46 -05:00
st.h [SCSI] st: add option to use SILI in variable block reads 2008-04-07 12:15:39 -05:00
stex.c [SCSI] stex: use scsi_build_sense_buffer 2008-04-07 12:19:02 -05:00
sun3_NCR5380.c
sun3_scsi_vme.c [SCSI] sun3_scsi_vme: add MODULE_LICENSE 2008-04-16 09:28:11 -05:00
sun3_scsi.c
sun3_scsi.h
sun3x_esp.c [SCSI] sun3x_esp: convert to esp_scsi 2008-02-07 18:02:33 -06:00
sun_esp.c
sym53c416.c [SCSI] sym53c416: fix module parameters 2008-02-12 15:24:58 -06:00
sym53c416.h
t128.c
t128.h
tmscsim.c
tmscsim.h
u14-34f.c [SCSI] u14-34f: fix data direction bug 2008-02-07 18:02:44 -06:00
ultrastor.c
ultrastor.h
wd33c93.c [SCSI] WD33C93: let platform stub override no_sync/fast/dma_mode 2008-04-07 12:19:01 -05:00
wd33c93.h
wd7000.c
zalon.c
zorro7xx.c