mirror of
https://github.com/SCST-project/scst.git
synced 2026-09-08 09:07:12 +00:00
Make it possible to forcibly close SRP and FC sessions via sysfs
That patch contains the following changes: * Move the code for creating a "close_sess" sysfs attribute from iscsi-scst to the SCST core such that it becomes available for other target drivers. This does not change the functionality of iscsi-scst. * Add code in ib_srpt and qla2x00t to allow a session to be forcibly closed from user space. Signed-off-by: Bart Van Assche <bvanassche@acm.org> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4852 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -3528,6 +3528,14 @@ static int srpt_detect(struct scst_tgt_template *tp)
|
||||
return device_count;
|
||||
}
|
||||
|
||||
static int srpt_close_session(struct scst_session *sess)
|
||||
{
|
||||
struct srpt_rdma_ch *ch = scst_sess_get_tgt_priv(sess);
|
||||
|
||||
srpt_close_ch(ch);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int srpt_ch_list_empty(struct srpt_tgt *srpt_tgt)
|
||||
{
|
||||
int res;
|
||||
@@ -3752,6 +3760,7 @@ static struct scst_tgt_template srpt_template = {
|
||||
.on_hw_pending_cmd_timeout = srpt_pending_cmd_timeout,
|
||||
.on_free_cmd = srpt_on_free_cmd,
|
||||
.task_mgmt_fn_done = srpt_tsk_mgmt_done,
|
||||
.close_session = srpt_close_session,
|
||||
.get_initiator_port_transport_id = srpt_get_initiator_port_transport_id,
|
||||
.get_scsi_transport_version = srpt_get_scsi_transport_version,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user