mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-15 19:56:19 +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:
@@ -997,6 +997,19 @@ struct scst_tgt_template {
|
||||
*/
|
||||
ssize_t (*mgmt_cmd) (char *cmd);
|
||||
|
||||
/*
|
||||
* Forcibly close a session. Note: this function may operate
|
||||
* asynchronously - there is no guarantee the session will actually
|
||||
* have been closed at the time this function returns. May be called
|
||||
* with scst_mutex held. Activity may be suspended while this function
|
||||
* is invoked. May sleep but must not wait until session
|
||||
* unregistration finished. Must return 0 upon success and -EINTR if
|
||||
* the session has not been closed because a signal has been received.
|
||||
*
|
||||
* OPTIONAL
|
||||
*/
|
||||
int (*close_session)(struct scst_session *sess);
|
||||
|
||||
/*
|
||||
* Should return physical transport version. Used in the corresponding
|
||||
* INQUIRY version descriptor. See SPC for the list of available codes.
|
||||
|
||||
Reference in New Issue
Block a user