Commit Graph

3274 Commits

Author SHA1 Message Date
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
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