• Nicholas Bellinger's avatar
    target: Avoid DataIN transfers for non-GOOD SAM status · 4347ab5a
    Nicholas Bellinger authored
    This patch modifies existing transport_complete_*() code
    to avoid invoking target_core_fabric_ops->queue_data_in()
    driver callbacks for I/O READs with non-GOOD SAM status.
    
    Some initiators expect GOOD status when a DATA-IN payload
    transfer is involved, so to be safe go ahead and always
    invoke target_core_fabric_ops->queue_status() to generate
    fabric responses instead.
    
    Note this is a prerequisite for IBLOCK supporting retriable
    status, so SAM_STAT_BUSY + SAM_STAT_TASK_SET_FULL always
    generates fabric driver responses instead of initiating
    DataIN payload transfer when non-GOOD status is present
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    Cc: Hannes Reinecke <hare@suse.de>
    Cc: Sagi Grimberg <sagig@mellanox.com>
    Cc: Andy Grover <agrover@redhat.com>
    Cc: Mike Christie <mchristi@redhat.com>
    Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    4347ab5a
target_core_transport.c 83.5 KB