Re: [Suggestion] drivers/target/sbp/ : set tport->tpg to NULL when clean up for failure.

2012-12-06 Thread Chen Gang
于 2012年12月06日 16:34, Chris Boot 写道: > On 06/12/12 04:24, Chen Gang wrote: >> Hello Maintainers: >> >> in drivers/target/sbp/sbp_target.c: >> >>tport->tpg must be NULL before process it in function sbp_make_tpg. (line >> 2185..2188) >>tport->tpg assigned a ptr (line 2198) >>if processi

Re: [Suggestion] drivers/target/sbp/ : set tport->tpg to NULL when clean up for failure.

2012-12-06 Thread Chris Boot
On 06/12/12 04:24, Chen Gang wrote: > Hello Maintainers: > > in drivers/target/sbp/sbp_target.c: > >tport->tpg must be NULL before process it in function sbp_make_tpg. (line > 2185..2188) >tport->tpg assigned a ptr (line 2198) >if processing failed, not set tport->tpg = NULL (line 220

Re: [PATCH] scsi_ram: a RAM-based SCSI driver

2012-12-06 Thread Paolo Bonzini
Il 05/12/2012 17:45, Kirill A. Shutemov ha scritto: > From: "Kirill A. Shutemov" > > This driver is intended to run as fast as possible, hence the options to > discard writes and reads. It's designed to let us find latency issues > elsewhere in the storage stack (eg filesystem, block layer, scsi

Re: [PATCH 0/13 v6] More device removal fixes

2012-12-06 Thread Jens Axboe
On 2012-11-28 13:39, Bart Van Assche wrote: > Fix a few race conditions that can be triggered by removing a device: > - Avoid that request_fn() can be invoked on a dead queue. > - Avoid that blk_cleanup_queue() can finish while request_fn is still > running. > - Fix a race between starved list pr

Re: [PATCH 00/11] First pass at merging Bart's HA work

2012-12-06 Thread Bart Van Assche
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 rem

Re: [PATCH 00/11] First pass at merging Bart's HA work

2012-12-06 Thread Or Gerlitz
On 06/12/2012 16:10, Bart Van Assche wrote: 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

Re: [PATCH 00/11] First pass at merging Bart's HA work

2012-12-06 Thread Bart Van Assche
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

Re: [PATCH -next] [SCSI] lpfc 8.3.36: fix potential NULL pointer dereference in lpfc_sli4_rq_put()

2012-12-06 Thread James Smart
Acked-By: James Smart Thanks -- james s On 12/2/2012 8:33 AM, Wei Yongjun wrote: From: Wei Yongjun The dereference to 'put_index' should be moved below the NULL test. Signed-off-by: Wei Yongjun --- drivers/scsi/lpfc/lpfc_sli.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [PATCH 00/11] First pass at merging Bart's HA work

2012-12-06 Thread Or Gerlitz
On 06/12/2012 17:04, Bart Van Assche wrote: 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 an

[PATCH v7 0/9] More device removal fixes

2012-12-06 Thread Bart Van Assche
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

[PATCH v7 1/9] Fix race between starved list processing and device removal

2012-12-06 Thread Bart Van Assche
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/sc

[PATCH v7 2/9] Remove get_device() / put_device() pair from scsi_request_fn()

2012-12-06 Thread Bart Van Assche
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-b

[PATCH v7 3/9] Introduce scsi_device_being_removed()

2012-12-06 Thread Bart Van Assche
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/devi

Re: [PATCH 00/11] First pass at merging Bart's HA work

2012-12-06 Thread Alex Turin
On 12/6/2012 5:04 PM, Bart Van Assche wrote: 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 a

[PATCH v7 4/9] Remove offline devices when removing a host

2012-12-06 Thread Bart Van Assche
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(). Also, avoid that __scsi_remove_device() gets called a second time for devices that are in state

[PATCH v7 5/9] Disallow changing the device state via sysfs into "deleted"

2012-12-06 Thread Bart Van Assche
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/scsi_sysfs.c |7 +

[PATCH v7 6/9] Avoid saving/restoring interrupt state inside scsi_remove_host()

2012-12-06 Thread Bart Van Assche
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: Hannes

[PATCH v7 7/9] Make scsi_remove_host() wait for device removal

2012-12-06 Thread Bart Van Assche
If a device is removed via sysfs before scsi_remove_host() is invoked that device may still be in state SDEV_CANCEL when scsi_remove_host() returns. SCSI LLDs may start cleaning up host resources needed by their queuecommand() callback as soon as scsi_remove_host() finished. Hence scsi_remove_host(

[PATCH v7 8/9] Make scsi_remove_host() wait until error handling finished

2012-12-06 Thread Bart Van Assche
A SCSI LLD may start cleaning up host resources as soon as scsi_remove_host() returns. These host resources may be needed by the LLD in an implementation of one of the eh_* functions. So if one of the eh_* functions is in progress when scsi_remove_host() is invoked, wait until the eh_* function has

[PATCH v7 9/9] Avoid that scsi_device_set_state() triggers a race

2012-12-06 Thread Bart Van Assche
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 ++- drivers

Re: getting I/O errors in super_written()...any ideas what would cause this?

2012-12-06 Thread Chris Friesen
On 12/05/2012 03:20 AM, James Bottomley wrote: On Tue, 2012-12-04 at 16:00 -0600, Chris Friesen wrote: As another data point, it looks like we may be doing a SEND DIAGNOSTIC command specifying the default self-test in addition to the background short self-test. This seems a bit risky and excess

Re: getting I/O errors in super_written()...any ideas what would cause this?

2012-12-06 Thread Chris Murphy
On Dec 6, 2012, at 11:15 AM, Chris Friesen wrote: >> > > So it turns out that our problems are intermittently triggered when running > the default self test. This agrees with the statement in sg_senddiag to not > do foreground self-tests on disks with mounted filesystems. Yeah that would be

[ 11/11] scsi: Silence unnecessary warnings about ioctl to partition

2012-12-06 Thread Greg Kroah-Hartman
3.0-stable review patch. If anyone has any objections, please let me know. -- From: Jan Kara commit 6d9359280753d2955f86d6411047516a9431eb51 upstream. Sometimes, warnings about ioctls to partition happen often enough that they form majority of the warnings in the kernel log an

Re: Slow writes to SAS drives on LSI mpt2sas HBA

2012-12-06 Thread Gregory Haskins
Hello Ewan On Dec 3, 2012, at 5:06 PM, Ewan Milne wrote: >> > > It sounds like your drive write cache is disabled, 7200RPM is 120 > revolutions/sec, and you are getting 7747584 / 1024 / 63.59 = ~119 IO/s > I believe the write cache is enabled by default on SATA drives, which > would explain th

Re: [PATCH v9 06/10] ata: zpodd: check zero power ready status

2012-12-06 Thread Aaron Lu
On 12/04/2012 08:11 PM, James Bottomley wrote: > On Mon, 2012-12-03 at 08:23 -0800, Tejun Heo wrote: >> Hello, James. >> >> On Mon, Dec 03, 2012 at 08:25:43AM +, James Bottomley wrote: diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index e65c62e..1756151 100644 >

[patch] [SCSI] mpt3sas: cut and paste bug storing trigger mpi

2012-12-06 Thread Dan Carpenter
ioc->diag_trigger_mpi is an SL_WH_MPI_TRIGGERS_T struct. There is a cut and paste error here and SL_WH_EVENT_TRIGGERS_T is used instead of SL_WH_MPI_TRIGGERS_T. Since the SL_WH_EVENT_TRIGGERS_T is smaller than SL_WH_MPI_TRIGGERS_T, it means we only clear part of the buffer. Signed-off-by: Dan Ca

Re: [PATCH v7 3/9] Introduce scsi_device_being_removed()

2012-12-06 Thread Hannes Reinecke
On 12/06/2012 04:55 PM, Bart Van Assche wrote: Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: James Bottomley Cc: Mike Christie Cc: Tejun Heo Acked-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage h...@suse.de

Re: [PATCH v7 5/9] Disallow changing the device state via sysfs into "deleted"

2012-12-06 Thread Hannes Reinecke
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 Assche Cc: Tejun Heo Cc: James Bottomley Cc: Mike Christie Cc: Hannes

Re: [PATCH v7 6/9] Avoid saving/restoring interrupt state inside scsi_remove_host()

2012-12-06 Thread Hannes Reinecke
On 12/06/2012 04:57 PM, Bart Van Assche wrote: 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 A

Re: [PATCH v7 8/9] Make scsi_remove_host() wait until error handling finished

2012-12-06 Thread Hannes Reinecke
On 12/06/2012 04:59 PM, Bart Van Assche wrote: A SCSI LLD may start cleaning up host resources as soon as scsi_remove_host() returns. These host resources may be needed by the LLD in an implementation of one of the eh_* functions. So if one of the eh_* functions is in progress when scsi_remove_ho

Re: [PATCH v7 9/9] Avoid that scsi_device_set_state() triggers a race

2012-12-06 Thread Hannes Reinecke
On 12/06/2012 05:00 PM, Bart Van Assche wrote: 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 Acked-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke

Re: [PATCH v6 10/13] Make scsi_remove_host() wait for device removal

2012-12-06 Thread Bart Van Assche
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 t

[PATCH 4/6] qla2xxx: Allow ISP81xx to create ATIO queues.

2012-12-06 Thread Saurav Kashyap
From: Arun Easi Signed-off-by: Arun Easi Signed-off-by: Saurav Kashyap --- drivers/scsi/qla2xxx/qla_os.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 519e7b8..fd55841 100644 --- a/drivers/scsi/qla2x

[PATCH 2/6] qla2xxx: Ramp down queue depth for attached SCSI devices when driver resources are low.

2012-12-06 Thread Saurav Kashyap
From: Chad Dupuis Signed-off-by: Chad Dupuis Signed-off-by: Saurav Kashyap --- drivers/scsi/qla2xxx/qla_dbg.c|2 +- drivers/scsi/qla2xxx/qla_def.h|9 +++ drivers/scsi/qla2xxx/qla_gbl.h|1 + drivers/scsi/qla2xxx/qla_inline.h | 19 +++ drivers/scsi/qla2xxx/qla_isr.c

[PATCH 5/6] qla2xxx: Prevent enabling target mode for unsupported HBAs.

2012-12-06 Thread Saurav Kashyap
From: Arun Easi Signed-off-by: Arun Easi Signed-off-by: Saurav Kashyap --- drivers/scsi/qla2xxx/qla_dbg.c|2 +- drivers/scsi/qla2xxx/qla_def.h|1 + drivers/scsi/qla2xxx/qla_target.c |6 ++ 3 files changed, 8 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/qla2x

[PATCH 3/6] qla2xxx: Enable target mode support for ISP83xx.

2012-12-06 Thread Saurav Kashyap
From: Arun Easi Signed-off-by: Arun Easi Signed-off-by: Saurav Kashyap --- drivers/scsi/qla2xxx/qla_dbg.c|2 +- drivers/scsi/qla2xxx/qla_def.h|8 ++ drivers/scsi/qla2xxx/qla_fw.h |3 +- drivers/scsi/qla2xxx/qla_init.c |6 +- drivers/scsi/qla2xxx/qla_isr.c| 1

[PATCH 6/6] qla2xxx: Correction to the message ids.

2012-12-06 Thread Saurav Kashyap
Signed-off-by: Giridhar Malavali Signed-off-by: Saurav Kashyap --- drivers/scsi/qla2xxx/qla_dbg.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c index f81e938..ba2d7a8 100644 --- a/drivers/scsi/qla2xxx/qla_