Since algorithm to autogenerate t10_dev_id and usn is going to be changed, make usn user configurable and during transition period both t10_dev_id and usn always key to make scstadmin to always save them.
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.0.0.x@3164 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Cleanup: eliminate a superfluous cast and unnest an if-statement
and
I/O context creation and cleanup in SCST command-processing threads is
protected by io_context_mutex. The patch below changes that mutex from a
single mutex for all command threads to one mutex per thread pool.
+
Two quickly succeeding command thread management actions, e.g. setting both
threads_num and threads_pool_type via scst.conf, can trigger the bug mentioned
below. That bug can be triggered because kthread_stop() can stop a thread
before it has started. So it can happen that an I/O context is created inside
scst_cmd_thread() but not cleaned up because the thread for which
p_cmd_threads->nr_threads == 1would evaluate to true is never started. The
patch below fixes this by guaranteeing that if an I/O context has been created
for a thread pool that it gets cleaned up too.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
with fixes/cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.0.0.x@3153 d57e44dd-8a1f-0410-8b47-8ef2f437770f
bi_end_io functions must be IRQ-safe.
A quote from a discussion between Alan Cox, Mikulas Patocka and Jens Axboe
(http://lkml.org/lkml/2008/7/2/69):
> >Right, that wont work of course. Completions are typically done through
> >a softirq, so it is not currently done with hard interrupts disabled.
>
> I thought, from hardirq - that's what IDE is doing. And they are called
> with interrupts disabled (maybe unless you specify unmaskirq, which is not
> default). What block driver does completions with softirq? ... and why?
The key word is 'typically', the old IDE driver really isn't used very
much. The SCSI layer and eg cciss uses the block layer softirq
completions, so that is what 99% of the uses will be.
The patch itself was provided by Arne Redlich.
(Merged r2913 from the trunk.)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.0.0.x@2915 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This patch fixes a class of race conditions in the ..._sysfs_del()
functions: the kobject_put() calls should come after all kobject_del() calls
because as long as the last kobject_del() call hasn't been invoked, a sysfs
.show() or .store() callback may still be in progress that needs one of
these kobjects.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.0.0.x@2869 d57e44dd-8a1f-0410-8b47-8ef2f437770f
ib_srpt: Exported req_lim and req_lim_delta values via sysfs because this is convenient for debugging purposes.
(Merged revisions 2686 and 2688 from the trunk.)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.0.0.x@2689 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Partially remove implicit ordered commands as a nonsense. It will be replaced by a common waiting facility to wait on depending previous commands to complete.
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.0.0.x@2605 d57e44dd-8a1f-0410-8b47-8ef2f437770f
From 8eca3f39c4b11320787f7b216f63214aee8415a9 Mon Sep 17 00:00:00 2001
From: Andrew Vasquez <andrew.vasquez@qlogic.com>
Date: Thu, 22 Jan 2009 09:45:31 -0800
Subject: [PATCH] [SCSI] qla2xxx: Always serialize mailbox command execution.
Original code would incorrectly bypass serialization if the DPC
thread were performing a big-hammer operation (ISP abort). This
short circuit, though rare, would subsequently stomp on a
secondary thread's mailbox command execution. Found during
ISP81XX testing.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.0.0.x@2600 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Mainline commit 3c01b4f9fbb43fc911acd33ea7a14ea7a4f9866b:
From: Seokmann Ju <seokmann.ju@qlogic.com>
Date: Thu, 22 Jan 2009 09:45:38 -0800
Subject: [PATCH] [SCSI] qla2xxx: Add checks for a valid fcport in dev-loss-tmo/terminate_rport_io callbacks.
Commit f78badb1ae07e7f8b835ab2ea0b456ed3fc4caf4 ([SCSI] fc
transport: pre-emptively terminate i/o upon dev_loss_tmo timeout)
changed the callback semantics of dev_loss_tmo and
terminate_rport_io such that repeated calls could be made. This
could result in the the driver using stale (NULLed-out, in
dev_loss_tmo) data from the rport. Correct this by addint a
simple check to ensure a valid fcport is attached.
Signed-off-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.0.0.x@2599 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Fix for Persistent Reservations problem with devices >2TB in size reported by Open-E (Artur Piechocki and Aleksey Kondratov)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.0.0.x@2487 d57e44dd-8a1f-0410-8b47-8ef2f437770f