• Nicholas Bellinger's avatar
    target: Check -ENOMEM to signal QUEUE_FULL from fabric callbacks · f147abb4
    Nicholas Bellinger authored
    This patch changes target core to also check for -ENOMEM from fabric callbacks
    to signal QUEUE_FULL status, instead of just -EAGAIN in order to catch a
    larger set of fabric failure cases that want to trigger QUEUE_FULL logic.
    This includes the callbacks for ->write_pending(), ->queue_data_in() and
    ->queue_status().
    
    It also makes transport_generic_write_pending() return zero upon QUEUE_FULL,
    and removes two unnecessary -EAGAIN checks to catch write pending QUEUE_FULL
    cases from transport_generic_new_cmd() failures in transport_handle_cdb_direct()
    and transport_processing_thread():TRANSPORT_NEW_CMD_MAP state.
    Reported-by: default avatarBart Van Assche <bvanassche@acm.org>
    Cc: Bart Van Assche <bvanassche@acm.org>
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: Roland Dreier <roland@purestorage.com>
    Signed-off-by: default avatarNicholas A. Bellinger <nab@linux-iscsi.org>
    f147abb4
target_core_transport.c 126 KB