Re: [PATCH 01/11] Declare wwn_to_u64() argument const

2019-04-04 Thread Johannes Thumshirn
Fair enough, Reviewed-by: Johannes Thumshirn -- Johannes ThumshirnSUSE Labs Filesystems jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 21284 (AG Nürn

[RFC PATCH 1/1] scsi: sd: associate sd_probe_domain with scsi_disk

2019-04-04 Thread Ming Lin
From: "wangqiang (AY)" sd_remove() waits for the completion of async threads executing sd_probe_async of disks on unrelated host adapters, rather than just the the async thread associated with the scsi_disk being removed. This patch makes sd_remove() just wait for the the async thread associat

[RFC PATCH 0/1] fix bug of iscsid hung

2019-04-04 Thread Ming Lin
Hi list, I encountered a bug of iscsid hung when testing iscsi login/logout in unstable network. Same as this one reported by Wangqiang@Huawei https://lore.kernel.org/lkml/508a4c72ed914648bb0f1814399310dbbb2...@dggemm506-mbx.china.huawei.com/ Use tc tool to simulate network packet loss. --

[Bug 202859] Corruption when reading from disk with 32-core processor (megaraid_sas)

2019-04-04 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=202859 Antti Tönkyrä (daeda...@pingtimeout.net) changed: What|Removed |Added Status|NEW |RESOLVED

Re: [PATCH V4 1/7] blk-mq: grab .q_usage_counter when queuing request from plug code path

2019-04-04 Thread Bart Van Assche
On Thu, 2019-04-04 at 16:43 +0800, Ming Lei wrote: > Just like aio/io_uring, we need to grab 2 refcount for queuing one > request, one is for submission, another is for completion. > > If the request isn't queued from plug code path, the refcount grabbed > in generic_make_request() serves for subm

Re: [PATCH V4 3/7] blk-mq: quiesce queue before updating nr_hw_queues

2019-04-04 Thread Ming Lei
On Thu, Apr 4, 2019 at 11:57 PM Bart Van Assche wrote: > > On Thu, 2019-04-04 at 16:43 +0800, Ming Lei wrote: > > diff --git a/block/blk-mq.c b/block/blk-mq.c > > index b512ba0cb359..41c12d9008b7 100644 > > --- a/block/blk-mq.c > > +++ b/block/blk-mq.c > > @@ -3224,8 +3224,11 @@ static void __blk_

Re: [PATCH V4 1/7] blk-mq: grab .q_usage_counter when queuing request from plug code path

2019-04-04 Thread Ming Lei
On Thu, Apr 4, 2019 at 11:58 PM Bart Van Assche wrote: > > On Thu, 2019-04-04 at 16:43 +0800, Ming Lei wrote: > > Just like aio/io_uring, we need to grab 2 refcount for queuing one > > request, one is for submission, another is for completion. > > > > If the request isn't queued from plug code pat

[PATCH 11/11] tcm_qla2xxx: Minimize #include directives

2019-04-04 Thread Bart Van Assche
Only include those header files that are needed by the code in this source file. Cc: Himanshu Madhani Cc: Giridhar Malavali Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/driv

[PATCH 06/11] qla2xxx: Reduce the number of forward declarations

2019-04-04 Thread Bart Van Assche
Move the SCSI host template definition after the definition of the functions that it references. Remove the forward declarations that became unnecessary by that change. This patch does not change any functionality. Cc: Himanshu Madhani Cc: Giridhar Malavali Signed-off-by: Bart Van Assche --- d

[PATCH 09/11] qla2xxx: Unregister chrdev if module initialization fails

2019-04-04 Thread Bart Van Assche
If module initialization fails after the character device has been registered, unregister the character device. Additionally, avoid duplicating error path code. Cc: Himanshu Madhani Cc: Giridhar Malavali Fixes: 6a03b4cd78f3 ("[SCSI] qla2xxx: Add char device to increase driver use count") # v2.6

[PATCH 10/11] qla2xxx: Unregister resources in the opposite order of the registration order

2019-04-04 Thread Bart Van Assche
Make sure that resources are only unregistered after the users of these resources have been unregistered. Only unregister the character device if registration of it succeeded. Cc: Himanshu Madhani Cc: Giridhar Malavali Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_os.c | 9 +-

[PATCH 07/11] qla2xxx: Make qla2x00_process_response_queue() easier to read

2019-04-04 Thread Bart Van Assche
Make qla2x00_process_response_queue() easier to read by splitting this function. This patch does not change any functionality. Cc: Himanshu Madhani Cc: Giridhar Malavali Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_isr.c | 85 +++--- 1 file changed, 4

[PATCH 08/11] qla2xxx: Use get/put_unaligned where appropriate

2019-04-04 Thread Bart Van Assche
This patch makes the code easier to read but does not change any functionality. Cc: Himanshu Madhani Cc: Giridhar Malavali Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_bsg.c | 2 +- drivers/scsi/qla2xxx/qla_iocb.c | 21 + drivers/scsi/qla2xxx/qla_nvme.c |

[PATCH 00/11] qla2xxx patches for kernel v5.2

2019-04-04 Thread Bart Van Assche
Hi Martin, This is a series with mostly source code cleanup patches for the qla2xxx driver. Please consider this patch series for kernel v5.2. Thanks, Bart. Bart Van Assche (11): Declare wwn_to_u64() argument const qla2xxx: Change a stack variable into a static const variable qla2xxx: Rem

[PATCH 04/11] qla2xxx: Use ARRAY_SIZE() in the definition of QLA_LAST_SPEED

2019-04-04 Thread Bart Van Assche
Make the code easier to read by avoiding to use a hard-coded constant. This patch does not change any functionality. Cc: Himanshu Madhani Cc: Giridhar Malavali Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_isr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[PATCH 02/11] qla2xxx: Change a stack variable into a static const variable

2019-04-04 Thread Bart Van Assche
Make qla2x00_get_host_fabric_name() slightly faster by changing a stack array into a static array. Declare that array const now that the wwn_to_u64() argument pointer has been declared const. Cc: Himanshu Madhani Cc: Giridhar Malavali Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla

[PATCH 01/11] Declare wwn_to_u64() argument const

2019-04-04 Thread Bart Van Assche
Since the wwn_to_u64() function does not change its input, make its argument const. Cc: James Smart Cc: Hannes Reinecke Cc: Johannes Thumshirn Cc: Steffen Maier Signed-off-by: Bart Van Assche --- include/scsi/scsi_transport_fc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

[PATCH 05/11] qla2xxx: Declare local symbols static

2019-04-04 Thread Bart Van Assche
This patch avoids that sparse complains that a declaration is missing. Cc: Himanshu Madhani Cc: Giridhar Malavali Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_os.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scs

[PATCH 03/11] qla2xxx: Remove a comment that refers to the SCSI host lock

2019-04-04 Thread Bart Van Assche
Since qla2xxx_queuecommand() no longer takes the SCSI host lock, remove a comment that refers to the host lock. Cc: Himanshu Madhani Cc: Giridhar Malavali Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_os.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/scsi/qla2xxx

RE: [PATCH] usb: uas: fix usb subsystem hang after power off hub port

2019-04-04 Thread Alan Stern
On Thu, 4 Apr 2019 kento.a.kobaya...@sony.com wrote: > Hi, > > >> Root Cause > >> - Block layer timeout happens after power off UAS USB device which is > >> accessed as reproduce step. During timeout error handler process, scsi > >> host state becomes SHOST_CANCEL_RECOVERY that causes IO hangs

Re: [PATCH V4 7/7] SCSI: don't hold device refcount in IO path

2019-04-04 Thread Bart Van Assche
On Thu, 2019-04-04 at 16:43 +0800, Ming Lei wrote: > scsi_device's refcount is always grabbed in IO path. > > Turns out it isn't necessary, because blk_queue_cleanup() will > drain any in-flight IOs, then cancel timeout/requeue work, and > SCSI's requeue_work is canceled too in __scsi_remove_devic

Re: [PATCH V4 1/7] blk-mq: grab .q_usage_counter when queuing request from plug code path

2019-04-04 Thread Bart Van Assche
On Thu, 2019-04-04 at 16:43 +0800, Ming Lei wrote: > Just like aio/io_uring, we need to grab 2 refcount for queuing one > request, one is for submission, another is for completion. > > If the request isn't queued from plug code path, the refcount grabbed > in generic_make_request() serves for subm

Re: [PATCH V4 3/7] blk-mq: quiesce queue before updating nr_hw_queues

2019-04-04 Thread Bart Van Assche
On Thu, 2019-04-04 at 16:43 +0800, Ming Lei wrote: > diff --git a/block/blk-mq.c b/block/blk-mq.c > index b512ba0cb359..41c12d9008b7 100644 > --- a/block/blk-mq.c > +++ b/block/blk-mq.c > @@ -3224,8 +3224,11 @@ static void __blk_mq_update_nr_hw_queues(struct > blk_mq_tag_set *set, > if (nr

Re: [PATCH] SCSI: unconditionally clean was_reset

2019-04-04 Thread Bart Van Assche
On Thu, 2019-04-04 at 16:47 +0200, Oliver Neukum wrote: > If a reset of a SCSI device requires no relocking of the door, the > flag must be reset anyway, lest it trigger unnecessary door action > later on. > > Signed-off-by: Oliver Neukum > --- > drivers/scsi/scsi_error.c | 5 ﭗ橸ṷ梧뇪觬(), 3 dele

[PATCH] SCSI: unconditionally clean was_reset

2019-04-04 Thread Oliver Neukum
If a reset of a SCSI device requires no relocking of the door, the flag must be reset anyway, lest it trigger unnecessary door action later on. Signed-off-by: Oliver Neukum --- drivers/scsi/scsi_error.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/scsi_er