Commit Graph

3301 Commits

Author SHA1 Message Date
Vladislav Bolkhovitin
408b67c80f Make invalid LUN message more comprehensive
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4407 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-17 20:09:37 +00:00
Bart Van Assche
6cfe427617 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4406 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-14 15:03:21 +00:00
Vladislav Bolkhovitin
7cde5841a8 Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4405 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-13 21:53:44 +00:00
Vladislav Bolkhovitin
260c6cb1f8 Fix incorrect completion function dereference.
Reported by Thomas Lau <Thomas.Lau@principleone.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4404 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-13 21:39:30 +00:00
Bart Van Assche
bbc726fdea nightly build: Update Linux kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4403 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-12 05:54:27 +00:00
Bart Van Assche
d0745d1a16 scst: Fix WRITE FILEMARKS parsing
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4402 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-09 06:22:48 +00:00
Bart Van Assche
bcc952a765 scst: Add support for SECURITY PROTOCOL IN and OUT
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4401 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-09 06:19:38 +00:00
Bart Van Assche
95246ee9d7 scstadmin: Make _syswrite() translate EBUSY into "writing failed"
_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
2012-07-09 06:12:47 +00:00
Vladislav Bolkhovitin
39e304dc76 scst: Don't suspend activity during removal of a SCSI device
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
2012-07-09 00:24:51 +00:00
Vladislav Bolkhovitin
68662e9fbd Fix data direction of RECEIVE COPY RESULT command
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4398 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-09 00:21:40 +00:00
Bart Van Assche
ac2a3aad90 scst: Remove spaces in front of tabs because checkpatch complains about these. This is a whitespace-only change.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4397 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-07 06:33:46 +00:00
Bart Van Assche
d89d3fae83 Follow-up for r4395: Make SCST build again on pre-2.6.38 kernels
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4396 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-07 06:30:50 +00:00
Vladislav Bolkhovitin
df4d0f9dad Fix ALLOW COMMANDS field of PERSISTENT RESERVE IN REPORT CAPABILITIES handling according to SPC-4 suggestions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4395 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-06 19:57:48 +00:00
Vladislav Bolkhovitin
64be93db95 scst: Fix sysfs code for parsing parameters when adding or replacing a LUN
Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4394 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-06 03:02:42 +00:00
Vladislav Bolkhovitin
a17349c566 scst: Parse REQUEST VOLUME ELEMENT ADDRESS correctly
Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4393 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-06 02:44:53 +00:00
Vladislav Bolkhovitin
16d0b30bc8 Cleanup: let's have a dedicate CDB flag to mark CDBs without LBA instead of relying on lba_off = 0.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4392 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-29 22:31:13 +00:00
Bart Van Assche
db5b92274a scstadmin: Allow hash signs to be escaped
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
2012-06-29 13:43:36 +00:00
Bart Van Assche
d811c1374c nightly build: Disable x86_32 mode in kernel config
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4390 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-29 06:25:16 +00:00
Vladislav Bolkhovitin
a7a24d6dab scst: Remove a superfluous goto statement and a superfluous label
Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4389 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-28 23:31:07 +00:00
Vladislav Bolkhovitin
c531f06b32 scst: sysfs session creation error path fix
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
2012-06-28 22:43:19 +00:00
Vladislav Bolkhovitin
e80a15bfd3 scst_assign_dev_handler(): detach if attach only succeeded partially
Partial attach failure should result in calling detach for those handlers
for which attach succeeded

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4387 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-28 22:35:49 +00:00
Vladislav Bolkhovitin
2fc379e221 scst: Make extra_tgt_dev_list_entry users hold scst_mutex
Because it's used in 3 places not othrewise synchronized

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4386 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-28 22:32:03 +00:00
Vladislav Bolkhovitin
b25cb2a7e5 scst: Fix MAINTENANCE IN parsing
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
2012-06-28 22:27:51 +00:00
Bart Van Assche
85b11f9ced nightly build: Invoke all scripts from the same directory
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4384 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-28 11:32:48 +00:00
Bart Van Assche
971c23a4dd scst: Remove a superfluous test from the REPORT TARGET PORT GROUPS implementation
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4383 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-28 11:31:13 +00:00
Bart Van Assche
95bc9b68ff scst: Simplify REPORT TARGET PORT GROUPS implementation
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
2012-06-28 11:28:18 +00:00
Bart Van Assche
26a74cebe8 fcst: Build fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4381 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-28 06:28:37 +00:00
Vladislav Bolkhovitin
8e093c8367 Remove wrong check, which can lead to missed lock unlock
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4380 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-28 01:48:19 +00:00
Bart Van Assche
e8f04d3f1c scripts/specialize-patch: Avoid that joining two lines generates a space in front of a tab.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4379 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-27 05:30:53 +00:00
Bart Van Assche
a4c70b8126 Use rcu_dereference_protected to tell rcu that the ft_lport_lock
is held during ft_lport_create. This resolved "suspicious RCU usage"
warnings when debugging options are turned on.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4378 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-27 05:11:20 +00:00
Vladislav Bolkhovitin
10ffe6d620 scst/sysfs: Introduce scst_tgt_find_acg()
Call scst_tgt_find_acg() instead of iterating explicitly over the ACG list.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4377 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-26 18:59:21 +00:00
Bart Van Assche
a5a5e4a1e3 scst: Rework r4372 such that fileio_tgt builds again
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4376 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-26 06:15:03 +00:00
Bart Van Assche
d52dc638a3 scst: Convert a C99 comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4375 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-25 06:33:11 +00:00
Bart Van Assche
223d929b0d nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4374 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-24 06:20:59 +00:00
Bart Van Assche
44df4a03b6 ib_srpt: Document InfiniBand partition key choice
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4373 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-22 11:58:43 +00:00
Bart Van Assche
1a8a37a9da nightly build: Fix 2.6.35.14-u-nc too
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4372 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-21 08:54:33 +00:00
Bart Van Assche
f9caa65e7c Builds again against kernel 2.6.37 and earlier
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4371 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-21 06:25:58 +00:00
Bart Van Assche
1739e7bc3b nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4370 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-20 18:55:32 +00:00
Vladislav Bolkhovitin
ca2aa8d3e7 scst pr: Check buffer size before reading from that buffer
From: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4368 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-20 02:08:09 +00:00
Vladislav Bolkhovitin
b3855a377f scst: Remove a superfluous assignment from scst_register_virtual_device()
Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4367 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-20 02:05:45 +00:00
Vladislav Bolkhovitin
93a61d7e6f Fix REPORT TARGET PORTAL GROUPS parsing
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
2012-06-20 02:02:53 +00:00
Vladislav Bolkhovitin
571dde6ba3 Some cleanups to make the code more readable
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4365 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-20 02:00:43 +00:00
Bart Van Assche
eaec88ff94 mvsas_tgt: SATA hotplug fix
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
2012-06-19 18:09:32 +00:00
Bart Van Assche
47b2487b94 ib_srpt: Fix a checkpatch complaint
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4363 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-19 07:26:24 +00:00
Bart Van Assche
f53d181d40 ib_srpt: Fix procfs build
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4362 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-19 06:23:21 +00:00
Bart Van Assche
a951696f3c ib_srpt README: Fix a typo
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4355 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-18 12:11:34 +00:00
Bart Van Assche
bef07c9d31 ib_srpt: Add one target per port support. Makes it possible to configure LUN
masking per IB HCA port instead of per HCA, just like what is possible with FC.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4354 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-18 12:10:53 +00:00
Bart Van Assche
178d0bd692 ib_srpt: Remove a superfluous comparison statement
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4353 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-18 11:27:02 +00:00
Bart Van Assche
a30d8b64ac ib_srpt README: Bring in sync with scstadmin documentation
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4352 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-18 11:24:57 +00:00
Bart Van Assche
a8a8777acb scst: Kernel 2.6.32 build fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4351 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-15 08:13:05 +00:00