target: Untangle front-end and back-end meanings of max_sectors attribute
authorRoland Dreier <roland@purestorage.com>
Tue, 14 Feb 2012 00:18:17 +0000 (16:18 -0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sat, 25 Feb 2012 22:37:49 +0000 (14:37 -0800)
commit015487b89f27d91d95a056cdc3c85e6c729bff12
tree0cecb2acc903154e25abb23e8f345f301fcd1ef5
parenteffc6cc8828257c32c37635e737f14fd6e19ecd7
target: Untangle front-end and back-end meanings of max_sectors attribute

se_dev_attrib.max_sectors currently has two independent meanings:

 - It is reported in the block limits VPD page as the maximum transfer
   length, ie the largest IO that the front-end (fabric) can handle.
   Also the target core doesn't enforce this maximum transfer length.

 - It is used to hold the size of the largest IO that the back-end can
   handle, so we know when to split SCSI commands into multiple tasks.

Fix this by adding a new se_dev_attrib.fabric_max_sectors to hold the
maximum transfer length, and checking incoming IOs against that limit.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_cdb.c
drivers/target/target_core_configfs.c
drivers/target/target_core_device.c
drivers/target/target_core_internal.h
drivers/target/target_core_transport.c
include/target/target_core_base.h
This page took 0.028033 seconds and 5 git commands to generate.