From 11e764bd5ed4bb930e0ec5dd161df58307507347 Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger Date: Wed, 9 May 2012 12:42:09 -0700 Subject: target: Remove max_sectors device attribute for modern se_task less code This patch removes the original usage of dev_attr->max_sectors in favor of dev_attr->hw_max_sectors that is now being enforced by target core from within transport_generic_cmd_sequencer() for SCF_SCSI_DATA_SG_IO_CDB ops. After the recent se_task removal patches from hch, this value for IBLOCK backends being set via configfs by userspace from an saved max_sectors value that is turning out to be problematic, so it makes sense to go ahead and remove this now legacy attribute all-together. This patch also continues to make se_dev_set_default_attribs() do (sectors / block_size) alignment for what actually get used by target_core_mod to be safe here, following the same alignment currently used by fabric_max_sectors. Reported-by: Andy Grover Cc: Christoph Hellwig Cc: Roland Dreier Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_cdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/target/target_core_cdb.c') diff --git a/drivers/target/target_core_cdb.c b/drivers/target/target_core_cdb.c index 22cf44cf43ac..9888693a18fe 100644 --- a/drivers/target/target_core_cdb.c +++ b/drivers/target/target_core_cdb.c @@ -458,7 +458,7 @@ target_emulate_evpd_b0(struct se_cmd *cmd, unsigned char *buf) * Set MAXIMUM TRANSFER LENGTH */ max_sectors = min(dev->se_sub_dev->se_dev_attrib.fabric_max_sectors, - dev->se_sub_dev->se_dev_attrib.max_sectors); + dev->se_sub_dev->se_dev_attrib.hw_max_sectors); put_unaligned_be32(max_sectors, &buf[8]); /* -- cgit