Please contact either Hayley Woodford
(hayley.woodf...@smd-textiles.co.ukmailto:hayley.woodf...@smd-textiles.co.uk),
Will Sanders
(will_sand...@smd-textiles.co.ukmailto:will_sand...@smd-textiles.co.uk) or
tracy_ho...@smd-textiles.co.ukmailto:tracy_ho...@smd-textiles.co.uk
Fix a few issues related to SCSI device removal:
- Fix a race between starved list processing and device removal that
can trigger a kernel oops.
- Avoid that __scsi_remove_device() is called twice for the same SCSI
device, which also can cause a kernel oops.
- Restrict the SCSI device state
If something goes wrong during LUN scanning, e.g. a transport layer
failure occurs, then __scsi_remove_device() can get invoked by the
LUN scanning code for a SCSI device in state SDEV_CREATED_BLOCK and
before the SCSI device has been added to sysfs (is_visible == 0).
Make sure that even in this
scsi_run_queue() examines all SCSI devices that are present on
the starved list. Since scsi_run_queue() unlocks the SCSI host
lock a SCSI device can get removed after it has been removed
from the starved list and before its queue is run. Protect
against that race condition by holding a reference
Introduce the helper function scsi_device_being_removed(). This patch
does not change any functionality.
Signed-off-by: Bart Van Assche bvanass...@acm.org
Acked-by: Hannes Reinecke h...@suse.de
Cc: James Bottomley jbottom...@parallels.com
Cc: Mike Christie micha...@cs.wisc.edu
---
Modify scsi_internal_device_unblock() such that it uses
scsi_device_set_state() to change the device state. This is only
possible by changing scsi_device_set_state() such that it allows
the transition from SDEV_CREATED_BLOCK to the SDEV_OFFLINE and
SDEV_TRANSPORT_OFFLINE states. Notes:
- All
Disallow the SDEV_TRANSPORT_OFFLINE to SDEV_CANCEL transition such
that no I/O is sent to devices for which the transport is offline.
Notes:
- Functions like sd_shutdown() use scsi_execute_req() and hence
set the REQ_PREEMPT flag. Such requests are passed to the LLD
queuecommand callback in
Changing the state of a SCSI device via sysfs into cancel,
cancel-offline or deleted prevents removal of these devices by
scsi_remove_host(). Hence do not allow this.
Signed-off-by: Bart Van Assche bvanass...@acm.org
Cc: James Bottomley jbottom...@parallels.com
Cc: Mike Christie
Il 25/06/2013 23:19, Paolo Bonzini ha scritto:
Il 27/05/2013 15:50, Paolo Bonzini ha scritto:
We've been running in circles for nine months now. Let's restart from
the maintainer's suggestion, which was probably dismissed too quickly.
This is still not a complete solution, because /dev/sgN
The proposed SCSI atomic commands - WRITE ATOMIC, READ ATOMIC, WRITE SCATTERED,
and READ GATHERED - all include FUA (force unit access) bits, just like other
WRITE and READ commands. Also, the SYNCHRONIZE CACHE command affects atomic
writes just like non-atomic writes.
With the FUA bit set to
On 07/05/2013 11:34 AM, Elliott, Robert (Server Storage) wrote:
The proposed SCSI atomic commands - WRITE ATOMIC, READ ATOMIC, WRITE SCATTERED,
and READ GATHERED - all include FUA (force unit access) bits, just like other
WRITE and READ commands. Also, the SYNCHRONIZE CACHE command affects
Sorry about replying so late.
On Mon, 17 June 2013 21:10:53 +0800, vaughan wrote:
Rewrite the last patch.
Add a new field 'toopen' in sg_device to count ongoing sg_open's. By checking
both 'toopen' and 'exclude' marks when do exclusive open, old race conditions
can be avoided.
Replace
12 matches
Mail list logo