]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
target/tcm_loop: Make TMF processing slightly faster
authorBart Van Assche <bart.vanassche@sandisk.com>
Tue, 23 May 2017 23:48:42 +0000 (16:48 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 7 Jul 2017 06:11:25 +0000 (23:11 -0700)
commit4c1f0e65397f4e5768b955c32489d5b4b6b92a90
tree3253af4701f701b736e5b784bc4eb91d8ee5127f
parent75f141aaf48e13812b4fee914a66f6fce28b543f
target/tcm_loop: Make TMF processing slightly faster

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: Bart 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: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/loopback/tcm_loop.c