Commit Graph

4001 Commits

Author SHA1 Message Date
Vladislav Bolkhovitin
1dca2eb45a vdisk_blockio: Add VERIFY implementation
There is already an implementation of the VERIFY command for vdisk_fileio
devices. Add an implementation for vdisk_blockio devices.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5333 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-15 01:44:35 +00:00
Vladislav Bolkhovitin
f9ad2fcf8c vdisk_blockio: Change default vendor name back to "SCST_BIO"
In r5316 the default vendor name for vdisk_blockio devices was changed
into "SCST_FIO". Change this back into "SCST_BIO".

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5332 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-15 01:42:06 +00:00
Vladislav Bolkhovitin
b76d2036f2 scst_vdisk: Remove an unused parameter from vdisk_fsync*()
The "struct vdisk_cmd_params *p" parameter is neither used by vdisk_fsync(),
vdisk_fsync_blockio() nor by vdisk_fsync_fileio() so remove it.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5331 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-15 01:40:57 +00:00
Vladislav Bolkhovitin
354a396cd4 Implement REPORT SUPPORTED TASK MANAGEMENT FUNCTIONS command
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5330 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-15 01:38:37 +00:00
Vladislav Bolkhovitin
8680f05aac Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5329 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-15 01:38:06 +00:00
Vladislav Bolkhovitin
1583b1021f Update link to Gentoo HOWTO from Jurie Botha
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5326 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-13 03:50:37 +00:00
Bart Van Assche
7a7e255878 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5325 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-08 13:30:29 +00:00
Vladislav Bolkhovitin
59399c2471 PERSISTENT RESERVE IN: Suppress a kernel warning for small output buffer sizes
This patch suppresses the following error message and kernel warning:

scst: ***ERROR***: Too big response data len 24 (max 8), limiting it to the max (dev iis)
Call Trace:
 [<ffffffff818b1193>] ? dump_stack+0x41/0x56
 [<ffffffffa01c1a8f>] ? scst_set_resp_data_len+0x82/0xb1 [scst]
 [<ffffffffa01ca80f>] ? scst_pr_read_reservation+0xbf/0xc4 [scst]
 [<ffffffffa01b707b>] ? scst_persistent_reserve_in_local+0x140/0x1ce [scst]
 [<ffffffffa01b7cee>] ? scst_exec_check_blocking+0x57/0xf1 [scst]
 [<ffffffffa01b85f4>] ? scst_process_active_cmd+0x86c/0x136f [scst]
 [<ffffffffa01b913c>] ? scst_do_job_active+0x45/0x5b [scst]
 [<ffffffffa01b939c>] ? scst_cmd_thread+0x218/0x2b7 [scst]
 [<ffffffff8105292a>] ? wake_up_bit+0x23/0x23
 [<ffffffffa01b9184>] ? scst_cmd_tasklet+0x32/0x32 [scst]
 [<ffffffff81052355>] ? kthread_freezable_should_stop+0x51/0x51
 [<ffffffffa01b9184>] ? scst_cmd_tasklet+0x32/0x32 [scst]
 [<ffffffff81052400>] ? kthread+0xab/0xb3
 [<ffffffff81052355>] ? kthread_freezable_should_stop+0x51/0x51
 [<ffffffff818b4e3c>] ? ret_from_fork+0x7c/0xb0
 [<ffffffff81052355>] ? kthread_freezable_should_stop+0x51/0x51

Reported-by: Roman Bogdanov <bogdanovr@gmail.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5324 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-07 04:02:39 +00:00
Bart Van Assche
8428129d93 scst_vdisk: Avoid that smatch complains about unreachable code
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5323 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-06 07:29:00 +00:00
Vladislav Bolkhovitin
917dad5fed scst_vdisk: Make vdisk_nullio size configurable
Keep the default size of vdisk_nullio devices at VDISK_NULLIO_SIZE. Add
a sysfs attribute 'size' which is the size of a vdisk device in
bytes. Make the size of vdisk_nullio devices configurable. Accept
"size" and "size_mb" as creation parameters for vdisk_nullio
devices. Generate a CAPACITY DATA HAS CHANGED unit attention after size
changes. Refuse any attempt to change the size into a number that is
not a multiple of the block size.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5322 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-05 03:27:21 +00:00
Bart Van Assche
95897d700e Documentation spelling fix: change INQUERY into INQUIRY
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5320 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-02 08:49:50 +00:00
Vladislav Bolkhovitin
312c7d85d6 scst_vdisk: Make vendor, product ID and related fields configurable via sysfs
Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5316 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-26 02:49:38 +00:00
Vladislav Bolkhovitin
d59230f2fd Make internal memory layout more cache friendly
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5315 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-26 02:32:39 +00:00
Bart Van Assche
5bb79dd23e nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5312 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-25 10:59:54 +00:00
Bart Van Assche
77f366ba08 nightly build: Add support for kernels >= 3.10.30 and >= 3.12.11
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5311 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-25 10:58:08 +00:00
Bart Van Assche
cbb8071e73 put_page_callback-3.10.30.patch: Add
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5310 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-25 10:57:27 +00:00
Bart Van Assche
493f498b7b put_page_callback-3.12.11.patch: Add
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5309 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-25 10:55:36 +00:00
Bart Van Assche
93b4c863dc scst_local: Add newline to sysfs output
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
[bvanassche: Reduced source code line length to 80 columns]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5308 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-24 07:39:45 +00:00
Bart Van Assche
e4ab729b48 make rpm: Do not remove rpmbuilddir
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5307 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-24 07:30:50 +00:00
Bart Van Assche
a8a71bf610 Spelling fix: initator -> initiator
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5306 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-24 06:56:44 +00:00
Bart Van Assche
4270aa4486 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5305 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-24 06:56:05 +00:00
Bart Van Assche
3502ea36a4 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5304 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-21 10:09:45 +00:00
Bart Van Assche
7730ccfe90 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5303 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-21 10:02:11 +00:00
Bart Van Assche
b1ab9ed63a nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5302 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-21 07:48:21 +00:00
Bart Van Assche
086744df29 nightly build: Add support for the put_page_callback-3.13.3 patch
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5301 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-21 07:44:55 +00:00
Vladislav Bolkhovitin
122441b7c7 Docs update
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5300 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-21 02:08:05 +00:00
Vladislav Bolkhovitin
9ab22a69fd put_page_callback patch for 3.13.3+ kernels
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5296 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-20 05:54:49 +00:00
Bart Van Assche
626adfd33f scripts/blockdev-perftest: Fix bashisms
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5295 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-19 08:51:35 +00:00
Bart Van Assche
f62c332978 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5294 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-19 07:38:57 +00:00
Vladislav Bolkhovitin
d46bba46c4 scst_user: Complete "Preparing" / "finished" symmetry
Add some TRACE statements so events sent to userland are bracketed by
"Preparing" and "finished". This makes it a little easier to find the
boundaries between the various stages of command processing in trace output.

Note, this patch does not implement a 'finished' message for TM events;
there is already a "TM reply" message that can serve that purpose.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5293 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-19 04:21:00 +00:00
Vladislav Bolkhovitin
8b726a2705 Cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5292 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-19 04:06:10 +00:00
Vladislav Bolkhovitin
0f564ddcf0 Fix incorrect start and length calculation for issuing block discard requests
Block layer always expects start and length in 512 byte blocks, so they
should be corrected for non-512b SCST devices.

Original patch from Ken Raeburn <raeburn@permabit.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5291 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-19 03:45:48 +00:00
Bart Van Assche
69d5b979eb Makefiles: 'uninstall' target fixes
Some components don't have 'uninstall' targets although the top-level
Makefile references them. Some others don't remove the proper file.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5290 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-18 08:41:30 +00:00
Bart Van Assche
7d89372c53 Makefiles: respect DESTDIR when specified
Not all SCST components handle DESTDIR properly, or at all.

In particular:
* INSTALL_MOD_PATH should account for DESTDIR when 'make modules_install'
  is invoked, so the kernel make infrastructure deploys the modules
  and runs depmod against the proper directory tree.
* depmods must include a '-b' option to reference the proper directory tree.
* Drop special ISCSI_DESTDIR.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5289 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-18 08:40:36 +00:00
Bart Van Assche
13e22542d1 scst, qla2x00t: Prevent inappropriate sleeping with a real-time kernel
With a realtime kernel with full preemption (CONFIG_PREEMPT_RT_FULL),
spinlocks can sleep, interrupt handlers run in thread context, and
the standard local_irq functions manipulate preemptibility, not HW
interruptibility. Under these conditions, most calls to local_irq
functions should be replaced by no-ops. The CONFIG_PREEMPT_RT patch
defines _nort versions of local_irq functions that compile away
under CONFIG_PREEMPT_RT_FULL and compile to their "normal"
equivalents otherwise.

Define _nort equivalents to support compilation against both
"normal" and RT-patched kernels, and use the _nort local_irq
functons in cases where spinlocks are taken within a
local_irq_save() or local_irq_disable() block.  Without these
changes, runtime warnings about "sleeping function called from
invalid context" occur.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
[bvanassche: Edited patch description and comment in scst_priv.h]



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5288 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-18 08:31:44 +00:00
Bart Van Assche
65945b45bb nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5287 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-14 19:27:09 +00:00
Bart Van Assche
79b8ce942e Makefiles: calculate KVER properly
When deriving the kernel version (KVER) from KDIR, the file
$(KDIR)/include/config/kernel.release should be preferred over
'make kernelversion'.

For example, the Ubuntu 3.2.0-23-generic kernel has a kernel.release
file containing '3.2.0-23-generic', but 'make kernelversion' returns
3.2.14. Since the modules are stored under /lib/modules/3.2.0-23-generic,
the value in kernel.release is the correct one to use.
    
Also:
- Evaluate KVER only once
- All depmod commands must include KVER
    
Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
[bvanassche: Split long lines / removed trailing whitespace]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5286 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-14 15:52:10 +00:00
Bart Van Assche
ff857a394a mvsas_tgt/Makefile: Remove trailing whitespace
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5285 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-14 14:46:11 +00:00
Bart Van Assche
c33cf3f81b Makefiles: Convert from "install" to "make modules_install"
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5284 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-14 13:48:54 +00:00
Bart Van Assche
e07a91e8a0 Makefiles: remove redundant 'depmod' invocations
Running 'make modules_install' already triggers invocation of depmod,
hence leave it out from those Makefiles that use 'make modules_install'.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5283 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-14 13:05:55 +00:00
Vladislav Bolkhovitin
af9bfd3cc0 Web update
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5282 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-13 04:15:31 +00:00
Vladislav Bolkhovitin
b4ba1b24c7 iscsi-scst: fix offset calculation
Fixed a subtle bug in iSCSI-SCST with incorrectly calculated offsets
for non-page aligned transfers. Originally discovered, investigated and
fix suggested by Кирилл Тюшев, then Shahar Salzman tested and proved it.
See http://sourceforge.net/mailarchive/message.php?msg_id=31924078



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5281 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-13 04:02:56 +00:00
Bart Van Assche
4177cd82a6 scst_debug.h: Avoid that the sBUG() and sBUG_ON() definitions confuse the smatch static code checker
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5277 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-09 16:50:10 +00:00
Bart Van Assche
72968c9c15 scst: Build fix for kernel versions before 2.6.37
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5276 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-08 08:24:28 +00:00
Vladislav Bolkhovitin
634c1e69aa Fix spurious BUG when parse_type != SCST_USER_PARSE_STANDARD
Changeset 4224 introduced EXTRACHECKS for valid lba/data_len and state
at the end of the parsing phase of command processing.
However, the checks do not account for deferral of parsing to userland,
as occurs when SCST_USER_PARSE_CALL or SCST_USER_PARSE_EXCEPTION are specified.
In such cases the checks report errors on commands that userland has not yet
had an opportunity to parse.

NOTE: this includes a refactoring of the EXTRACHECKS to improve clarity.
      The rework is not exactly equivalent to the original code, but does
      conform to the comments describing the original code.
      Specifically, the original code would not trap an illegal command state
      unless there was also an illegal lba or data_len.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
with some improvements



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5275 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-08 01:52:03 +00:00
Vladislav Bolkhovitin
4d0fb300fe scst_user: Convert sgv_purge_interval to jiffies before use
The sgv_purge_interval from userland is passed down without conversion to
jiffies. Yet, if it is zero, the default value is (60 * HZ).
Convert to jiffies before passing down.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5274 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-08 01:04:27 +00:00
Bart Van Assche
07dbfb28a6 scst_vdisk: Build fix for kernels 2.6.27..2.6.30
add_to_page_cache_lru and __lock_page_killable are exported since
kernel version 2.6.30. See also patch "Staging: pohmelfs: kconfig/makefile
and vfs changes" (commit 18bc0bbd162e3eb3e7ea2953c315ad4113a57164;
included in kernel v2.6.30). 

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5273 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-07 12:46:39 +00:00
Bart Van Assche
91d9391194 scst_user, rt: Wake command processing thread when needed
In a fully-preemptible realtime kernel (CONFIG_PREEMPT_RT_FULL=y),
SCSI commands from an initiator time out because the userland target
application is never woken to process them.

This is because in a fully-preemptible realtime kernel, soft-IRQ
(tasklet) execution always occurs in a ksoftirqd thread and
preempt_count is not manipulated on soft-IRQ processing entry/exit.
This makes in_interrupt() useless for determining whether soft-IRQ
processing is occurring; instead, in_serving_softirq() should be
used for that purpose.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
[bvanassche: Elaborated source code comment]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5272 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-07 12:43:25 +00:00
Bart Van Assche
ad681d7c5a nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5271 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-07 08:11:28 +00:00
Bart Van Assche
1a367a14c8 regression tests: Run the 2.6.26..2.6.32 tests on the sysfs code instead of procfs
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5270 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-07 07:45:15 +00:00