Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tcm_loop: bump max_sectors

There is not reason to artifically limit max_sectors in tcm_loop, set
it to UINT_MAX to allow stressing the large I/O handling in the target
core using the loopback driver. Also remove various superflous defines
hiding the values set in the host template.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>

authored by

Christoph Hellwig and committed by
Nicholas Bellinger
2e88efd3 0877eafd

+5 -14
+4 -4
drivers/target/loopback/tcm_loop.c
··· 416 416 .queuecommand = tcm_loop_queuecommand, 417 417 .change_queue_depth = tcm_loop_change_queue_depth, 418 418 .eh_device_reset_handler = tcm_loop_device_reset, 419 - .can_queue = TL_SCSI_CAN_QUEUE, 419 + .can_queue = 1024, 420 420 .this_id = -1, 421 - .sg_tablesize = TL_SCSI_SG_TABLESIZE, 422 - .cmd_per_lun = TL_SCSI_CMD_PER_LUN, 423 - .max_sectors = TL_SCSI_MAX_SECTORS, 421 + .sg_tablesize = 256, 422 + .cmd_per_lun = 1024, 423 + .max_sectors = 0xFFFF, 424 424 .use_clustering = DISABLE_CLUSTERING, 425 425 .slave_alloc = tcm_loop_slave_alloc, 426 426 .slave_configure = tcm_loop_slave_configure,
+1 -10
drivers/target/loopback/tcm_loop.h
··· 1 1 #define TCM_LOOP_VERSION "v2.1-rc1" 2 2 #define TL_WWN_ADDR_LEN 256 3 3 #define TL_TPGS_PER_HBA 32 4 - /* 5 - * Defaults for struct scsi_host_template tcm_loop_driver_template 6 - * 7 - * We use large can_queue and cmd_per_lun here and let TCM enforce 8 - * the underlying se_device_t->queue_depth. 9 - */ 10 - #define TL_SCSI_CAN_QUEUE 1024 11 - #define TL_SCSI_CMD_PER_LUN 1024 12 - #define TL_SCSI_MAX_SECTORS 1024 13 - #define TL_SCSI_SG_TABLESIZE 256 4 + 14 5 /* 15 6 * Used in tcm_loop_driver_probe() for struct Scsi_Host->max_cmd_len 16 7 */