Commit Graph

3235 Commits

Author SHA1 Message Date
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
Vladislav Bolkhovitin
b91344f856 Fix incorrect "Access beyond the end of the device" reporting for INQUIRY on vcdroms without disk
Reported and suggested how to fix it by Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4309 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-19 03:42:57 +00:00
Vladislav Bolkhovitin
46a4e0a2ae Micro-optimization: cmd_data_descriptors_cnt isn't needed
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4308 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-18 19:50:54 +00:00
Vladislav Bolkhovitin
d0af97d3f1 scst_vdisk, CD-ROM: Change error code returned if no medium present
If my interpretation of section "6.37 TEST UNIT READY command" in SPC-4
is correct then TEST UNIT READY should report "MEDIUM NOT PRESENT" if no
medium is present instead of "LOGICAL UNIT NOT READY, AUXILIARY MEMORY
NOT ACCESSIBLE".

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4307 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-18 02:56:13 +00:00
Bart Van Assche
e28130bb2f scstadmin, FC, NPIV: Make -write_config save the "node_name" and "parent_host"
attributes.

Reported-by: Dimitri Puzin <max@psycast.de>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4306 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-17 15:08:57 +00:00
Bart Van Assche
c569b7e8a1 scstadmin: Rework r4304.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4305 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-17 12:54:42 +00:00
Bart Van Assche
00caf4d5c9 scstadmin: Make -write_config save the scst_local session name
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4304 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-17 12:18:48 +00:00
Vladislav Bolkhovitin
b0a24b829b Make qla2x00t cleanly compile on RHEL 6.2
From Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4303 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-17 01:17:09 +00:00
Vladislav Bolkhovitin
cacf9046d8 Update iSCSI HOWTO
Bring the iSCSI-SCST how-to in sync with scstadmin. Applies to trunk
and 2.2 branch.

Reported-by: Kenneth Wong <kenwong@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4302 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-17 01:10:10 +00:00
Bart Van Assche
363e1b5a05 scst_vdisk: Avoid that invalid data is returned for VPD page 0xb0 if
vdev_blockio_get_unmap_params() fails.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4301 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-15 18:38:35 +00:00
Bart Van Assche
44978416d4 ib_srpt: Slightly reduce the CPU load caused by the srpt thread(s).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4300 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-14 17:56:49 +00:00
Bart Van Assche
5256d37f42 ib_srpt: Make SCST I/O context configurable at compile time
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4299 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-14 17:42:37 +00:00
Bart Van Assche
ea47b3c059 ib_srpt: Fix spelling in a source code comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4298 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-14 15:09:36 +00:00
Bart Van Assche
f879eadf3d nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4297 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-13 18:35:57 +00:00
Vladislav Bolkhovitin
0fe0a3b839 WRITE SAME related cleanups and fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4296 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-11 23:20:19 +00:00
Vladislav Bolkhovitin
d3b4b46223 Patch improving handling of errors during passing connection to the kernel.
From Lev Vainblat <lev@zadarastorage.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4295 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-11 01:20:26 +00:00
Bart Van Assche
d9948f2922 scst: Fix recently introduced checkpatch complaints about whitespace
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4294 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-08 21:45:57 +00:00
Bart Van Assche
862d84df64 nightly build: Kernel version updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4293 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-08 21:25:00 +00:00
Bart Van Assche
0aca2096d9 scst_vdisk, kernel 2.6.32: Avoid that adding a vdisk_blockio device triggers a BUG()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4292 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-08 21:09:40 +00:00
Vladislav Bolkhovitin
79b72d5606 Web updates: on Emulex request remove all references to it.
For more details see http://sourceforge.net/mailarchive/forum.php?thread_name=4FA2A8F0.9070703%40emulex.com&forum_name=scst-devel



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4291 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-08 01:48:49 +00:00
Vladislav Bolkhovitin
3b57904da6 Unify parsing of descriptors-based and internal commands
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4290 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-07 22:39:54 +00:00
Bart Van Assche
7596ffd7dd ib_srpt: Reduce RDMA_COMPL_TIMEOUT_S back to its original value now that read and write processing happens again on the context of the SCST command threads instead of the srpt completion thread
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4289 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-07 14:59:57 +00:00
Vladislav Bolkhovitin
74e1d9884c Small comments clarification
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4286 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-04 22:23:59 +00:00
Bart Van Assche
48fc76ecb4 ib_srpt: Revert most of r4282 - a channel must be added to the channel list before unlocking the spinlock such that the completion thread can safely invoke list_del()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4284 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-04 17:18:22 +00:00
Bart Van Assche
1baaaea48b ib_srpt: Test earlier during login whether a port has been disabled
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4282 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-04 13:49:04 +00:00
Bart Van Assche
4b47a45373 ib_srpt: Make the login log line easier to read
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4281 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-04 13:45:25 +00:00
Bart Van Assche
8f334bd78e ib_srpt: Fix a few (theoretical ?) race conditions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4278 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-03 11:00:39 +00:00
Bart Van Assche
30cfdfd079 ib_srpt, Testing.txt: Add a test
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4277 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-03 09:55:41 +00:00
Bart Van Assche
5496aa9c2d ib_srpt, Testing.txt: Add a test
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4276 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-03 09:03:09 +00:00