Re: Persistent Reservation API

2015-08-26 Thread Hannes Reinecke
On 08/11/2015 11:30 AM, David Disseldorp wrote: > Hi Christoph, > > On Tue, 4 Aug 2015 09:11:05 +0200, Christoph Hellwig wrote: > >> This series adds support for a simplified persistent reservation API >> to the block layer. The intent is that both in-kernel and userspace >> consumers can use t

Re: [PATCH] fix: lpfc_send_rscn_event sends bigger buffer size

2015-08-26 Thread Hannes Reinecke
On 08/20/2015 01:35 PM, Ales Novak wrote: > lpfc_send_rscn_event() allocates data for sizeof(struct > lpfc_rscn_event_header) + payload_len, but claims that the data has size > of sizeof(struct lpfc_els_event_header) + payload_len. That leads to > buffer overruns. > > Signed-off-by: Ales Novak >

Re: SCSI scanning behavior

2015-08-26 Thread Hannes Reinecke
On 08/21/2015 12:11 AM, Brian King wrote: > In one of our SAN test labs where there is some storage controller error > injection going on, > I'm seeing some interesting behavior. We are getting into a scenario, when > the target is coming > back where we are going through SCSI scan for it and the

RE: [PATCH] megaraid_sas: init tasklet earlier

2015-08-26 Thread Sumit Saxena
> -Original Message- > From: Tomas Henzl [mailto:the...@redhat.com] > Sent: Tuesday, August 25, 2015 7:02 PM > To: linux-scsi@vger.kernel.org > Cc: kashyap.de...@avagotech.com; kiran-kumar.kast...@avagotech.com; > sumit.sax...@avagotech.com > Subject: [PATCH] megaraid_sas: init tasklet earl

Re: SCSI scanning behavior

2015-08-26 Thread Bart Van Assche
On 08/26/15 06:02, Hannes Reinecke wrote: On 08/21/2015 12:11 AM, Brian King wrote: However, I'm still left wondering why we are adding PQ=1, PDT=0 devices in the sequential LUN scan at all. Are there media changer devices out there that we've seen respond like this? Even so, does it make sens

Re: [PATCH 1/3] hpsa: convert show method snprintf usage to scnprintf

2015-08-26 Thread James Bottomley
On Wed, 2015-07-01 at 03:45 +, Seymour, Shane M wrote: > Changed all show method snprintf usage to scnprintf per > Documentation/filesystems/sysfs.txt. > > Signed-off-by: Shane Seymour There's been no ack on this one. However, there's no actual reason to prefer scnprintf over snprintf: the

Re: [PATCH] aic94xx: Skip reading user settings if flash is not found

2015-08-26 Thread James Bottomley
On Mon, 2015-07-06 at 13:07 +0200, Hannes Reinecke wrote: > If no user settings are found it's pointless trying to > read them from flash. So skip that step. > This also fixes a compilation warning about uninitialized variables in > aic94xx. > > Signed-off-by: Hannes Reinecke This patch looks fi

Re: [PATCH] megaraid_sas: init tasklet earlier

2015-08-26 Thread Tomas Henzl
On 26.8.2015 15:15, Sumit Saxena wrote: >> -Original Message- >> From: Tomas Henzl [mailto:the...@redhat.com] >> Sent: Tuesday, August 25, 2015 7:02 PM >> To: linux-scsi@vger.kernel.org >> Cc: kashyap.de...@avagotech.com; kiran-kumar.kast...@avagotech.com; >> sumit.sax...@avagotech.com >> S

Re: [PATCH v3 3/3] megaraid_sas : fix whitespace errors

2015-08-26 Thread James Bottomley
On Tue, 2015-07-07 at 15:52 -0500, Bjorn Helgaas wrote: > Fix whitespace and indentation errors. No code change. checkpatch says you missed one: ERROR: space required after that ',' (ctx:VxV) #860: FILE: drivers/scsi/megaraid/megaraid_sas_base.c:6457: + if (sscanf(buf,"%u",&megasas_dbg_lvl

Persistent Reservation API V3

2015-08-26 Thread Christoph Hellwig
This series adds support for a simplified Persistent Reservation API to the block layer. The intent is that both in-kernel and userspace consumers can use the API instead of having to hand craft SCSI or NVMe command through the various pass through interfaces. It also adds DM support as getting r

[PATCH 1/5] block: cleanup blkdev_ioctl

2015-08-26 Thread Christoph Hellwig
Split out helpers for all non-trivial ioctls to make this function simpler, and also start passing around a pointer version of the argument, as that's what most ioctl handlers actually need. Signed-off-by: Christoph Hellwig --- block/ioctl.c | 227

Persistent Reservation API V3

2015-08-26 Thread Christoph Hellwig
This series adds support for a simplified Persistent Reservation API to the block layer. The intent is that both in-kernel and userspace consumers can use the API instead of having to hand craft SCSI or NVMe command through the various pass through interfaces. It also adds DM support as getting r

Re: Persistent Reservation API V3

2015-08-26 Thread Christoph Hellwig
Meh, looks like the train wifi is too bad to send out a whole patch series. I'll resend once I've arrived.. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.h

Persistent Reservation API V3

2015-08-26 Thread Christoph Hellwig
This series adds support for a simplified Persistent Reservation API to the block layer. The intent is that both in-kernel and userspace consumers can use the API instead of having to hand craft SCSI or NVMe command through the various pass through interfaces. It also adds DM support as getting r

[PATCH 4/5] dm: refactor ioctl handling

2015-08-26 Thread Christoph Hellwig
This moves the call to blkdev_ioctl and the argument checking to core code, and only leaves a callout to find the block device to operate on it the targets. This will simplifies the code and will allow us to pass through ioctl-like command using other methods in the next patch. Also split out a h

[PATCH 5/5] dm: add support for passing through persistent reservations

2015-08-26 Thread Christoph Hellwig
This adds support to pass through persistent reservation requests similar to the existing ioctl handling, and with the same limitations, e.g. devices may only have a single target attached. This is mostly intended for multipathing. Signed-off-by: Christoph Hellwig --- drivers/md/dm.c | 123

[PATCH 3/5] sd: implement the Persistent Reservation API

2015-08-26 Thread Christoph Hellwig
This is a mostly trivial mapping to the PERSISTENT RESERVE IN/OUT commands. Signed-off-by: Christoph Hellwig --- drivers/scsi/sd.c | 94 +++ 1 file changed, 94 insertions(+) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 160e44e..df8

[PATCH 2/5] block: add an API for Persistent Reservations

2015-08-26 Thread Christoph Hellwig
This commits adds a driver API and ioctls for controlling Persistent Reservations s/genericly/generically/ at the block layer. Persistent Reservations are supported by SCSI and NVMe and allow controlling who gets access to a device in a shared storage setup. Note that we add a pr_ops structure to

[PATCH 1/5] block: cleanup blkdev_ioctl

2015-08-26 Thread Christoph Hellwig
Split out helpers for all non-trivial ioctls to make this function simpler, and also start passing around a pointer version of the argument, as that's what most ioctl handlers actually need. Signed-off-by: Christoph Hellwig --- block/ioctl.c | 227

Re: [PATCH v3 05/10] qla2xxx: Remove __constant_ prefix

2015-08-26 Thread James Bottomley
On Thu, 2015-07-09 at 07:24 -0700, Bart Van Assche wrote: > Whether htonl() or __constant_htonl() is used, if the argument > is a constant the conversion happens at compile time. Hence leave > out the __constant_ prefix for this and other endianness > conversion functions. This improves source code

Re: [PATCH v3 10/10] qla2xxx: Avoid that sparse complains about context imbalances

2015-08-26 Thread James Bottomley
On Thu, 2015-07-09 at 07:25 -0700, Bart Van Assche wrote: > Surround conditional locking statements with "#ifndef __CHECKER__" / > "#endif" to hide these for the sparse static source code analysis > tool. Thanks! I know I whine alot about checkpatch but having drivers sparse clean like this one n

[scsi:misc 35/39] drivers/scsi/qla2xxx/qla_iocb.c:1972:18: sparse: incorrect type in assignment (different base types)

2015-08-26 Thread kbuild test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git misc head: 8d16366b5f23e928e5fd22eaeaceeb0356921fc0 commit: 118e2ef9df2297147706d21d2a1dfeefea878c5a [35/39] qla2xxx: Avoid that sparse complains about duplicate [noderef] attributes reproduce: # apt-get install sparse git c

Re: IO failures with SMR drives at latest kernel versions

2015-08-26 Thread Anatol Pomozov
Hi The same issue was reported here http://www.spinics.net/lists/linux-ide/msg50641.html Adding Adrian from Seagate to help track down this issue. On Tue, Aug 25, 2015 at 11:40 PM, Hannes Reinecke wrote: > On 08/26/2015 06:53 AM, Anatol Pomozov wrote: >> Hi >> >> On Sun, Aug 23, 2015 at 11:15 P

Re: [scsi:misc 35/39] drivers/scsi/qla2xxx/qla_iocb.c:1972:18: sparse: incorrect type in assignment (different base types)

2015-08-26 Thread Bart Van Assche
On 08/26/2015 02:04 PM, kbuild test robot wrote: tree: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git misc head: 8d16366b5f23e928e5fd22eaeaceeb0356921fc0 commit: 118e2ef9df2297147706d21d2a1dfeefea878c5a [35/39] qla2xxx: Avoid that sparse complains about duplicate [noderef] attri

Re: [PATCH v6 2/3] cxlflash: Superpipe support

2015-08-26 Thread Brian King
Hi Matt, Some comments below. I'm happy to see this one get merged as-is, as long as these issues can get addressed in a follow on patch. Reviewed-by: Brian King On 08/13/2015 09:47 PM, Matthew R. Ochs wrote: > +/** > + * cxlflash_term_global_luns() - frees resources associated with global LUN

Re: IO failures with SMR drives at latest kernel versions

2015-08-26 Thread James Bottomley
On Wed, 2015-08-26 at 08:40 +0200, Hannes Reinecke wrote: > On 08/26/2015 06:53 AM, Anatol Pomozov wrote: > > Hi > > > > On Sun, Aug 23, 2015 at 11:15 PM, Hannes Reinecke wrote: > >>> I looked at this commit and it actually adds SMR support to SCSI > >>> layer. Reverting ATA_DEV_ZAC means going b

[PATCH] cxlflash: Remove unused variable from queuecommand

2015-08-26 Thread Matthew R. Ochs
The queuecommand routine has a local dev pointer used for the dev_* prints. The two prints that currently exist are tucked under a debug define and thus can be left out. Use the actual location instead of a local to avoid this warning. This patch is intended to be applied after the "CXL Flash Erro

Re: [scsi 5/7 RESEND] scsi_debug: schedule_resp fix input variable check

2015-08-26 Thread James Bottomley
On Tue, 2015-08-25 at 21:03 +, Winkler, Tomas wrote: > > > > + /* this should never happen */ > > > + if (WARN_ON(!cmnd)) > > > + return SCSI_MLQUEUE_HOST_BUSY; > > > > > > - if (NULL == cmnd || NULL == devip) { > > > - pr_warn("called with NULL cmnd or devip pointer\n"); > > >

Re: [PATCH] cxlflash: Remove unused variable from queuecommand

2015-08-26 Thread Nicholas A. Bellinger
Hi Matthew, On Wed, 2015-08-26 at 18:36 -0500, Matthew R. Ochs wrote: > The queuecommand routine has a local dev pointer used for the > dev_* prints. The two prints that currently exist are tucked > under a debug define and thus can be left out. Use the actual > location instead of a local to avoi

Re: [PATCH 0/2] mpt3sas: Reference counting fixes from in-flight mpt2sas

2015-08-26 Thread Calvin Owens
On Wednesday 08/26 at 04:09 +, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > Hi James & Co, > > This series is a mpt3sas forward port of Calvin Owens' in-flight > reference counting bugfixes for mpt2sas LLD code here: > > [PATCH v4 0/2] Fixes for memory corruption in mpt2sas >

Re: [PATCH 0/2] mpt3sas: Reference counting fixes from in-flight mpt2sas

2015-08-26 Thread Nicholas A. Bellinger
On Wed, 2015-08-26 at 16:54 -0700, Calvin Owens wrote: > On Wednesday 08/26 at 04:09 +, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > Hi James & Co, > > > > This series is a mpt3sas forward port of Calvin Owens' in-flight > > reference counting bugfixes for mpt2sas LLD co

Re: [Patch] scsi_error: should not get sense for timeout IO in scsi error handler

2015-08-26 Thread James Bottomley
On Fri, 2015-07-31 at 17:52 +0800, jiang.bi...@zte.com.cn wrote: > scsi_error: should not get sense for timeout IO in scsi error handler > > When an IO timeout occurs, the IO will be aborted in > scsi_abort_command() and SCSI_EH_ABORT_SCHEDULED will be set. Because > of that, the SCSI_EH_CANCEL_CM

Re: [PATCH RESEND V2 3/7] scsi: storvsc: Untangle the storage protocol negotiation from the vmbus protocol negotiation.

2015-08-26 Thread James Bottomley
On Thu, 2015-08-13 at 08:43 -0700, K. Y. Srinivasan wrote: > From: Keith Mange > > Currently we are making decisions based on vmbus protocol versions > that have been negotiated; use storage potocol versions instead. > > Tested-by: Alex Ng > Signed-off-by: Keith Mange > Signed-off-by: K. Y. Sr

Re: [PATCH v6 0/3] CXL Flash Error Recovery and Superpipe

2015-08-26 Thread Nicholas A. Bellinger
On Tue, 2015-08-25 at 23:56 -0700, Nicholas A. Bellinger wrote: > Hi Matthew & Co, > > On Thu, 2015-08-13 at 21:47 -0500, Matthew R. Ochs wrote: > > This patch set is intended for the 4.3 release and adds support for > > error recovery and the superpipe features provided by the IBM CXL > > Flash a

Re: [PATCH 2/2] mpt3sas: Refcount fw_events and fix unsafe list usage

2015-08-26 Thread Calvin Owens
On Wednesday 08/26 at 04:09 +, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > The fw_event_work struct is concurrently referenced at shutdown, so > add a refcount to protect it, and refactor the code to use it. > > Additionally, refactor _scsih_fw_event_cleanup_queue() such that

Re: [PATCH 1/2] mpt3sas: Refcount sas_device objects and fix unsafe list usage

2015-08-26 Thread Calvin Owens
On Wednesday 08/26 at 04:09 +, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > These objects can be referenced concurrently throughout the driver, we > need a way to make sure threads can't delete them out from under > each other. This patch adds the refcount, and refactors the co

Re: [PATCH 0/2] mpt3sas: Reference counting fixes from in-flight mpt2sas

2015-08-26 Thread Sreekanth Reddy
HI Nicholas & Calvin, Thanks for the patchset. Sure We will review and we do some unit testing on this patch series. Currently my bandwidth is occupied with some internal activity, so by end of next week I will acknowledge this series if all the thing are fine with this patch series. Thanks, Sree

Re: IO failures with SMR drives at latest kernel versions

2015-08-26 Thread Hannes Reinecke
On 08/27/2015 12:52 AM, James Bottomley wrote: > On Wed, 2015-08-26 at 08:40 +0200, Hannes Reinecke wrote: >> On 08/26/2015 06:53 AM, Anatol Pomozov wrote: >>> Hi >>> >>> On Sun, Aug 23, 2015 at 11:15 PM, Hannes Reinecke wrote: > I looked at this commit and it actually adds SMR support to SCSI

RE: [PATCH 1/3] hpsa: convert show method snprintf usage to scnprintf

2015-08-26 Thread Seymour, Shane M
Hi James, > There's been no ack on this one. However, there's no actual reason to > prefer scnprintf over snprintf: the former will zero terminate, the > latter won't if the write length is over the buffer length, but this is > a file buffer: the routine will return as many bytes to userspace as