Deleted Added
full compact
ctl.c (267515) ctl.c (267537)
1/*-
2 * Copyright (c) 2003-2009 Silicon Graphics International Corp.
3 * Copyright (c) 2012 The FreeBSD Foundation
4 * All rights reserved.
5 *
6 * Portions of this software were developed by Edward Tomasz Napierala
7 * under sponsorship from the FreeBSD Foundation.
8 *

--- 28 unchanged lines hidden (view full) ---

37 * CAM Target Layer, a SCSI device emulation subsystem.
38 *
39 * Author: Ken Merry <ken@FreeBSD.org>
40 */
41
42#define _CTL_C
43
44#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2003-2009 Silicon Graphics International Corp.
3 * Copyright (c) 2012 The FreeBSD Foundation
4 * All rights reserved.
5 *
6 * Portions of this software were developed by Edward Tomasz Napierala
7 * under sponsorship from the FreeBSD Foundation.
8 *

--- 28 unchanged lines hidden (view full) ---

37 * CAM Target Layer, a SCSI device emulation subsystem.
38 *
39 * Author: Ken Merry <ken@FreeBSD.org>
40 */
41
42#define _CTL_C
43
44#include <sys/cdefs.h>
45__FBSDID("$FreeBSD: head/sys/cam/ctl/ctl.c 267515 2014-06-15 18:16:51Z mav $");
45__FBSDID("$FreeBSD: head/sys/cam/ctl/ctl.c 267537 2014-06-16 11:00:14Z mav $");
46
47#include <sys/param.h>
48#include <sys/systm.h>
49#include <sys/kernel.h>
50#include <sys/types.h>
51#include <sys/kthread.h>
52#include <sys/bio.h>
53#include <sys/fcntl.h>

--- 4937 unchanged lines hidden (view full) ---

4991 retval = ctl_scsiio(&io->scsiio);
4992 }
4993bailout:
4994 return (retval);
4995}
4996
4997/*
4998 * This gets called by a backend driver when it is done with a
46
47#include <sys/param.h>
48#include <sys/systm.h>
49#include <sys/kernel.h>
50#include <sys/types.h>
51#include <sys/kthread.h>
52#include <sys/bio.h>
53#include <sys/fcntl.h>

--- 4937 unchanged lines hidden (view full) ---

4991 retval = ctl_scsiio(&io->scsiio);
4992 }
4993bailout:
4994 return (retval);
4995}
4996
4997/*
4998 * This gets called by a backend driver when it is done with a
4999 * data_submit method.
5000 */
5001void
5002ctl_data_submit_done(union ctl_io *io)
5003{
5004 /*
5005 * If the IO_CONT flag is set, we need to call the supplied
5006 * function to continue processing the I/O, instead of completing
5007 * the I/O just yet.
5008 *
5009 * If there is an error, though, we don't want to keep processing.
5010 * Instead, just send status back to the initiator.
5011 */
5012 if ((io->io_hdr.flags & CTL_FLAG_IO_CONT)
5013 && (((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)
5014 || ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS))) {
5015 io->scsiio.io_cont(io);
5016 return;
5017 }
5018 ctl_done(io);
5019}
5020
5021/*
5022 * This gets called by a backend driver when it is done with a
4999 * configuration write.
5000 */
5001void
5002ctl_config_write_done(union ctl_io *io)
5003{
5004 /*
5005 * If the IO_CONT flag is set, we need to call the supplied
5006 * function to continue processing the I/O, instead of completing

--- 3570 unchanged lines hidden (view full) ---

8577
8578 mtx_unlock(&softc->ctl_lock);
8579}
8580
8581int
8582ctl_read_write(struct ctl_scsiio *ctsio)
8583{
8584 struct ctl_lun *lun;
5023 * configuration write.
5024 */
5025void
5026ctl_config_write_done(union ctl_io *io)
5027{
5028 /*
5029 * If the IO_CONT flag is set, we need to call the supplied
5030 * function to continue processing the I/O, instead of completing

--- 3570 unchanged lines hidden (view full) ---

8601
8602 mtx_unlock(&softc->ctl_lock);
8603}
8604
8605int
8606ctl_read_write(struct ctl_scsiio *ctsio)
8607{
8608 struct ctl_lun *lun;
8585 struct ctl_lba_len lbalen;
8609 struct ctl_lba_len_flags *lbalen;
8586 uint64_t lba;
8587 uint32_t num_blocks;
8588 int reladdr, fua, dpo, ebp;
8589 int retval;
8590 int isread;
8591
8592 lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
8593

--- 194 unchanged lines hidden (view full) ---

8788 * translates to 256 blocks for those commands.
8789 */
8790 if (num_blocks == 0) {
8791 ctl_set_success(ctsio);
8792 ctl_done((union ctl_io *)ctsio);
8793 return (CTL_RETVAL_COMPLETE);
8794 }
8795
8610 uint64_t lba;
8611 uint32_t num_blocks;
8612 int reladdr, fua, dpo, ebp;
8613 int retval;
8614 int isread;
8615
8616 lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
8617

--- 194 unchanged lines hidden (view full) ---

8812 * translates to 256 blocks for those commands.
8813 */
8814 if (num_blocks == 0) {
8815 ctl_set_success(ctsio);
8816 ctl_done((union ctl_io *)ctsio);
8817 return (CTL_RETVAL_COMPLETE);
8818 }
8819
8796 lbalen.lba = lba;
8797 lbalen.len = num_blocks;
8798 memcpy(ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, &lbalen,
8799 sizeof(lbalen));
8820 lbalen = (struct ctl_lba_len_flags *)
8821 &ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN];
8822 lbalen->lba = lba;
8823 lbalen->len = num_blocks;
8824 lbalen->flags = isread ? CTL_LLF_READ : CTL_LLF_WRITE;
8800
8801 ctsio->kern_total_len = num_blocks * lun->be_lun->blocksize;
8802 ctsio->kern_rel_offset = 0;
8803
8804 CTL_DEBUG_PRINT(("ctl_read_write: calling data_submit()\n"));
8805
8806 retval = lun->backend->data_submit((union ctl_io *)ctsio);
8807
8808 return (retval);
8809}
8810
8825
8826 ctsio->kern_total_len = num_blocks * lun->be_lun->blocksize;
8827 ctsio->kern_rel_offset = 0;
8828
8829 CTL_DEBUG_PRINT(("ctl_read_write: calling data_submit()\n"));
8830
8831 retval = lun->backend->data_submit((union ctl_io *)ctsio);
8832
8833 return (retval);
8834}
8835
8836static int
8837ctl_cnw_cont(union ctl_io *io)
8838{
8839 struct ctl_scsiio *ctsio;
8840 struct ctl_lun *lun;
8841 struct ctl_lba_len_flags *lbalen;
8842 int retval;
8843
8844 ctsio = &io->scsiio;
8845 ctsio->io_hdr.status = CTL_STATUS_NONE;
8846 ctsio->io_hdr.flags &= ~CTL_FLAG_IO_CONT;
8847 lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
8848 lbalen = (struct ctl_lba_len_flags *)
8849 &ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN];
8850 lbalen->flags = CTL_LLF_WRITE;
8851
8852 CTL_DEBUG_PRINT(("ctl_cnw_cont: calling data_submit()\n"));
8853 retval = lun->backend->data_submit((union ctl_io *)ctsio);
8854 return (retval);
8855}
8856
8811int
8857int
8858ctl_cnw(struct ctl_scsiio *ctsio)
8859{
8860 struct ctl_lun *lun;
8861 struct ctl_lba_len_flags *lbalen;
8862 uint64_t lba;
8863 uint32_t num_blocks;
8864 int fua, dpo;
8865 int retval;
8866
8867 lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
8868
8869 CTL_DEBUG_PRINT(("ctl_cnw: command: %#x\n", ctsio->cdb[0]));
8870
8871 fua = 0;
8872 dpo = 0;
8873
8874 retval = CTL_RETVAL_COMPLETE;
8875
8876 switch (ctsio->cdb[0]) {
8877 case COMPARE_AND_WRITE: {
8878 struct scsi_compare_and_write *cdb;
8879
8880 cdb = (struct scsi_compare_and_write *)ctsio->cdb;
8881
8882 if (cdb->byte2 & SRW10_FUA)
8883 fua = 1;
8884 if (cdb->byte2 & SRW10_DPO)
8885 dpo = 1;
8886 lba = scsi_8btou64(cdb->addr);
8887 num_blocks = cdb->length;
8888 break;
8889 }
8890 default:
8891 /*
8892 * We got a command we don't support. This shouldn't
8893 * happen, commands should be filtered out above us.
8894 */
8895 ctl_set_invalid_opcode(ctsio);
8896 ctl_done((union ctl_io *)ctsio);
8897
8898 return (CTL_RETVAL_COMPLETE);
8899 break; /* NOTREACHED */
8900 }
8901
8902 /*
8903 * XXX KDM what do we do with the DPO and FUA bits? FUA might be
8904 * interesting for us, but if RAIDCore is in write-back mode,
8905 * getting it to do write-through for a particular transaction may
8906 * not be possible.
8907 */
8908
8909 /*
8910 * The first check is to make sure we're in bounds, the second
8911 * check is to catch wrap-around problems. If the lba + num blocks
8912 * is less than the lba, then we've wrapped around and the block
8913 * range is invalid anyway.
8914 */
8915 if (((lba + num_blocks) > (lun->be_lun->maxlba + 1))
8916 || ((lba + num_blocks) < lba)) {
8917 ctl_set_lba_out_of_range(ctsio);
8918 ctl_done((union ctl_io *)ctsio);
8919 return (CTL_RETVAL_COMPLETE);
8920 }
8921
8922 /*
8923 * According to SBC-3, a transfer length of 0 is not an error.
8924 */
8925 if (num_blocks == 0) {
8926 ctl_set_success(ctsio);
8927 ctl_done((union ctl_io *)ctsio);
8928 return (CTL_RETVAL_COMPLETE);
8929 }
8930
8931 ctsio->kern_total_len = 2 * num_blocks * lun->be_lun->blocksize;
8932 ctsio->kern_rel_offset = 0;
8933
8934 /*
8935 * Set the IO_CONT flag, so that if this I/O gets passed to
8936 * ctl_data_submit_done(), it'll get passed back to
8937 * ctl_ctl_cnw_cont() for further processing.
8938 */
8939 ctsio->io_hdr.flags |= CTL_FLAG_IO_CONT;
8940 ctsio->io_cont = ctl_cnw_cont;
8941
8942 lbalen = (struct ctl_lba_len_flags *)
8943 &ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN];
8944 lbalen->lba = lba;
8945 lbalen->len = num_blocks;
8946 lbalen->flags = CTL_LLF_COMPARE;
8947
8948 CTL_DEBUG_PRINT(("ctl_cnw: calling data_submit()\n"));
8949 retval = lun->backend->data_submit((union ctl_io *)ctsio);
8950 return (retval);
8951}
8952
8953int
8954ctl_verify(struct ctl_scsiio *ctsio)
8955{
8956 struct ctl_lun *lun;
8957 struct ctl_lba_len_flags *lbalen;
8958 uint64_t lba;
8959 uint32_t num_blocks;
8960 int bytchk, dpo;
8961 int retval;
8962
8963 lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
8964
8965 CTL_DEBUG_PRINT(("ctl_verify: command: %#x\n", ctsio->cdb[0]));
8966
8967 bytchk = 0;
8968 dpo = 0;
8969 retval = CTL_RETVAL_COMPLETE;
8970
8971 switch (ctsio->cdb[0]) {
8972 case VERIFY_10: {
8973 struct scsi_verify_10 *cdb;
8974
8975 cdb = (struct scsi_verify_10 *)ctsio->cdb;
8976 if (cdb->byte2 & SVFY_BYTCHK)
8977 bytchk = 1;
8978 if (cdb->byte2 & SVFY_DPO)
8979 dpo = 1;
8980 lba = scsi_4btoul(cdb->addr);
8981 num_blocks = scsi_2btoul(cdb->length);
8982 break;
8983 }
8984 case VERIFY_12: {
8985 struct scsi_verify_12 *cdb;
8986
8987 cdb = (struct scsi_verify_12 *)ctsio->cdb;
8988 if (cdb->byte2 & SVFY_BYTCHK)
8989 bytchk = 1;
8990 if (cdb->byte2 & SVFY_DPO)
8991 dpo = 1;
8992 lba = scsi_4btoul(cdb->addr);
8993 num_blocks = scsi_4btoul(cdb->length);
8994 break;
8995 }
8996 case VERIFY_16: {
8997 struct scsi_rw_16 *cdb;
8998
8999 cdb = (struct scsi_rw_16 *)ctsio->cdb;
9000 if (cdb->byte2 & SVFY_BYTCHK)
9001 bytchk = 1;
9002 if (cdb->byte2 & SVFY_DPO)
9003 dpo = 1;
9004 lba = scsi_8btou64(cdb->addr);
9005 num_blocks = scsi_4btoul(cdb->length);
9006 break;
9007 }
9008 default:
9009 /*
9010 * We got a command we don't support. This shouldn't
9011 * happen, commands should be filtered out above us.
9012 */
9013 ctl_set_invalid_opcode(ctsio);
9014 ctl_done((union ctl_io *)ctsio);
9015 return (CTL_RETVAL_COMPLETE);
9016 }
9017
9018 /*
9019 * The first check is to make sure we're in bounds, the second
9020 * check is to catch wrap-around problems. If the lba + num blocks
9021 * is less than the lba, then we've wrapped around and the block
9022 * range is invalid anyway.
9023 */
9024 if (((lba + num_blocks) > (lun->be_lun->maxlba + 1))
9025 || ((lba + num_blocks) < lba)) {
9026 ctl_set_lba_out_of_range(ctsio);
9027 ctl_done((union ctl_io *)ctsio);
9028 return (CTL_RETVAL_COMPLETE);
9029 }
9030
9031 /*
9032 * According to SBC-3, a transfer length of 0 is not an error.
9033 */
9034 if (num_blocks == 0) {
9035 ctl_set_success(ctsio);
9036 ctl_done((union ctl_io *)ctsio);
9037 return (CTL_RETVAL_COMPLETE);
9038 }
9039
9040 lbalen = (struct ctl_lba_len_flags *)
9041 &ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN];
9042 lbalen->lba = lba;
9043 lbalen->len = num_blocks;
9044 if (bytchk) {
9045 lbalen->flags = CTL_LLF_COMPARE;
9046 ctsio->kern_total_len = num_blocks * lun->be_lun->blocksize;
9047 } else {
9048 lbalen->flags = CTL_LLF_VERIFY;
9049 ctsio->kern_total_len = 0;
9050 }
9051 ctsio->kern_rel_offset = 0;
9052
9053 CTL_DEBUG_PRINT(("ctl_verify: calling data_submit()\n"));
9054 retval = lun->backend->data_submit((union ctl_io *)ctsio);
9055 return (retval);
9056}
9057
9058int
8812ctl_report_luns(struct ctl_scsiio *ctsio)
8813{
8814 struct scsi_report_luns *cdb;
8815 struct scsi_report_luns_data *lun_data;
8816 struct ctl_lun *lun, *request_lun;
8817 int num_luns, retval;
8818 uint32_t alloc_len, lun_datalen;
8819 int num_filled, well_known;

--- 701 unchanged lines hidden (view full) ---

9521 if (lun != NULL)
9522 bl_ptr->device = (SID_QUAL_LU_CONNECTED << 5) |
9523 lun->be_lun->lun_type;
9524 else
9525 bl_ptr->device = (SID_QUAL_LU_OFFLINE << 5) | T_DIRECT;
9526
9527 bl_ptr->page_code = SVPD_BLOCK_LIMITS;
9528 scsi_ulto2b(sizeof(*bl_ptr), bl_ptr->page_length);
9059ctl_report_luns(struct ctl_scsiio *ctsio)
9060{
9061 struct scsi_report_luns *cdb;
9062 struct scsi_report_luns_data *lun_data;
9063 struct ctl_lun *lun, *request_lun;
9064 int num_luns, retval;
9065 uint32_t alloc_len, lun_datalen;
9066 int num_filled, well_known;

--- 701 unchanged lines hidden (view full) ---

9768 if (lun != NULL)
9769 bl_ptr->device = (SID_QUAL_LU_CONNECTED << 5) |
9770 lun->be_lun->lun_type;
9771 else
9772 bl_ptr->device = (SID_QUAL_LU_OFFLINE << 5) | T_DIRECT;
9773
9774 bl_ptr->page_code = SVPD_BLOCK_LIMITS;
9775 scsi_ulto2b(sizeof(*bl_ptr), bl_ptr->page_length);
9776 bl_ptr->max_cmp_write_len = 0xff;
9529 scsi_ulto4b(0xffffffff, bl_ptr->max_txfer_len);
9530 scsi_ulto4b(MAXPHYS / bs, bl_ptr->opt_txfer_len);
9531 if (lun->be_lun->flags & CTL_LUN_FLAG_UNMAP) {
9532 scsi_ulto4b(0xffffffff, bl_ptr->max_unmap_lba_cnt);
9533 scsi_ulto4b(0xffffffff, bl_ptr->max_unmap_blk_cnt);
9534 }
9535 scsi_u64to8b(UINT64_MAX, bl_ptr->max_write_same_length);
9536

--- 395 unchanged lines hidden (view full) ---

9932 */
9933static int
9934ctl_get_lba_len(union ctl_io *io, uint64_t *lba, uint32_t *len)
9935{
9936 if (io->io_hdr.io_type != CTL_IO_SCSI)
9937 return (1);
9938
9939 switch (io->scsiio.cdb[0]) {
9777 scsi_ulto4b(0xffffffff, bl_ptr->max_txfer_len);
9778 scsi_ulto4b(MAXPHYS / bs, bl_ptr->opt_txfer_len);
9779 if (lun->be_lun->flags & CTL_LUN_FLAG_UNMAP) {
9780 scsi_ulto4b(0xffffffff, bl_ptr->max_unmap_lba_cnt);
9781 scsi_ulto4b(0xffffffff, bl_ptr->max_unmap_blk_cnt);
9782 }
9783 scsi_u64to8b(UINT64_MAX, bl_ptr->max_write_same_length);
9784

--- 395 unchanged lines hidden (view full) ---

10180 */
10181static int
10182ctl_get_lba_len(union ctl_io *io, uint64_t *lba, uint32_t *len)
10183{
10184 if (io->io_hdr.io_type != CTL_IO_SCSI)
10185 return (1);
10186
10187 switch (io->scsiio.cdb[0]) {
10188 case COMPARE_AND_WRITE: {
10189 struct scsi_compare_and_write *cdb;
10190
10191 cdb = (struct scsi_compare_and_write *)io->scsiio.cdb;
10192
10193 *lba = scsi_8btou64(cdb->addr);
10194 *len = cdb->length;
10195 break;
10196 }
9940 case READ_6:
9941 case WRITE_6: {
9942 struct scsi_rw_6 *cdb;
9943
9944 cdb = (struct scsi_rw_6 *)io->scsiio.cdb;
9945
9946 *lba = scsi_3btoul(cdb->addr);
9947 /* only 5 bits are valid in the most significant address byte */

--- 72 unchanged lines hidden (view full) ---

10020 struct scsi_write_same_16 *cdb;
10021
10022 cdb = (struct scsi_write_same_16 *)io->scsiio.cdb;
10023
10024 *lba = scsi_8btou64(cdb->addr);
10025 *len = scsi_4btoul(cdb->length);
10026 break;
10027 }
10197 case READ_6:
10198 case WRITE_6: {
10199 struct scsi_rw_6 *cdb;
10200
10201 cdb = (struct scsi_rw_6 *)io->scsiio.cdb;
10202
10203 *lba = scsi_3btoul(cdb->addr);
10204 /* only 5 bits are valid in the most significant address byte */

--- 72 unchanged lines hidden (view full) ---

10277 struct scsi_write_same_16 *cdb;
10278
10279 cdb = (struct scsi_write_same_16 *)io->scsiio.cdb;
10280
10281 *lba = scsi_8btou64(cdb->addr);
10282 *len = scsi_4btoul(cdb->length);
10283 break;
10284 }
10285 case VERIFY_10: {
10286 struct scsi_verify_10 *cdb;
10287
10288 cdb = (struct scsi_verify_10 *)io->scsiio.cdb;
10289
10290 *lba = scsi_4btoul(cdb->addr);
10291 *len = scsi_2btoul(cdb->length);
10292 break;
10293 }
10294 case VERIFY_12: {
10295 struct scsi_verify_12 *cdb;
10296
10297 cdb = (struct scsi_verify_12 *)io->scsiio.cdb;
10298
10299 *lba = scsi_4btoul(cdb->addr);
10300 *len = scsi_4btoul(cdb->length);
10301 break;
10302 }
10303 case VERIFY_16: {
10304 struct scsi_verify_16 *cdb;
10305
10306 cdb = (struct scsi_verify_16 *)io->scsiio.cdb;
10307
10308 *lba = scsi_8btou64(cdb->addr);
10309 *len = scsi_4btoul(cdb->length);
10310 break;
10311 }
10028 default:
10029 return (1);
10030 break; /* NOTREACHED */
10031 }
10032
10033 return (0);
10034}
10035

--- 2712 unchanged lines hidden (view full) ---

12748 && (lun->be_lun->blocksize != 0))
12749 blocksize = lun->be_lun->blocksize;
12750 else
12751 blocksize = 512;
12752
12753 switch (io->io_hdr.io_type) {
12754 case CTL_IO_SCSI: {
12755 int isread;
10312 default:
10313 return (1);
10314 break; /* NOTREACHED */
10315 }
10316
10317 return (0);
10318}
10319

--- 2712 unchanged lines hidden (view full) ---

13032 && (lun->be_lun->blocksize != 0))
13033 blocksize = lun->be_lun->blocksize;
13034 else
13035 blocksize = 512;
13036
13037 switch (io->io_hdr.io_type) {
13038 case CTL_IO_SCSI: {
13039 int isread;
12756 struct ctl_lba_len *lbalen;
13040 struct ctl_lba_len_flags *lbalen;
12757
12758 isread = 0;
12759 switch (io->scsiio.cdb[0]) {
12760 case READ_6:
12761 case READ_10:
12762 case READ_12:
12763 case READ_16:
12764 isread = 1;
12765 /* FALLTHROUGH */
12766 case WRITE_6:
12767 case WRITE_10:
12768 case WRITE_12:
12769 case WRITE_16:
12770 case WRITE_VERIFY_10:
12771 case WRITE_VERIFY_12:
12772 case WRITE_VERIFY_16:
13041
13042 isread = 0;
13043 switch (io->scsiio.cdb[0]) {
13044 case READ_6:
13045 case READ_10:
13046 case READ_12:
13047 case READ_16:
13048 isread = 1;
13049 /* FALLTHROUGH */
13050 case WRITE_6:
13051 case WRITE_10:
13052 case WRITE_12:
13053 case WRITE_16:
13054 case WRITE_VERIFY_10:
13055 case WRITE_VERIFY_12:
13056 case WRITE_VERIFY_16:
12773 lbalen = (struct ctl_lba_len *)
13057 lbalen = (struct ctl_lba_len_flags *)
12774 &io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN];
12775
12776 if (isread) {
12777 lun->stats.ports[targ_port].bytes[CTL_STATS_READ] +=
12778 lbalen->len * blocksize;
12779 lun->stats.ports[targ_port].operations[CTL_STATS_READ]++;
12780
12781#ifdef CTL_TIME_IO

--- 730 unchanged lines hidden ---
13058 &io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN];
13059
13060 if (isread) {
13061 lun->stats.ports[targ_port].bytes[CTL_STATS_READ] +=
13062 lbalen->len * blocksize;
13063 lun->stats.ports[targ_port].operations[CTL_STATS_READ]++;
13064
13065#ifdef CTL_TIME_IO

--- 730 unchanged lines hidden ---