Re: Another (ESP?) scsi blk-mq problem on sparc64

2015-01-29 Thread Jens Axboe
On 01/28/2015 11:53 PM, Meelis Roos wrote: On Mon, 24 Nov 2014, David Miller wrote: From: mr...@linux.ee Date: Tue, 25 Nov 2014 00:23:20 +0200 (EET) Yes, that does look like the case. Do you have a good trick on how to allocate a map for the highest possible cpu number without first

Re: usb-storage URB use-after-free

2015-01-29 Thread Alan Stern
On Wed, 28 Jan 2015, Joe Lawrence wrote: This one should have gone over to linux-usb. -- Joe On 01/28/2015 05:04 PM, Joe Lawrence wrote: Hello linux-usb, We've hit a USB use-after-free on Stratus HW during device removal tests. We're running fio disk I/O to a scsi disk hanging off

Re: [PATCH 0/17] Clear up bidi command confusion

2015-01-29 Thread Boaz Harrosh
On 01/29/2015 04:41 PM, James Bottomley wrote: On Thu, 2015-01-29 at 15:00 +0200, Boaz Harrosh wrote: On 01/23/2015 03:12 PM, Christoph Hellwig wrote: On Fri, Jan 23, 2015 at 01:05:30PM +0100, Bart Van Assche wrote: There is some confusion in the SCSI core and in SCSI LLDs around the meaning

kobject (00000000008e10d8): tried to init an initialized object, something is seriously wrong.

2015-01-29 Thread Meelis Roos
Tried 3.19.0-rc6-00105-gc59c961-dirty (first kernel after 3.18) on Sun E3000 (spoarc64), got a bunch on warnings in blk_mq_register_disk. After that, it seems to work fine. -dirty means the following patch to fix the warnings in Another (ESP?) scsi blk-mq problem on sparc64 thread from Nov 14

Re: [PATCH 1/1] [PATCH REGRESSION] alua: fix bus detach oops

2015-01-29 Thread Hannes Reinecke
On 01/28/2015 10:46 AM, micha...@cs.wisc.edu wrote: From: Mike Christie micha...@cs.wisc.edu This fixes a regression caused by commit 1d5203284d8acbdfdf9b478d434450b34f338f28 The bug is that the alua detach() callout will try to access the sddev-scsi_dh_data, but we have already set it to

raid1 narrow_write_error with 4K disks, sd bad block number requested messages

2015-01-29 Thread Nate Dailey
I'm writing about something that appears to be an issue with raid1's narrow_write_error, particular to non-512-byte-sector disks. Here's what I'm doing: - 2 disk raid1, 4K disks, each connected to a different SAS HBA - mount a filesystem on the raid1, run a test that writes to it - remove one

Re: [PATCH 1/1] [PATCH REGRESSION] alua: fix bus detach oops

2015-01-29 Thread Mike Christie
On 01/29/2015 02:45 AM, Hannes Reinecke wrote: On 01/28/2015 10:46 AM, micha...@cs.wisc.edu wrote: From: Mike Christie micha...@cs.wisc.edu This fixes a regression caused by commit 1d5203284d8acbdfdf9b478d434450b34f338f28 The bug is that the alua detach() callout will try to access the

Re: [PATCH 1/1] [PATCH REGRESSION] alua: fix bus detach oops

2015-01-29 Thread Christoph Hellwig
On Thu, Jan 29, 2015 at 09:45:24AM +0100, Hannes Reinecke wrote: Errm. We save the contents first: struct scsi_device_handler *scsi_dh = scsi_dh_data-scsi_dh; Then set the pointer to NULL: sdev-scsi_dh_data = NULL; and then call 'detach': scsi_dh-detach(sdev);

Re: [PATCH v2 0/6] scsi: Some seq_file cleanups/optimizations

2015-01-29 Thread Rasmus Villemoes
On Thu, Jan 29 2015, Finn Thain fth...@telegraphics.com.au wrote: I have one reservation about this patch series. For example, the changes, - seq_printf(m, %s, p); + seq_puts(m, p); These calls are not equivalent because the bounds check is not the same. seq_puts will fail when

[PATCH 4/4] Update driver version to 3.2.25.0

2015-01-29 Thread anil.gurumurthy
From: Anil Gurumurthy anil.gurumur...@qlogic.com Signed-off-by: Sudarsana Kalluru sudarsana.kall...@qlogic.com Signed-off-by: Anil Gurumurthy anil.gurumur...@qlogic.com --- drivers/scsi/bfa/bfad_drv.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[PATCH 3/4] File header and user visible string changes

2015-01-29 Thread anil.gurumurthy
From: Anil Gurumurthy anil.gurumur...@qlogic.com Signed-off-by: Sudarsana Kalluru sudarsana.kall...@qlogic.com Signed-off-by: Anil Gurumurthy anil.gurumur...@qlogic.com --- drivers/scsi/bfa/bfa.h |2 +- drivers/scsi/bfa/bfa_core.c |2 +- drivers/scsi/bfa/bfa_cs.h|

[PATCH 1/4] Updating copyright messages

2015-01-29 Thread anil.gurumurthy
From: Anil Gurumurthy anil.gurumur...@qlogic.com Signed-off-by: Sudarsana Kalluru sudarsana.kall...@qlogic.com Signed-off-by: Anil Gurumurthy anil.gurumur...@qlogic.com --- drivers/scsi/bfa/bfa.h |5 +++-- drivers/scsi/bfa/bfa_core.c |5 +++-- drivers/scsi/bfa/bfa_cs.h

[PATCH 0/4] bfa: Patches for scsi misc branch

2015-01-29 Thread anil.gurumurthy
Hi James, Christoph, Please apply the following patches to the scsi tree, misc branch at your earliest convenience. Thanks, Anil Anil Gurumurthy (4): Updating copyright messages Fix for crash when bfa_itnim is NULL File header and user visible string changes Update driver version to

[PATCH 2/4] Fix for crash when bfa_itnim is NULL

2015-01-29 Thread anil.gurumurthy
From: Anil Gurumurthy anil.gurumur...@qlogic.com Signed-off-by: Sudarsana Kalluru sudarsana.kall...@qlogic.com Signed-off-by: Anil Gurumurthy anil.gurumur...@qlogic.com --- drivers/scsi/bfa/bfa_fcs_lport.c |2 +- drivers/scsi/bfa/bfad_im.c | 26 ++ 2 files

Re: Another (ESP?) scsi blk-mq problem on sparc64

2015-01-29 Thread Meelis Roos
On Mon, 24 Nov 2014, David Miller wrote: From: mr...@linux.ee Date: Tue, 25 Nov 2014 00:23:20 +0200 (EET) Yes, that does look like the case. Do you have a good trick on how to allocate a map for the highest possible cpu number without first iterating the cpu map? I couldn't

Re: module: fix module_refcount() return when running in a module exit routine

2015-01-29 Thread Bart Van Assche
On 01/28/15 22:45, James Bottomley wrote: On Wed, 2015-01-28 at 10:23 +0100, Bart Van Assche wrote: Is this the latest version of this patch that is available ? I have tried to test the above patch. However, I couldn't test the impact of this patch on the SRP initiator driver since my test

Re: [PATCH] IB/srp: Process REQ_PREEMPT requests correctly

2015-01-29 Thread Sagi Grimberg
On 1/29/2015 3:02 PM, Bart Van Assche wrote: Delay REQ_PREEMPT requests submitted against a blocked device until the device is unblocked by returning SCSI_MLQUEUE_HOST_BUSY to the SCSI mid-layer. This avoids that a rescan shortly after a cable pull sporadically triggers the following kernel

Re: [PATCH] scsi, be2iscsi, LLVMLinux: Add missing MODULE_DEVICE_TABLE()

2015-01-29 Thread Arnd Bergmann
On Wednesday 28 January 2015 17:37:02 Behan Webster wrote: Missing MODULE_DEVICE_TABLE for pci ids from be2iscsi driver found by clang. Signed-off-by: Behan Webster beh...@converseincode.com Reviewed-by: Mark Charlebois charl...@gmail.com Suggested-by: Arnd Bergmann a...@arndb.de Cc: Arnd

Re: [PATCH 0/17] Clear up bidi command confusion

2015-01-29 Thread Boaz Harrosh
On 01/23/2015 03:12 PM, Christoph Hellwig wrote: On Fri, Jan 23, 2015 at 01:05:30PM +0100, Bart Van Assche wrote: There is some confusion in the SCSI core and in SCSI LLDs around the meaning of sc_data_direction and whether or not this member can have the value DMA_BIDIRECTIONAL. Clear up this

[PATCH] IB/srp: Process REQ_PREEMPT requests correctly

2015-01-29 Thread Bart Van Assche
Delay REQ_PREEMPT requests submitted against a blocked device until the device is unblocked by returning SCSI_MLQUEUE_HOST_BUSY to the SCSI mid-layer. This avoids that a rescan shortly after a cable pull sporadically triggers the following kernel oops: BUG: unable to handle kernel paging request

Re: [PATCH 0/17] Clear up bidi command confusion

2015-01-29 Thread Boaz Harrosh
On 01/26/2015 11:58 AM, Bart Van Assche wrote: Hello Christoph, This makes sense to me. I will rework this patch series as you proposed. Do you have a bidi setup to test against? Sending xor command to scsi_dbg is only half the test for me because, yes there are two buffers, but they are

Re: [PATCH 0/17] Clear up bidi command confusion

2015-01-29 Thread Bart Van Assche
On 01/29/15 14:07, Boaz Harrosh wrote: On 01/26/2015 11:58 AM, Bart Van Assche wrote: Hello Christoph, This makes sense to me. I will rework this patch series as you proposed. Do you have a bidi setup to test against? Sending xor command to scsi_dbg is only half the test for me

Re: [PATCH v2 0/6] scsi: Some seq_file cleanups/optimizations

2015-01-29 Thread Steven Rostedt
On Thu, 29 Jan 2015 10:16:16 +0100 Rasmus Villemoes li...@rasmusvillemoes.dk wrote: Steven, you've been doing some cleanup in this area, among other things trying to make all the seq_* functions return void. Could you fill me in on the status of that? Yes, the entire seq_*() operations are

Re: [PATCH 0/17] Clear up bidi command confusion

2015-01-29 Thread Boaz Harrosh
On 01/29/2015 03:20 PM, Bart Van Assche wrote: On 01/29/15 14:07, Boaz Harrosh wrote: On 01/26/2015 11:58 AM, Bart Van Assche wrote: Hello Christoph, This makes sense to me. I will rework this patch series as you proposed. Do you have a bidi setup to test against? Sending xor command to

Re: [PATCH 0/17] Clear up bidi command confusion

2015-01-29 Thread James Bottomley
On Thu, 2015-01-29 at 15:00 +0200, Boaz Harrosh wrote: On 01/23/2015 03:12 PM, Christoph Hellwig wrote: On Fri, Jan 23, 2015 at 01:05:30PM +0100, Bart Van Assche wrote: There is some confusion in the SCSI core and in SCSI LLDs around the meaning of sc_data_direction and whether or not this

Re: [PATCH 3/3] scsi: proper state checking and module refcount handling in scsi_device_get

2015-01-29 Thread James Bottomley
On Thu, 2015-01-29 at 00:00 +0100, Christoph Hellwig wrote: This effectively reverts commits 85b6c7 ([SCSI] sd: fix cache flushing on module removal (and individual device removal) and dc4515ea (scsi: always increment reference count). We now never call scsi_device_get from the shutdown

Re: [PATCH] IB/srp: Process REQ_PREEMPT requests correctly

2015-01-29 Thread Mike Christie
On 1/29/15, 7:02 AM, Bart Van Assche wrote: Delay REQ_PREEMPT requests submitted against a blocked device until the device is unblocked by returning SCSI_MLQUEUE_HOST_BUSY to the SCSI mid-layer. This avoids that a rescan shortly after a cable pull sporadically triggers the following kernel oops:

Re: [PATCH 1/3] scsi: serialize -rescan against -remove

2015-01-29 Thread Alan Stern
On Thu, 29 Jan 2015, Christoph Hellwig wrote: Lock the device embedded in the scsi_device to protect against concurrent calls to -remove. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/scsi_scan.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git

[PATCH 1/1] scsi: Fix max transfer length for 4k disks

2015-01-29 Thread Brian King
The following patch fixes an issue observed with 4k sector disks where the max_hw_sectors attribute was getting set too large in sd_revalidate_disk. Since sdkp-max_xfer_blocks is in units of SCSI logical blocks and queue_max_hw_sectors is in units of 512 byte blocks, on a 4k sector disk, every

Re: [PATCH 1/1] scsi: Fix max transfer length for 4k disks

2015-01-29 Thread Martin K. Petersen
Brian == Brian King brk...@linux.vnet.ibm.com writes: Brian on a 4k sector disk, every time we went through Brian sd_revalidate_disk, we were taking the current value of Brian queue_max_hw_sectors and increasing it by a factor of 8. Fix this Brian by only shifting sdkp-max_xfer_blocks. *blush*

Re: [PATCH v2 2/6] scsi/advansys: Replace seq_printf with seq_puts

2015-01-29 Thread Finn Thain
Reviewed-by: Finn Thain fth...@telegraphics.com.au On Wed, 3 Dec 2014, Rasmus Villemoes wrote: Using seq_printf to print a simple string is a lot more expensive than it needs to be, since seq_puts exists. Replace seq_printf with seq_puts when possible. Signed-off-by: Rasmus Villemoes

Re: [PATCH] IB/srp: Process REQ_PREEMPT requests correctly

2015-01-29 Thread Mike Christie
On 1/29/15, 1:38 PM, Mike Christie wrote: On 1/29/15, 7:02 AM, Bart Van Assche wrote: Delay REQ_PREEMPT requests submitted against a blocked device until the device is unblocked by returning SCSI_MLQUEUE_HOST_BUSY to the SCSI mid-layer. This avoids that a rescan shortly after a cable pull

Re: [PATCH 1/3] scsi: serialize -rescan against -remove

2015-01-29 Thread Paolo Bonzini
On 29/01/2015 00:00, Christoph Hellwig wrote: Lock the device embedded in the scsi_device to protect against concurrent calls to -remove. Signed-off-by: Christoph Hellwig h...@lst.de I wonder if this makes this problem: https://lkml.org/lkml/2015/1/5/9 go away. Paolo ---

[PATCHv2 5/5] scsi: move scsi/sg.h to uapi/linux/sg.h

2015-01-29 Thread Andy Grover
This will enable user programs to have access to the most current definitions. Modify include sites for new path. Signed-off-by: Andy Grover agro...@redhat.com --- block/bio.c| 2 +- block/blk-map.c| 2 +- block/bsg.c| 2 +-

[PATCHv2 0/5] Move headers to uapi/linux

2015-01-29 Thread Andy Grover
Hi James and hch, here's v2 with the headers exported in uapi/linux/* instead of uapi/scsi/*, based upon your feedback. v2 also additionally moves sg.h. Also, you mentioned dropping obsolete SPC-2 opcodes from these headers, but I wasn't sure what was safe to drop. Candidates? Against

[PATCHv2 3/5] scsi: Move user-shareable stuff in scsi/scsi.h to uapi/linux/scsi.h

2015-01-29 Thread Andy Grover
A great many SCSI codes can be made available to userspace in a uapi header, while the kernel-only definitions stay in scsi/scsi.h. This will permit userspace apps to stop using the antiquated definitions available in glibc's scsi/scsi.h, which are very old and incomplete. scsi/scsi.h also

[PATCHv2 1/5] scsi: add WRITE_VERIFY_16 to scsi.h

2015-01-29 Thread Andy Grover
Signed-off-by: Andy Grover agro...@redhat.com --- include/scsi/scsi.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index d0a66aa..cf778fe 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h @@ -150,6 +150,7 @@ enum scsi_timeouts { #define

[PATCHv2 4/5] scsi: Move scsi/scsi_ioctl.h to uapi/linux/scsi_ioctl.h

2015-01-29 Thread Andy Grover
Make all scsi ioctl-related definitions available via a uapi header. Change files referencing scsi/scsi_ioctl.h to refer to uapi/linux/scsi_ioctl.h. Signed-off-by: Andy Grover agro...@redhat.com --- block/bsg.c| 2 +- block/scsi_ioctl.c | 2 +-

[PATCHv2 2/5] scsi: Move ioctl defs from scsi/scsi.h to scsi/scsi_ioctl.h

2015-01-29 Thread Andy Grover
These can be consolidated into scsi_ioctl.h with the other ones. Signed-off-by: Andy Grover agro...@redhat.com --- include/scsi/scsi.h | 21 - include/scsi/scsi_ioctl.h | 20 2 files changed, 20 insertions(+), 21 deletions(-) diff --git

Re: [PATCH v2 6/6] scsi: misc: Print single-character strings with seq_putc

2015-01-29 Thread Finn Thain
Reviewed-by: Finn Thain fth...@telegraphics.com.au For the NCR5380 bits: Acked-by: Finn Thain fth...@telegraphics.com.au On Wed, 3 Dec 2014, Rasmus Villemoes wrote: Using seq_putc to print a single character saves at least a strlen() call and a memory access, and may also give a small

Re: [PATCH 1/3] scsi: serialize -rescan against -remove

2015-01-29 Thread Fam Zheng
On Fri, 01/30 00:11, Paolo Bonzini wrote: On 29/01/2015 00:00, Christoph Hellwig wrote: Lock the device embedded in the scsi_device to protect against concurrent calls to -remove. Signed-off-by: Christoph Hellwig h...@lst.de I wonder if this makes this problem:

Re: [PATCHv2 5/5] scsi: move scsi/sg.h to uapi/linux/sg.h

2015-01-29 Thread James Bottomley
On Thu, 2015-01-29 at 16:56 -0800, Andy Grover wrote: This will enable user programs to have access to the most current definitions. Modify include sites for new path. Signed-off-by: Andy Grover agro...@redhat.com --- block/bio.c| 2 +- block/blk-map.c

Re: [PATCH v2 4/6] scsi: misc: Replace seq_printf with seq_puts

2015-01-29 Thread Finn Thain
Reviewed-by: Finn Thain fth...@telegraphics.com.au For the NCR5380 bits: Acked-by: Finn Thain fth...@telegraphics.com.au On Wed, 3 Dec 2014, Rasmus Villemoes wrote: Using seq_printf to print a simple string is a lot more expensive than it needs to be, since seq_puts exists. Replace

Re: [PATCH v2 3/6] scsi/aha152x: Replace seq_printf with seq_puts

2015-01-29 Thread Finn Thain
Reviewed-by: Finn Thain fth...@telegraphics.com.au On Wed, 3 Dec 2014, Rasmus Villemoes wrote: Using seq_printf to print a simple string is a lot more expensive than it needs to be, since seq_puts exists. Replace seq_printf with seq_puts when possible. Signed-off-by: Rasmus Villemoes

Re: [PATCHv2 3/5] scsi: Move user-shareable stuff in scsi/scsi.h to uapi/linux/scsi.h

2015-01-29 Thread James Bottomley
On Thu, 2015-01-29 at 16:56 -0800, Andy Grover wrote: A great many SCSI codes can be made available to userspace in a uapi header, while the kernel-only definitions stay in scsi/scsi.h. This will permit userspace apps to stop using the antiquated definitions available in glibc's scsi/scsi.h,

Re: [PATCH 1/1] scsi: Fix max transfer length for 4k disks

2015-01-29 Thread Paolo Bonzini
On 29/01/2015 22:54, Brian King wrote: The following patch fixes an issue observed with 4k sector disks where the max_hw_sectors attribute was getting set too large in sd_revalidate_disk. Since sdkp-max_xfer_blocks is in units of SCSI logical blocks and queue_max_hw_sectors is in units of

Re: [PATCH v2 1/6] scsi: Remove SPRINTF macro

2015-01-29 Thread Finn Thain
On Wed, 3 Dec 2014, Rasmus Villemoes wrote: The macro SPRINTF doesn't save a lot of typing or make the code more readable, and depending on a specific identifier (m) in the surrounding scope is generally frowned upon. Nuke it. Yes. I was going to eliminate this macro from NCR5380.c too, for

Re: [PATCH 2/4] Fix for crash when bfa_itnim is NULL

2015-01-29 Thread Julian Calaby
Hi Anil, On Thu, Jan 29, 2015 at 7:55 PM, anil.gurumur...@qlogic.com wrote: From: Anil Gurumurthy anil.gurumur...@qlogic.com Signed-off-by: Sudarsana Kalluru sudarsana.kall...@qlogic.com Signed-off-by: Anil Gurumurthy anil.gurumur...@qlogic.com --- drivers/scsi/bfa/bfa_fcs_lport.c |2

Re: [PATCH v2 5/6] scsi: misc: Merge consecutive seq_puts calls

2015-01-29 Thread Finn Thain
Reviewed-by: Finn Thain fth...@telegraphics.com.au On Wed, 3 Dec 2014, Rasmus Villemoes wrote: Consecutive seq_puts calls with literal strings may be replaced by a single call, saving a little .text. Signed-off-by: Rasmus Villemoes li...@rasmusvillemoes.dk --- drivers/scsi/advansys.c