_syswrite() callers check whether writing into an SCST sysfs attribute
succeeded by checking whether the value returned by this function is
defined(). Return undef (failed) instead of -1 (success) if syswrite()
returned error code EBUSY (found this through source reading). Return
$length instead of length($cmd) if the initial write triggered EAGAIN.
Remove a superfluous $bytes = undef statement. Eliminate the variable
$wait.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4400 d57e44dd-8a1f-0410-8b47-8ef2f437770f
SCST allows SCSI pass-through to SCSI devices registered with the SCSI
initiator core. SCST I/O activity has to be suspended before a LUN
that corresponds to such a SCSI device can be removed safely. Do not
suspend I/O when a SCSI device is being removed that has not been
exported as an SCST LUN such that removal of such devices does not
slow down I/O.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4399 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Hash signs have to be specified in scst.conf when using the per_portal_acl=1
feature of iSCSI-SCST in combination with LUN masking. Make scstadmin not
consider hash signs preceded by a backslash as the start of a comment. Escape
backslashes and hash signs when writing out scst.conf.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4391 d57e44dd-8a1f-0410-8b47-8ef2f437770f
The attached patch prevents that a kernel oops is triggered if something
fails when adding a session to sysfs.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4388 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Although I do not know of any initiator that asks for the extended
parameter data format when submitting a REPORT TARGET PORT GROUPS
command, I think it's a good idea to support that data format (i.e.
three most significant bits of the second CDB byte are 001 instead
of 000). The attached patch should implement that. Additionally,
cmd->op_name is set to something more descriptive than
"MAINTENANCE IN" in that patch.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4385 d57e44dd-8a1f-0410-8b47-8ef2f437770f
The value of the variable allocation_length is identical to the value of the
variable buf_len. Hence eliminate the former. Also, for MAINTENANCE(IN)
cdb_len is always equal to 12 so the test "cdb_len > 1" can be eliminated too.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4382 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Other changes:
- Bring the scst_scsi_op_table[] header in sync with <scsi/scsi.h>
- Fix parsing of the REPORT IDENTIFYING INFORMATION command: it has a four-byte
length field instead of a two-byte length field.
- Fix devkey for other MAINTENANCE IN commands.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4366 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Cleanup and prepare the FIS index before issuing the ATA command (during prep:
mvs_task_prep_ata). This is to overcome the drive detection issue where the
SATA drives fail to get detected during hotplug since the ATA module (libATA)
detects errors set in the FIS even though the SATA analyzer shows that the
IDENTIFY command was successful.
This patch was provided by Praveen Murali <pmurali@logicube.com>.
Compared to the original patch, the changelog entry has been reformatted,
two spelling errors in comments has been fixed and fixed a checkpatch
complaint has been fixed too.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4364 d57e44dd-8a1f-0410-8b47-8ef2f437770f