scst_user: avoid global locks

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6221 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2015-06-06 04:35:06 +00:00
parent 62fcbdc434
commit d1bd22afd9
3 changed files with 42 additions and 161 deletions
+6 -10
View File
@@ -151,16 +151,8 @@ function, or close on its file descriptor.
<sect1> SCST_USER_UNREGISTER_DEVICE
<p>
SCST_USER_UNREGISTER_DEVICE unregisters the corresponding virtual user
space device. It doesn't have any parameters.
During execution of SCST_USER_UNREGISTER_DEVICE at least one another
thread must process all coming subcommands, otherwise after timeout it
will fail with EBUSY error. The processing should stop on receiving
ENODEV error.
SCST_USER_UNREGISTER_DEVICE returns 0 on success or -1 in case of error,
and errno is set appropriately.
SCST_USER_UNREGISTER_DEVICE is obsolete and should not be used. Just
close the device's fd instead.
<sect1> SCST_USER_SET_OPTIONS/SCST_USER_GET_OPTIONS
@@ -290,6 +282,10 @@ thread, which also handles incoming commands, otherwise there could be a
but nobody handles them. This "deadlock" will be resolved only when
initiator, which sent those commands, aborts them after timeout.
<bf/IMPORTANT!/ It is duty of the caller to serialize
SCST_USER_SET_OPTIONS invocations. The kernel code does not have any
locking around modifying above properties.
<sect1> SCST_USER_REPLY_AND_GET_CMD