diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-18 01:54:40 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-18 01:54:40 +0100 |
commit | c55d267de274d308927b60c3e740c1a826832317 (patch) | |
tree | 21b53a8c725d9f9650f60d94b349459d5b8dae10 /drivers/scsi/osd/osd_initiator.c | |
parent | Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cp... (diff) | |
parent | [SCSI] scsi_dh_rdac: Add MD36xxf into device list (diff) | |
download | linux-c55d267de274d308927b60c3e740c1a826832317.tar.xz linux-c55d267de274d308927b60c3e740c1a826832317.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (170 commits)
[SCSI] scsi_dh_rdac: Add MD36xxf into device list
[SCSI] scsi_debug: add consecutive medium errors
[SCSI] libsas: fix ata list corruption issue
[SCSI] hpsa: export resettable host attribute
[SCSI] hpsa: move device attributes to avoid forward declarations
[SCSI] scsi_debug: Logical Block Provisioning (SBC3r26)
[SCSI] sd: Logical Block Provisioning update
[SCSI] Include protection operation in SCSI command trace
[SCSI] hpsa: fix incorrect PCI IDs and add two new ones (2nd try)
[SCSI] target: Fix volume size misreporting for volumes > 2TB
[SCSI] bnx2fc: Broadcom FCoE offload driver
[SCSI] fcoe: fix broken fcoe interface reset
[SCSI] fcoe: precedence bug in fcoe_filter_frames()
[SCSI] libfcoe: Remove stale fcoe-netdev entries
[SCSI] libfcoe: Move FCOE_MTU definition from fcoe.h to libfcoe.h
[SCSI] libfc: introduce __fc_fill_fc_hdr that accepts fc_hdr as an argument
[SCSI] fcoe, libfc: initialize EM anchors list and then update npiv EMs
[SCSI] Revert "[SCSI] libfc: fix exchange being deleted when the abort itself is timed out"
[SCSI] libfc: Fixing a memory leak when destroying an interface
[SCSI] megaraid_sas: Version and Changelog update
...
Fix up trivial conflicts due to whitespace differences in
drivers/scsi/libsas/{sas_ata.c,sas_scsi_host.c}
Diffstat (limited to 'drivers/scsi/osd/osd_initiator.c')
-rw-r--r-- | drivers/scsi/osd/osd_initiator.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c index b37c8a3c1bb0..86afb13f1e79 100644 --- a/drivers/scsi/osd/osd_initiator.c +++ b/drivers/scsi/osd/osd_initiator.c @@ -1005,11 +1005,23 @@ int osd_req_read_sg(struct osd_request *or, const struct osd_sg_entry *sglist, unsigned numentries) { u64 len; - int ret = _add_sg_continuation_descriptor(or, sglist, numentries, &len); + u64 off; + int ret; - if (ret) - return ret; - osd_req_read(or, obj, 0, bio, len); + if (numentries > 1) { + off = 0; + ret = _add_sg_continuation_descriptor(or, sglist, numentries, + &len); + if (ret) + return ret; + } else { + /* Optimize the case of single segment, read_sg is a + * bidi operation. + */ + len = sglist->len; + off = sglist->offset; + } + osd_req_read(or, obj, off, bio, len); return 0; } |