The function bsg_goose_queue() does not have any in-tree callers,
so let's remove it.
Signed-off-by: Bart Van Assche
Cc: Jens Axboe
Cc: Tejun Heo
---
block/bsg-lib.c | 13 -
include/linux/bsg-lib.h |1 -
2 files changed, 14 deletions(-)
diff --git a/block/bsg-
Avoid that the sdev reference count can drop to zero before
the queue is run by scsi_run_queue(). Also avoid that the sdev
reference count can drop to zero in the same function by invoking
__blk_run_queue().
Signed-off-by: Bart Van Assche
Reported-and-tested-by: Chanho Min
Reference: http
Now that all scsi_request_fn() callers hold a reference on the
SCSI device that function is invoked on and since
blk_cleanup_queue() waits until scsi_request_fn() has finished
it is safe to remove the get_device() / put_device() pair from
scsi_request_fn().
Signed-off-by: Bart Van Assche
Acked
Since it is not allowed to invoke scsi_remove_host() with interrupts
disabled, avoid saving and restoring the interrupt state inside
scsi_remove_host().
Signed-off-by: Bart Van Assche
Cc: James Bottomley
Cc: Tejun Heo
Cc: Mike Christie
Cc: Hannes Reinecke
---
drivers/scsi/hosts.c | 12
scsi_remove_host()
finished. Also, avoid adding new SCSI devices after
scsi_remove_host() started.
Signed-off-by: Bart Van Assche
Cc: Tejun Heo
Cc: James Bottomley
Cc: Mike Christie
Cc: Hannes Reinecke
---
drivers/scsi/hosts.c | 30 ++
drivers/scsi/scsi_priv.h
has finished. Also, do
not invoke any of the eh_* functions after scsi_remove_host() has
started.
Signed-off-by: Bart Van Assche
Cc: Hannes Reinecke
Cc: Mike Christie
Cc: Tejun Heo
---
drivers/scsi/hosts.c |2 +-
drivers/scsi/scsi_error.c | 114
Make concurrent invocations of scsi_device_set_state() safe.
Signed-off-by: Bart Van Assche
Cc: James Bottomley
Cc: Tejun Heo
Cc: Hannes Reinecke
Cc: Mike Christie
---
drivers/scsi/scsi_lib.c | 24
drivers/scsi/scsi_sysfs.c |9 -
2 files changed, 20
The function scsi_remove_host() may get invoked concurrently with
scsi_request_fn(). Kill those I/O requests for which processing
starts after scsi_remove_host() has been invoked. This makes
device removal a little quicker by avoiding that such SCSI
commands time out.
Signed-off-by: Bart Van
On 12/02/12 10:23, Hiroyuki Yamada wrote:
I figured out what is going on, but I don't know what it is for.
Ext3 filesystem has some 4KB data in each 4096KB(8192 sectors) data.
Visually, data is aligned like the following.
|4KB|4096KB|4KB|4096KB|4KB|4096KB| ...
And 4096KB area in only accessibl
On 12/02/12 14:23, Tejun Heo wrote:
On Wed, Nov 28, 2012 at 01:44:53PM +0100, Bart Van Assche wrote:
A block driver may start cleaning up resources needed by its
request_fn as soon as blk_cleanup_queue() finished, so request_fn
must not be invoked after draining finished. This is important
when
On 12/02/12 14:26, Tejun Heo wrote:
On Wed, Nov 28, 2012 at 01:45:56PM +0100, Bart Van Assche wrote:
Running a queue must continue after it has been marked dying until
it has been marked dead. So the function blk_run_queue_async() must
not schedule delayed work after blk_cleanup_queue() has
On 12/02/12 14:45, Tejun Heo wrote:
On Wed, Nov 28, 2012 at 01:51:13PM +0100, Bart Van Assche wrote:
+/* Test whether scsi_remove_host() may finish, and if so, wake it up. */
+void __scsi_check_remove_host_done(struct Scsi_Host *shost)
+{
+ lockdep_assert_held(shost->host_l
On 12/03/12 17:15, Tejun Heo wrote:
On Mon, Dec 03, 2012 at 09:23:59AM +0100, Bart Van Assche wrote:
On 12/02/12 14:45, Tejun Heo wrote:
On Wed, Nov 28, 2012 at 01:51:13PM +0100, Bart Van Assche wrote:
+/* Test whether scsi_remove_host() may finish, and if so, wake it up. */
+void
On 12/05/12 19:23, Or Gerlitz wrote:
On Fri, Nov 30, 2012 at 4:21 AM, David Dillow wrote:
[...]
Modulo a few style issues (braces around one line if branches, etc.) and
having three state variables vs one, I can live with everything up to
aabfa852acd27962 at git://github.com/bvanassche/linux.gi
On 12/05/12 19:50, Bart Van Assche wrote:
On 12/05/12 19:23, Or Gerlitz wrote:
On Fri, Nov 30, 2012 at 4:21 AM, David Dillow wrote:
[...]
Modulo a few style issues (braces around one line if branches, etc.) and
having three state variables vs one, I can live with everything up to
On 12/05/12 22:32, Or Gerlitz wrote:
On Wed, Dec 5, 2012 at 8:50 PM, Bart Van Assche wrote:
[...]
The only way to make I/O work reliably if a failure can occur at the
transport layer is to use multipathd on top of ib_srp. If a connection fails
for some reason, then the SRP SCSI host will be
On 12/06/12 15:27, Or Gerlitz wrote:
The core problem here seems to be that scsi_remove_host simply never ends.
Hello Or,
The later patches in the srp-ha patch series avoided such behavior by
checking whether the connection between SRP initiator and target is
unique, and by removing duplicat
Fix a few race conditions that can be triggered by removing a device:
- Fix a race between starved list processing and device removal.
- Avoid that a SCSI LLD callback can get invoked after
scsi_remove_host() finished.
- Speed up device removal by stopping error handling as soon as
the SHOST_D
Avoid that the sdev reference count can drop to zero before
a queue is run by scsi_run_queue().
Signed-off-by: Bart Van Assche
Reported-and-tested-by: Chanho Min
Reference: http://lkml.org/lkml/2012/8/2/96
Acked-by: Tejun Heo
Reviewed-by: Mike Christie
Cc: Jens Axboe
Cc:
---
drivers/scsi
Now that all scsi_request_fn() callers hold a reference on the
SCSI device that function is invoked for and since
blk_cleanup_queue() waits until scsi_request_fn() has finished
it is safe to remove the get_device() / put_device() pair from
scsi_request_fn().
Signed-off-by: Bart Van Assche
Acked
Signed-off-by: Bart Van Assche
Cc: Hannes Reinecke
Cc: James Bottomley
Cc: Mike Christie
Cc: Tejun Heo
---
drivers/scsi/device_handler/scsi_dh.c |7 ++-
include/scsi/scsi_device.h|5 +
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi
SDEV_CANCEL when scsi_forget_host()
is invoked.
Signed-off-by: Bart Van Assche
Cc: James Bottomley
Cc: Mike Christie
Cc: Hannes Reinecke
Cc: Tejun Heo
---
drivers/scsi/scsi_scan.c |2 +-
drivers/scsi/scsi_sysfs.c |4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git
Changing the state of a SCSI device via sysfs into "cancel" or
"deleted" prevents scsi_remove_host() to remove these devices.
Hence do not allow this.
Signed-off-by: Bart Van Assche
Cc: Tejun Heo
Cc: James Bottomley
Cc: Mike Christie
Cc: Hannes Reinecke
---
drivers/scsi
Since it is not allowed to invoke scsi_remove_host() with interrupts
disabled, avoid saving and restoring the interrupt state inside
scsi_remove_host(). This patch does not change the functionality of
that function.
Signed-off-by: Bart Van Assche
Acked-by: Tejun Heo
Cc: Mike Christie
Cc
() must wait
until blk_cleanup_queue() for all devices associated with the
host has finished. That avoids that queuecommand() gets invoked
after scsi_remove_host() finished.
Signed-off-by: Bart Van Assche
Cc: Tejun Heo
Cc: James Bottomley
Cc: Mike Christie
Cc: Hannes Reinecke
---
drivers/scsi
has finished. Also, do
not invoke any of the eh_* functions after scsi_remove_host() has
started.
Signed-off-by: Bart Van Assche
Cc: Hannes Reinecke
Cc: Mike Christie
Cc: Tejun Heo
---
drivers/scsi/hosts.c |2 +-
drivers/scsi/scsi_error.c | 76
Make concurrent invocations of scsi_device_set_state() safe.
Signed-off-by: Bart Van Assche
Cc: James Bottomley
Cc: Tejun Heo
Cc: Hannes Reinecke
Cc: Mike Christie
---
drivers/scsi/scsi_error.c |4
drivers/scsi/scsi_lib.c | 43
On 12/03/12 17:42, Tejun Heo wrote:
On Mon, Dec 03, 2012 at 05:38:52PM +0100, Bart Van Assche wrote:
It is indeed possible to invoke complete() only if the device list
became empty with the host state equal to SHOST_CANCEL,
SHOST_CANCEL_RECOVERY, SHOST_DEL or SHOST_DEL_RECOVERY and in
We can
On 12/07/12 09:40, Rolf Eike Beer wrote:
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index 55367b0..767dd16 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -442,6 +442,11 @@ static inline int scsi_device_created(struct
scsi_device *sdev)
r
On 12/07/12 11:02, Rolf Eike Beer wrote:
> Am , schrieb Bart Van Assche:
>> On 12/07/12 09:40, Rolf Eike Beer wrote:
>>>> diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
>>>> index 55367b0..767dd16 100644
>>>> --- a/inclu
On 12/07/12 07:55, Hannes Reinecke wrote:
On 12/06/2012 04:56 PM, Bart Van Assche wrote:
Changing the state of a SCSI device via sysfs into "cancel" or
"deleted" prevents scsi_remove_host() to remove these devices.
Hence do not allow this.
Signed-off-by: Bart Van Assch
On 12/07/12 13:46, Bart Van Assche wrote:
> On 12/07/12 07:55, Hannes Reinecke wrote:
>> On 12/06/2012 04:56 PM, Bart Van Assche wrote:
>>> Changing the state of a SCSI device via sysfs into "cancel" or
>>> "deleted" prevents scsi_remove_host() to re
On 12/07/12 16:10, Hannes Reinecke wrote:
On 12/06/2012 04:55 PM, Bart Van Assche wrote:
Currently __scsi_remove_device() skips devices that are visible and
offline. Make sure that these devices get removed by changing their
device state into SDEV_DEL at the start of __scsi_remove_device
On 12/07/12 16:33, Bart Van Assche wrote:
On 12/07/12 16:10, Hannes Reinecke wrote:
On 12/06/2012 04:55 PM, Bart Van Assche wrote:
Currently __scsi_remove_device() skips devices that are visible and
offline. Make sure that these devices get removed by changing their
device state into SDEV_DEL
On 12/11/12 01:00, scame...@beardog.cce.hp.com wrote:
I tried using scsi_debug with fake_rw and also the scsi_ram driver
that was recently posted to get some idea of what the maximum IOPS
that could be pushed through the SCSI midlayer might be, and the
numbers were a little disappointing (was get
A SCSI LLD may overwrite host_scribble in its queuecommand()
implementation. Several drivers need that field to process
requests and aborts correctly. Hence this field must be saved
by scsi_eh_prep_cmnd() and must be restored by
scsi_eh_restore_cmnd().
Signed-off-by: Bart Van Assche
Cc: James
On 12/13/12 00:22, Robert Love wrote:
@@ -210,25 +210,23 @@ static ssize_t show_fcoe_fcf_device_##field(struct device
*dev, \
#define fcoe_enum_name_search(title, table_type, table)
\
static const char *get_fcoe_##title##_name(enum table_type table_key) \
{
On 12/11/12 23:46, scame...@beardog.cce.hp.com wrote:
I would be curious to see what kind of results you would get with scsi_debug
with fake_rw=1. I am sort of suspecting that trying to put an "upper limit"
on scsi LLD IOPS performance by seeing what scsi_debug will do with fake_rw=1
is not real
On 12/11/12 01:00, scame...@beardog.cce.hp.com wrote:
The driver, like nvme, has a submit and reply queue per cpu.
This is interesting. If my interpretation of the POSIX spec is correct
then aio_write() allows to queue overlapping writes and all writes
submitted by the same thread have to be
On 12/13/12 18:25, scame...@beardog.cce.hp.com wrote:
On Thu, Dec 13, 2012 at 04:22:33PM +0100, Bart Van Assche wrote:
On 12/11/12 01:00, scame...@beardog.cce.hp.com wrote:
The driver, like nvme, has a submit and reply queue per cpu.
This is interesting. If my interpretation of the POSIX
On 12/13/12 19:03, scame...@beardog.cce.hp.com wrote:
What are your system specs?
A quad core Intel i5-2400 @ 3.10 GHz.
taskset -c "$cpu" dd if="$device" of=/dev/null bs=4k iflag=direct
Please use fio instead of dd for any serious performance measurements.
dd doesn't even guarantee
On 12/13/12 17:49, Christoph Hellwig wrote:
On Thu, Dec 13, 2012 at 05:47:14PM +0100, Bart Van Assche wrote:
From my experience with block and SCSI drivers option (1) doesn't
look attractive from a performance point of view. From what I have
seen performance with QD=1 is several times
On 12/14/12 17:44, scame...@beardog.cce.hp.com wrote:
I expect the flash devices re-order requests as well, simply because
to feed requests to the things at a sufficient rate, you have to pump
requests into them concurrently on multiple hardware queues -- a single
cpu jamming requests into them a
On 12/14/12 20:55, scame...@beardog.cce.hp.com wrote:
It's not so much that they are re-ordered as that there is no controlled
ordering to begin with because multiple cpus are submitting to multiple
hardware queues concurrently. If you have 12 requests coming in on 12
cpus to 12 hardware queues
On 12/15/12 05:22, Amit Sahrawat wrote:
We are using kernel version 3.0.33, and the patch which is mentioned for
the above problem - is already applied in the kernel.
If the kernel reports that io_schedule() hangs that usually means that
an I/O request was not finished properly. It would help
On 12/14/12 22:06, scame...@beardog.cce.hp.com wrote:
[ ... ] how to get the scsi mid layer to provide a wide enough
highway for requests destined for very low latency devices.
While the SCSI mid-layer is processing an I/O request not only the queue
lock has to be locked and unlocked several t
On 12/18/12 00:26, David Milburn wrote:
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index ce5224c..6d72abb 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -596,7 +596,7 @@ static ssize_t
store_state_field(struct device *dev, struct device_attribu
On 01/02/13 19:23, wenxi...@linux.vnet.ibm.com wrote:
I am re-sending "blk iopoll support" and "bump version" patches in previous
series.
Hello Wendy,
How much do these patches improve the performance of the ipr driver ?
Thanks,
Bart.
--
To unsubscribe from this list: send the line "unsubsc
On Fri, Jan 18, 2013 at 9:27 AM, Ewan D. Milne wrote:
>
> @@ -2206,7 +2206,7 @@ static void scsi_evt_emit(struct scsi_device *sdev,
> struct scsi_event *evt)
> * Dispatch queued events to their associated scsi_device kobjects
> * as uevents.
> */
> -void scsi_evt_thread(struct work_
On Fri, Jan 18, 2013 at 9:27 AM, Ewan D. Milne wrote:
> @@ -2206,7 +2206,7 @@ static void scsi_evt_emit(struct scsi_device *sdev,
> struct scsi_event *evt)
> * Dispatch queued events to their associated scsi_device kobjects
> * as uevents.
> */
> -void scsi_evt_thread(struct work_st
On Fri, Jan 18, 2013 at 9:27 AM, Ewan D. Milne wrote:
> This patch set adds changes to the SCSI mid-layer, sysfs and scsi_debug
> to provide enhanced support for Unit Attention conditions, as well as
> detection of reported sense data overflow conditions and some changes
> to sense data processing
On Thu, Jan 24, 2013 at 4:38 AM, Hannes Reinecke wrote:
> As for AEN, does iSCSI _do_ AEN? I thought it got removed ...
>
> If it does, though, it should schedule an event on its own whenever an AER
> is received. The same goes for LLDDs with vendor-specific AENs; thinking of
> megaraid_sas here .
On 01/28/13 16:05, Jeremy Linton wrote:
What I think your looking for is RSCN (Registered State Change notification).
Hook that, and then check the name server. This will tell you when ports get
added/removed. You can then report luns against lun 0 of all the known target
ports. This allows you t
On 02/01/13 07:13, Tao Ma wrote:
In our product system, we have several sata disks attached to one
machine. So when one of the disk fails, the jbd2(yes, we use ext4) will
hang forever and we will get something in /var/log/messages like below.
It seems to me that the io sent to the scsi la
It is known that it takes about two to three minutes before the upstream
SRP initiator fails over from a failed path to a working path. This is
not only considered longer than acceptable but is also longer than other
Linux SCSI initiators (e.g. iSCSI and FC). Progress so far with
improving the
Fix a few race conditions that can be triggered by removing a device:
- Fix a race between starved list processing and device removal.
- Avoid that a SCSI LLD callback can get invoked after
scsi_remove_host() finished.
- Speed up device removal by stopping error handling as soon as
the SHOST_D
by increasing the
sdev refcount before running the sdev queue. Also, remove a
SCSI device from the starved list before __scsi_remove_device()
decreases the sdev refcount such that the get_device() call
added in scsi_run_queue() is guaranteed to succeed.
Signed-off-by: Bart Van Assche
Reported-and
Now that all scsi_request_fn() callers hold a reference on the
SCSI device that function is invoked for and since
blk_cleanup_queue() waits until scsi_request_fn() has finished
it is safe to remove the get_device() / put_device() pair from
scsi_request_fn().
Signed-off-by: Bart Van Assche
Acked
This patch does not change any functionality.
Signed-off-by: Bart Van Assche
Acked-by: Hannes Reinecke
Cc: James Bottomley
Cc: Mike Christie
Cc: Tejun Heo
---
drivers/scsi/device_handler/scsi_dh.c |7 ++-
include/scsi/scsi_device.h| 15 +++
2 files changed
__scsi_remove_device(). Also, avoid
that __scsi_remove_device() gets called a second time by
scsi_forget_host() for devices that are in state SDEV_CANCEL.
Signed-off-by: Bart Van Assche
Cc: James Bottomley
Cc: Mike Christie
Cc: Hannes Reinecke
Cc: Tejun Heo
---
drivers/scsi/scsi_scan.c |2
device state. Update scsi_device_set_state() such that gcc
does not issue a warning about an enumeration value not being
handled inside a switch statement.
Signed-off-by: Bart Van Assche
Cc: Tejun Heo
Cc: James Bottomley
Cc: Mike Christie
Cc: Hannes Reinecke
Cc: David Milburn
---
drivers/scsi/scsi_lib.c
Since it is not allowed to invoke scsi_remove_host() with interrupts
disabled, avoid saving and restoring the interrupt state inside
scsi_remove_host(). This patch does not change the functionality of
the function scsi_remove_host().
Signed-off-by: Bart Van Assche
Acked-by: Tejun Heo
Acked-by
() finished.
Hence scsi_remove_host() must wait until blk_cleanup_queue()
for all devices associated with the host has finished. That
avoids that queuecommand() gets invoked after scsi_remove_host()
finished.
Signed-off-by: Bart Van Assche
Cc: Tejun Heo
Cc: James Bottomley
Cc: Mike Christie
Cc
has finished. Also, do
not invoke any of the eh_* functions after scsi_remove_host() has
started.
Signed-off-by: Bart Van Assche
Cc: Hannes Reinecke
Cc: Mike Christie
Cc: Tejun Heo
---
drivers/scsi/hosts.c |2 +-
drivers/scsi/scsi_error.c | 74
Signed-off-by: Bart Van Assche
Acked-by: Hannes Reinecke
Cc: James Bottomley
Cc: Tejun Heo
Cc: Mike Christie
---
drivers/scsi/scsi_error.c |4
drivers/scsi/scsi_lib.c | 43 ++-
drivers/scsi/scsi_scan.c | 15 ---
drivers/scsi
A SCSI LLD may overwrite host_scribble in its queuecommand()
implementation. Several drivers need that field to process
requests and aborts correctly. Hence this field must be saved
by scsi_eh_prep_cmnd() and must be restored by
scsi_eh_restore_cmnd().
Signed-off-by: Bart Van Assche
Cc: James
On 02/06/13 23:31, Joe Lawrence wrote:
On Tue, 5 Feb 2013, Bart Van Assche wrote:
Fix a few race conditions that can be triggered by removing a device:
- Fix a race between starved list processing and device removal.
- Avoid that a SCSI LLD callback can get invoked after
scsi_remove_host
On 02/06/13 23:31, Joe Lawrence wrote:
crash> list scsi_device.siblings -H 0x8808513a4290 -s scsi_device
880851232520
struct scsi_device {
is_visible = 0x1,
sdev_state = SDEV_DEL,
}
880851235388
struct scsi_device {
is_visible = 0x1,
sdev_state = SDEV_DEL,
}
This is int
On 02/07/13 13:08, Boaz Harrosh wrote:
(My addition is for support of sg_lists to bsg, in a way that makes Tomo happy
I know that qemu was wanting this for a while as well as the multitude of
user-mode servers)
Do you think it would help / make sense if sg_alloc_table() would be
modified s
On 02/09/13 00:29, Joe Lawrence wrote:
I haven't had time to rerun the test without the two patches that wait in
scsi_remove_host(), however I did rerun the test and verify the same
behavior as in my earlier mail. I didn't see any __scsi_remove_device()
instances running.
Some more investigatio
Chanho Min
-Original Message-
From: Bart Van Assche [mailto:bvanass...@acm.org]
Sent: Friday, December 07, 2012 12:53 AM
To: undisclosed-recipients:
Cc: linux-scsi; James Bottomley; Mike Christie; Tejun Heo; Chanho Min; Jens
Axboe
Subject: [PATCH v7 1/9] Fix race between starved list
On 02/09/13 10:28, Bart Van Assche wrote:
On 02/09/13 00:29, Joe Lawrence wrote:
I haven't had time to rerun the test without the two patches that wait in
scsi_remove_host(), however I did rerun the test and verify the same
behavior as in my earlier mail. I didn't see any __scsi_rem
On 02/13/13 20:52, Jeremy Linton wrote:
On 2/13/2013 9:06 AM, Hannes Reinecke wrote:
So add a new flag 'support_64bit_luns' to the scsi host and modify report
lun scan to not check for max_luns during scanning if that flag is set.
This will get rid of the
Along these lines, I don't thi
On 02/14/13 23:44, Jeremy Linton wrote:
On 2/14/2013 4:04 PM, Elliott, Robert (Server Storage) wrote:
Like James notes, LUNs should generally be treated as opaque values.
Maybe another issue to consider is how they are being displayed in userland.
A device with two luns using one of the altern
Fix a few issues that can be triggered by removing a device:
- Fix a race between starved list processing and device removal.
- Avoid that a SCSI LLD callback can get invoked after
scsi_remove_host() finished.
- Speed up device removal by stopping error handling as soon as
the SHOST_DEL or SHO
by increasing the
sdev refcount before running the sdev queue. Also, remove a
SCSI device from the starved list before __scsi_remove_device()
decreases the sdev refcount such that the get_device() call
added in scsi_run_queue() is guaranteed to succeed.
Signed-off-by: Bart Van Assche
Reported-and
Now that all scsi_request_fn() callers hold a reference on the
SCSI device that function is invoked for and since
blk_cleanup_queue() waits until scsi_request_fn() has finished
it is safe to remove the get_device() / put_device() pair from
scsi_request_fn().
Signed-off-by: Bart Van Assche
Acked
KED. If this happens this
happens before a SCSI device is added to sysfs (is_visible == 0).
Make sure that if this happens these devices are transitioned
into state SDEV_DEL. This avoids that __scsi_remove_device()
gets invoked a second time by scsi_forget_host().
Signed-off-by: Bart Van Assche
device state. Update scsi_device_set_state() such that gcc
does not issue a warning about an enumeration value not being
handled inside a switch statement.
Signed-off-by: Bart Van Assche
Cc: Tejun Heo
Cc: James Bottomley
Cc: Mike Christie
Cc: Hannes Reinecke
Cc: David Milburn
---
drivers/scsi/scsi_lib.c
Since it is not allowed to invoke scsi_remove_host() with interrupts
disabled, avoid saving and restoring the interrupt state inside
scsi_remove_host(). This patch does not change the functionality of
the function scsi_remove_host().
Signed-off-by: Bart Van Assche
Acked-by: Tejun Heo
Acked-by
has finished. Also, do
not invoke any of the eh_* functions after scsi_remove_host() has
started. Remove Scsi_Host.tmf_in_progress because it is now
superfluous.
Signed-off-by: Bart Van Assche
Cc: Hannes Reinecke
Cc: Mike Christie
Cc: Tejun Heo
---
drivers/scsi/hosts.c |6
drivers
Make concurrent invocations of scsi_device_set_state() safe.
Signed-off-by: Bart Van Assche
Acked-by: Hannes Reinecke
Cc: James Bottomley
Cc: Tejun Heo
Cc: Mike Christie
---
drivers/scsi/scsi_error.c |4
drivers/scsi/scsi_lib.c | 43
A SCSI LLD may overwrite host_scribble in its queuecommand()
implementation. Several drivers need that field to process
requests and aborts correctly. Hence this field must be saved
by scsi_eh_prep_cmnd() and must be restored by
scsi_eh_restore_cmnd().
Signed-off-by: Bart Van Assche
Cc: James
the SDEV_CANCEL state.
- This patch does not affect Fibre Channel LLD drivers since these
drivers invoke fc_remote_port_chkready() before submitting a SCSI
request to the HBA. That prevents a timeout to occur in state
SDEV_CANCEL if the transport is offline.
Signed-off-by: Bart Van Assche
Cc
On 02/18/13 20:15, Rob Evers wrote:
+ /*
+* bytes 6 - 9: length of the command.
+*/
+ scsi_cmd[6] = (unsigned char) (length >> 24) & 0xff;
+ scsi_cmd[7] = (unsigned char) (length >> 16) & 0xff;
+ scsi_cmd[8] = (unsigned char) (length >> 8) & 0xff;
+ s
On 02/18/13 20:15, Rob Evers wrote:
length = ((data[0] << 24) | (data[1] << 16) |
(data[2] << 8) | (data[3] << 0));
[ ... ]
+ length = ((data[0] << 24) | (data[1] << 16) |
+ (data[2] << 8) | (data[3] << 0));
This mini-series of two patches avoids that the device mapper
implementation triggers a use-after-free during removal of a
mapped device. The two patches in this series are:
- block: Avoid invoking blk_run_queue() recursively
- dm: Avoid use-after-free of a mapped device
--
To unsubscribe from thi
queue processing when
invoked recursively is safe because the only two affected
request_fn() implementations (dm and SCSI) guarantee that the
request queue will be reexamined sooner or later before returning
from their request_fn() implementation.
Signed-off-by: Bart Van Assche
Cc: Jens Axboe
Cc
ork+0x29/0x40
[] process_one_work+0x1c3/0x5c0
[] worker_thread+0x15e/0x440
[] kthread+0xdb/0xe0
[] ret_from_fork+0x7c/0xb0
Signed-off-by: Bart Van Assche
Cc: Alasdair G Kergon
Cc: Jens Axboe
Cc: Mike Snitzer
Cc: Tejun Heo
Cc: James Bottomley
Cc:
---
drivers/md/dm.c | 10 +-
On 02/22/13 12:08, Mike Snitzer wrote:
On Fri, Feb 22 2013 at 5:47am -0500,
Bart Van Assche wrote:
As the comment above rq_completed() explains, md members must
not be touched after the dm_put() at the end of that function
has been invoked. Avoid that the md->queue can be run
asynchronou
On 02/22/13 19:14, Tejun Heo wrote:
> Hello, Bart.
>
> On Fri, Feb 22, 2013 at 11:46:14AM +0100, Bart Van Assche wrote:
>> Some block drivers, e.g. dm and SCSI, need to trigger a queue
>> run from inside functions that may be invoked by their request_fn()
>> imp
On 02/22/13 20:01, Jens Axboe wrote:
That'd be fine. I agree with Tejun that just returning is error prone
and could cause hard-to-debug hangs or stalls. So something ala
if (blk_queue(dead))
return;
else if (q->request_fn_active) {
blk_delay_q
ioset.
+* So you must walk through the queue to unprep.
+*/
+ }
goto out;
}
Without your patch my test failed after two or three iterations. With
your patch my test is still running after 53 iterations. So if you wan
This mini-series of two patches avoids that the device mapper
implementation can trigger a use-after-free during removal of a
mapped device. The two patches in this series are:
- block: Convert blk_run_queue() recursion into iteration.
- dm: Avoid running the md queue after the last dm_put().
Not
Some block drivers, e.g. dm and SCSI, need to trigger a queue
run from inside functions that may be invoked by their request_fn()
implementation. Make sure that invoking blk_run_queue() instead
of blk_run_queue_async() from such functions does not trigger
recursion.
Signed-off-by: Bart Van Assche
dm_request_fn() safe.
Signed-off-by: Bart Van Assche
Cc: Alasdair G Kergon
Cc: Jens Axboe
Cc: Mike Snitzer
Cc: Tejun Heo
Cc: James Bottomley
Cc: Jun'ichi Nomura
---
drivers/md/dm.c |8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
On 02/28/13 01:42, Jun'ichi Nomura wrote:
Hi Bart,
On 02/27/13 23:45, Bart Van Assche wrote:
This mini-series of two patches avoids that the device mapper
implementation can trigger a use-after-free during removal of a
mapped device. The two patches in this series are:
- block: Co
On 03/01/13 10:19, James Bottomley wrote:
This is an assorted set of stragglers into the merge window with driver
updates for qla2xxx, megaraid_sas, storvsc and ufs. It also includes
pulls of the uapi tree (all the remaining SCSI pieces) and the fcoe tree
(updates to fcoe and libfc)
Hello Jame
On 03/15/13 12:55, Hannes Reinecke wrote:
And the LLDD is forced into error recovery which'll take _ages_ as each
and every command send during error recovery will time out.
Hello Hannes,
I'm analyzing a related but not identical issue with SRP. It would help
if you could tell with which LLDD
On 03/15/13 13:37, Bryn M. Reeves wrote:
On 03/15/2013 12:24 PM, Bart Van Assche wrote:
On 03/15/13 12:55, Hannes Reinecke wrote:
And the LLDD is forced into error recovery which'll take _ages_ as each
and every command send during error recovery will time out.
Hello Hannes,
I'm a
701 - 800 of 3375 matches
Mail list logo