Commit Graph

3263 Commits

Author SHA1 Message Date
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
Bart Van Assche
a3d6a271db nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4350 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-15 06:37:33 +00:00
Bart Van Assche
74ef459092 scst: Fix build on 2.6.31 and earlier kernels
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4349 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-15 06:35:54 +00:00
Vladislav Bolkhovitin
c770a04b0c GET LBA STATUS placeholder added
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4348 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-14 19:11:16 +00:00
Bart Van Assche
82579befad Builds again on kernel 2.6.32
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4345 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-12 09:56:54 +00:00
Vladislav Bolkhovitin
fa608d886b Fix a 3.4 kernel compilation warning
Since kernel 3.4 the two-argument form of kmap() is deprecated and
triggers a compiler warning. Hence invoke kmap() with a single argument
on kernel 3.4 and later.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4344 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-11 19:40:49 +00:00
Vladislav Bolkhovitin
7eff3c8e47 Fix O_DSYNC constant not available on kernels below 2.6.32 issue as suggested by Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4343 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-11 19:19:14 +00:00
Vladislav Bolkhovitin
2e8ee2d548 Cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4342 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-11 19:11:45 +00:00
Vladislav Bolkhovitin
f7627f7e67 Fix recent READ CAPACITY(10) regression.
Also increase NULLIO devices size to be able to test it.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4341 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-11 19:10:29 +00:00
Vladislav Bolkhovitin
53e5d30b21 Cleanup forgotten debug bits
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4340 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-08 17:17:51 +00:00
Vladislav Bolkhovitin
f42eb4ea67 Cleanup: CDROMs don't support the same mode pages as disks
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4339 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-08 17:12:58 +00:00
Bart Van Assche
0f4fe4623d rebuild-rhel-kernel-rpm: Add support for the 2.6.32-220.* kernels
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4338 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-08 14:22:49 +00:00
Vladislav Bolkhovitin
11dd7dc766 wt_flag handling fixes and improvements
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4337 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-07 23:26:07 +00:00
Vladislav Bolkhovitin
f2cd99e2df Cleanup: those functions should belong to the common lib
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4336 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-06 01:45:47 +00:00
Vladislav Bolkhovitin
201adc197b Follow up for r4334
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4335 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-06 01:15:31 +00:00
Vladislav Bolkhovitin
27f0a660e4 SCSI cleanups and improvements
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4334 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-06 01:11:09 +00:00
Bart Van Assche
d8218039b0 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4333 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-05 12:40:26 +00:00
Vladislav Bolkhovitin
1bcac49c68 scst pr: Use fdatasync() instead of fsync()
Synchronizing the file contents is sufficient - it is not necessary
to synchronize metadata like atime and mtime after having saved
persistent reservation information.

A more clear explanation of what "datasync" means can be found here
http://linux.die.net/man/2/fdatasync:

<quote>
fdatasync() is similar to fsync(), but does not flush modified metadata
unless that metadata is needed in order to allow a subsequent data
retrieval to be correctly handled. For example, changes to st_atime or
st_mtime (respectively, time of last access and time of last
modification; see stat(2)) do not require flushing because they are not
necessary for a subsequent data read to be handled correctly. On the
other hand, a change to the file size (st_size, as made by say
ftruncate(2)), would require a metadata flush.

The aim of fdatasync() is to reduce disk activity for applications that
do not require all metadata to be synchronized with the disk.
</quote>

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4332 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-02 04:11:42 +00:00
Vladislav Bolkhovitin
4748550b3a scst pr: Simplifyscst_pr_sync_device_file()
Remove a superfluous if-test.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4331 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-31 02:37:59 +00:00
Vladislav Bolkhovitin
bb9d67ba85 Use kasprintf() instead of kmalloc() + snprintf().
Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4330 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-31 02:36:05 +00:00
Vladislav Bolkhovitin
f4d60cb1df Correct NACA not supported sense to be as requested by SAM
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4329 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-31 02:35:22 +00:00
Bart Van Assche
f153190fc3 SCST README: Fix a typo in an example in the ALUA section.
Reported by: Curtis Maloney <curtis@tinbrain.net>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4328 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-30 14:37:51 +00:00
Bart Van Assche
0eaf4ae3d9 SCST README: Add a clarification in the ALUA section
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4327 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-29 13:58:05 +00:00
Vladislav Bolkhovitin
06b0e944e1 scst: Parse ATA pass-through CDBs
Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4326 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-25 19:09:36 +00:00
Vladislav Bolkhovitin
ab9478776d Cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4325 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-25 18:52:02 +00:00
Bart Van Assche
92fdb23069 SCST README: Add two clarifications in the section about ALUA
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4324 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-25 08:52:06 +00:00
Bart Van Assche
c01f1df86a SCST README: Fix spelling errors found by aspell
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4323 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-25 08:39:23 +00:00
Bart Van Assche
d7104408eb nightly build: Add kernel 3.4
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4322 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-24 19:56:09 +00:00
Bart Van Assche
1b159eec24 nightly build: Add kernel 3.4 build infrastructure
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4321 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-24 19:52:39 +00:00
Vladislav Bolkhovitin
564b36903b Update for kernel 3.4
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4320 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-24 18:56:44 +00:00
Vladislav Bolkhovitin
bbe4224615 Cleanup and fix of data overrite with WRITE SAME
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4319 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-23 22:54:47 +00:00
Vladislav Bolkhovitin
5221238b13 Fix strtoul() overflow handling
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4318 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-23 21:41:45 +00:00
Vladislav Bolkhovitin
ce8e98dd45 Fix not zero-copy build
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4317 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-23 21:04:36 +00:00
Bart Van Assche
b3020e7e92 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4316 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-23 14:39:27 +00:00
Bart Van Assche
065a1d7529 ib_srpt: Add a comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4315 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-23 08:24:05 +00:00
Bart Van Assche
907bc8222d ib_srpt: Make sure that a DREP is sent to the initiator if a DREQ is received while a session is being closed
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4313 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-23 07:32:02 +00:00
Vladislav Bolkhovitin
42d320f400 Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4312 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-22 01:13:20 +00:00
Vladislav Bolkhovitin
b2a7517ef5 Fix wrong order of delay calculation
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4311 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-21 23:23:53 +00:00
Bart Van Assche
d99379104b ib_srpt, procfs: Fix a compiler warning introduced in r4260
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4310 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-19 08:12:07 +00:00