• Bart Van Assche's avatar
    target/tcm_loop: Make TMF processing slightly faster · 4c1f0e65
    Bart Van Assche authored
    Target drivers must guarantee that struct se_cmd and struct se_tmr_req
    exist as long as target_tmr_work() is in progress. This is why the
    tcm_loop driver today passes 1 as second argument to
    transport_generic_free_cmd() from inside the TMF code. Instead of
    making the TMF code wait, make the TMF code obtain two references
    (SCF_ACK_KREF) and drop one reference from inside the .check_stop_free()
    callback.
    Signed-off-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: Hannes Reinecke <hare@suse.com>
    Cc: David Disseldorp <ddiss@suse.de>
    Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    4c1f0e65
tcm_loop.c 32.2 KB