• Roland Dreier's avatar
    target: Untangle front-end and back-end meanings of max_sectors attribute · 015487b8
    Roland Dreier authored
    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: default avatarRoland Dreier <roland@purestorage.com>
    Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    015487b8
target_core_base.h 27.4 KB