Re: Persistent Reservation API

2015-08-11 Thread David Disseldorp
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 the API instead of having to hand craft SCSI or NVMe > comma

[PATCH V2 2/8] pm80xx: Corrected device state changes in I_T_Nexus_Reset.

2015-08-11 Thread Viswas.G
From: Viswas G In Nexus reset the device state request are not needed. Changes from V1: Device state change request has been removed as the firmware will handle it during internal cleanup. Also updated the proper return value in case of failures. Signed-off-by: Viswas G Reviewed-by: Suresh Th

[PATCH V2 0/8] pm80xx: Driver updates

2015-08-11 Thread Viswas.G
From: Viswas G This patch set contains bug fixes for pm80xx driver. Please consider these patches for next kernel release. Changes From V1: Corrected device state changes in I_T_Nexus_Reset. Viswas G (8): pm80xx: Updated link rate pm80xx: Corrected device state changes in I_T_Nexus_Reset.

[PATCH V2 5/8] pm80xx: Remove unnecessary phy disconnect while link error

2015-08-11 Thread Viswas.G
From: Viswas G If the link error happens, we don't need to disconnect the phy, which will remove the drive. Instead acknowledging the controller and logging the error will be enough. Changes From V1: None Signed-off-by: Viswas G Reviewed-by: Suresh Thiagarajan Reviewed-by: Hannes Reinecke R

[PATCH V2 4/8] pm80xx: Fix for Incorrect DMA Unmapping of SG List

2015-08-11 Thread Viswas.G
From: Viswas G In pm8001_ccb_task_free(), the dma unmapping is done based on ccb->n_elem value. This should be initialized to zero in the task_abort(). Otherwise, pm8001_ccb_task_free() will try for dma_unmap_sg() which is invalid for task abort and can lead to kernel crash. Changes From V1: Non

[PATCH V2 6/8] pm80xx: Add PORT RECOVERY TIMEOUT support

2015-08-11 Thread Viswas.G
From: Viswas G PORT RECOVERY TIMEOUT is the maximum time between the controller's detection of the PHY down until the receipt of the ID_Frame (from the same remote SAS port). If the time expires before the ID_FRAME is received, the port is considered INVALID and can be removed. The IOP_EVENT_PORT

[PATCH V2 7/8] pm80xx: Handling Invalid SSP Response frame

2015-08-11 Thread Viswas.G
From: Viswas G The request has to be retried incase if the length of the SSP Response IU is invalid. Changes From V1: None Signed-off-by: Viswas G Reviewed-by: Suresh Thiagarajan Reviewed-by: Hannes Reinecke Reviewed-by: Jack Wang Reviewed-by: Tomas Henzl --- drivers/scsi/pm8001/pm80xx_h

[PATCH V2 1/8] pm80xx: Updated link rate

2015-08-11 Thread Viswas.G
From: Viswas G Updated 12G linkrate to libsas. Changes from V1: None Signed-off-by: Viswas G Reviewed-by: Suresh Thiagarajan Reviewed-by: Hannes Reinecke Reviewed-by: Jack Wang Reviewed-by: Tomas Henzl --- drivers/scsi/pm8001/pm8001_defs.h |1 + drivers/scsi/pm8001/pm8001_hwi.c |

[PATCH V2 3/8] pm80xx: Update For Thermal Page Code

2015-08-11 Thread Viswas.G
From: Viswas G Thermal page code has been changed to 7 for the 12G controllers. Changes From V1: None Signed-off-by: Viswas G Reviewed-by: Suresh Thiagarajan Reviewed-by: Hannes Reinecke Reviewed-by: Jack Wang Reviewed-by: Tomas Henzl --- drivers/scsi/pm8001/pm80xx_hwi.c |9 -

[PATCH V2 8/8] pm80xx: Bump pm80xx driver version to 0.1.38

2015-08-11 Thread Viswas.G
From: Viswas G Bump pm80xx driver version to 0.1.38. Changes From V1: None Signed-off-by: Viswas G Reviewed-by: Suresh Thiagarajan Reviewed-by: Hannes Reinecke Reviewed-by: Jack Wang Reviewed-by: Tomas Henzl --- drivers/scsi/pm8001/pm8001_sas.h |2 +- 1 files changed, 1 insertions(+)

Re: [PATCH v4 3/3] cxlflash: Virtual LUN support

2015-08-11 Thread Michael Neuling
Comments inline. I'm not keen on the numerous pr_err() in here. I think it'll make the driver chatty especially with a badly behaving userspace. On Mon, 2015-08-10 at 12:09 -0500, Matthew R. Ochs wrote: > Add support for physical LUN segmentation (virtual LUNs) to device > driver supporting the

Re: [PATCH v4 1/3] cxlflash: Base error recovery support

2015-08-11 Thread Daniel Axtens
On Tue, 2015-08-11 at 16:21 +1000, Daniel Axtens wrote: > Actually, I forgot one thing: > > > > > config CXLFLASH > > tristate "Support for IBM CAPI Flash" > > - depends on PCI && SCSI && CXL > > + depends on PCI && SCSI && CXL && EEH > > Should you depend on CXL_EEH here, seeing as yo

Re: Persistent Reservation API

2015-08-11 Thread Christoph Hellwig
Hi David, if you want to add SCSI-2 RESERVE/RELEASE it would be at least different opcodes if not an entirely different API. But what for? RESERVE/RELEASE are basially unsuable and that's why there are almost no users out there, and they can usually prefer SCSI-3 semantics. If you have a real us

Re: Persistent Reservation API

2015-08-11 Thread David Disseldorp
On Tue, 11 Aug 2015 14:26:34 +0200, Christoph Hellwig wrote: > if you want to add SCSI-2 RESERVE/RELEASE it would be at least > different opcodes if not an entirely different API. But what for? > RESERVE/RELEASE are basially unsuable and that's why there are > almost no users out there, and they

Re: threads scsi_eh_ and scsi_tmf_ don't die when ib_srp reconnect

2015-08-11 Thread Konstantin Krotov
10.08.2015 18:30, Bart Van Assche пишет: On 08/10/2015 08:18 AM, Konstantin Krotov wrote: I was faced with the following problem: Im exported to compute-node scsi disks through ib_srp from storages. And if reconnect occurs for any reason, eg "[1201117.626498] scsi host62: ib_srp: REJ receive

Re: [PATCH v4 1/3] cxlflash: Base error recovery support

2015-08-11 Thread Matthew R. Ochs
> On Aug 10, 2015, at 6:52 PM, Daniel Axtens wrote: > >> @@ -487,11 +515,27 @@ static int cxlflash_eh_host_reset_handler(struct >> scsi_cmnd *scp) >> get_unaligned_be32(&((u32 *)scp->cmnd)[2]), >> get_unaligned_be32(&((u32 *)scp->cmnd)[3])); >> >> -rcr = cxlflash

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

2015-08-11 Thread Matthew R. Ochs
> On Aug 10, 2015, at 8:32 PM, Michael Neuling 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 adapter. The superpipe function was originally presented in an >> RFC patch set in late Apri

[PATCH] [SCSI] bfa: Use monotonic clock

2015-08-11 Thread Abhilash Jindal
Wall time obtained from do_gettimeofday is susceptible to sudden jumps due to user setting the time or due to NTP. Monotonic time is constantly increasing time better suited for comparing two timestamps. Signed-off-by: Abhilash Jindal --- drivers/scsi/bfa/bfa_port.c | 12 ++-- 1 file

[PATCH] [SCSI] bfa: Use boottime

2015-08-11 Thread Abhilash Jindal
Wall time obtained from do_gettimeofday is susceptible to sudden jumps due to user setting the time or due to NTP. Boot time is constantly increasing time better suited for comparing two timestamps. Signed-off-by: Abhilash Jindal --- drivers/scsi/bfa/bfa_svc.c | 16 1 file ch

Re: [Xen-devel] [PATCH v3 0/9] Use correctly the Xen memory terminologies

2015-08-11 Thread David Vrabel
On 07/08/15 17:34, Julien Grall wrote: > Hi all, > > This patch series aims to use the memory terminologies described in > include/xen/mm.h [1] for Linux xen code. Applied to for-linus-4.3, thanks. David -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a me

Re: threads scsi_eh_ and scsi_tmf_ don't die when ib_srp reconnect

2015-08-11 Thread Bart Van Assche
On 08/11/2015 06:41 AM, Konstantin Krotov wrote: Hello, thanks for reply. I build a package version 2.0.34, but problem is reproduced: [ 260.266374] scsi host15: ib_srp: REJ received [ 260.266383] scsi host15: ib_srp: SRP LOGIN from fe80::::0002:c903:0008:c884 to fe80:::000

Re: [PATCH v4 1/3] cxlflash: Base error recovery support

2015-08-11 Thread Matthew R. Ochs
Mikey, Thanks for reviewing. Responses to your comments inline below. -matt > On Aug 10, 2015, at 9:05 PM, Michael Neuling wrote: > > On Mon, 2015-08-10 at 12:09 -0500, Matthew R. Ochs wrote: >> Introduce support for enhanced I/O error handling. > > This needs more description of what you're

Re: [PATCH v4 1/3] cxlflash: Base error recovery support

2015-08-11 Thread Matthew R. Ochs
> On Aug 10, 2015, at 10:41 PM, Benjamin Herrenschmidt > wrote: > > On Mon, 2015-08-10 at 12:09 -0500, Matthew R. Ochs wrote: >> Introduce support for enhanced I/O error handling. >> >> Signed-off-by: Matthew R. Ochs >> Signed-off-by: Manoj N. Kumar >> --- > > So I'm not necessarily very qua

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

2015-08-11 Thread Matthew R. Ochs
> On Aug 11, 2015, at 12:23 AM, Michael Neuling wrote: > > Some comments inline Thanks for reviewing, responses below. > On Mon, 2015-08-10 at 12:09 -0500, Matthew R. Ochs wrote: >> Add superpipe supporting infrastructure to device driver for the IBM CXL >> Flash adapter. This patch allows user

Re: [PATCH v4 3/3] cxlflash: Virtual LUN support

2015-08-11 Thread Manoj Kumar
Mikey: Thanks for your review. Comments inline below. On 8/11/2015 5:54 AM, Michael Neuling wrote: I'm not keen on the numerous pr_err() in here. I think it'll make the driver chatty especially with a badly behaving userspace. Will look at all the pr_err() and limit them to errors that are

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

2015-08-11 Thread Manoj Kumar
Ben: Comments inline below. On 8/11/2015 12:29 AM, Benjamin Herrenschmidt wrote: So in a similar vein to the previous review, I am missing a lot of context here but a few things did spring to me eyes: Thanks for your review. + list_for_each_entry_safe(lli, temp, &cfg->lluns, list)

[PATCH] sd: Make discard granularity match logical block size when LBPRZ=1

2015-08-11 Thread Martin K. Petersen
A device may report an OPTIMAL UNMAP GRANULARITY and UNMAP GRANULARITY ALIGNMENT in the Block Limits VPD. These parameters describe the device's internal provisioning allocation units. By default the block layer will round and align any discard requests based on these limits. If a device reports L

Re: [PATCH 1/6] block: cleanup blkdev_ioctl

2015-08-11 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig writes: Christoph> Split out helpers for all non-trivial ioctls to make this Christoph> function simpler, and also start passing around a pointer Christoph> version of the argument, as that's what most ioctl handlers Christoph> actually need. Looks good. R

Re: [PATCH 2/6] block: add a API for persistent reservations

2015-08-11 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig writes: Happy to see a generic interface for this. I wish PR semantics were simpler but the code looks good to me. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line "unsubs

Re: [PATCH 3/6] sd: implement the persisten reservation API

2015-08-11 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig writes: Slightly more verbose patch description would be nice. Code looks OK. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a me

Re: [PATCH 1/7] megaraid_sas : Jbod sequence number support

2015-08-11 Thread Martin K. Petersen
Sumit, @@ -973,7 +973,12 @@ struct megasas_ctrl_info { struct { #if defined(__BIG_ENDIAN_BITFIELD) - u32 reserved:12; + u32 reserved:7; + u32 useSeqNumJbodFP:1; + u32 supportExtendedSSCSize:1; + u32

Re: [PATCH 2/7] megaraid_sas : Support for max_io_size 1MB

2015-08-11 Thread Martin K. Petersen
Sumit, @@ -1239,7 +1239,9 @@ union megasas_sgl_frame { typedef union _MFI_CAPABILITIES { struct { #if defined(__BIG_ENDIAN_BITFIELD) - u32 reserved:25; + u32 reserved:23; + u32 support_ext_io_size:1; + u32 support

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

2015-08-11 Thread wenxiong
Quoting "Matthew R. Ochs" : Add superpipe supporting infrastructure to device driver for the IBM CXL Flash adapter. This patch allows userspace applications to take advantage of the accelerated I/O features that this adapter provides and bypass the traditional filesystem stack. Signed-off-by:

Re: [PATCH v4 3/3] cxlflash: Virtual LUN support

2015-08-11 Thread Michael Neuling
> > Be good to do some clear sanity check the "struct dk_cxlflash_resize > > *resize" > > here. It's passed from userspace but then gets propogated to a bunch of > > other > > things here like nsectors, get_context etc who will all now be responsible > > for > > handling any dodgy data passed

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

2015-08-11 Thread Michael Neuling
> >> + pr_debug("%s: Wait for user context to quiesce...\n", __func__); > >> + wake_up_all(&cfg->limbo_waitq); > >> + ssleep(1); > > > > Why 1 sec and why in a loop? Can’t you poll/wait for completion somewhere? > > This routine is called when the device is being remo

Re: [PATCH v4 1/3] cxlflash: Base error recovery support

2015-08-11 Thread wenxiong
Quoting "Matthew R. Ochs" : Introduce support for enhanced I/O error handling. Signed-off-by: Matthew R. Ochs Signed-off-by: Manoj N. Kumar --- drivers/scsi/cxlflash/Kconfig | 2 +- drivers/scsi/cxlflash/common.h | 11 ++- drivers/scsi/cxlflash/main.c | 166

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

2015-08-11 Thread wenxiong
Quoting "Matthew R. Ochs" : Add superpipe supporting infrastructure to device driver for the IBM CXL Flash adapter. This patch allows userspace applications to take advantage of the accelerated I/O features that this adapter provides and bypass the traditional filesystem stack. Signed-off-by:

Re: threads scsi_eh_ and scsi_tmf_ don't die when ib_srp reconnect

2015-08-11 Thread Konstantin Krotov
11.08.2015 23:28, Bart Van Assche пишет: On 08/11/2015 06:41 AM, Konstantin Krotov wrote: Hello, thanks for reply. I build a package version 2.0.34, but problem is reproduced: [ 260.266374] scsi host15: ib_srp: REJ received [ 260.266383] scsi host15: ib_srp: SRP LOGIN from fe80:::00

RE: [PATCH 1/7] megaraid_sas : Jbod sequence number support

2015-08-11 Thread Sumit Saxena
> -Original Message- > From: Martin K. Petersen [mailto:martin.peter...@oracle.com] > Sent: Wednesday, August 12, 2015 6:59 AM > To: sumit.sax...@avagotech.com > Cc: linux-scsi@vger.kernel.org; the...@redhat.com; > martin.peter...@oracle.com; h...@infradead.org; jbottom...@parallels.com; >

RE: [PATCH 2/7] megaraid_sas : Support for max_io_size 1MB

2015-08-11 Thread Sumit Saxena
> -Original Message- > From: Martin K. Petersen [mailto:martin.peter...@oracle.com] > Sent: Wednesday, August 12, 2015 7:29 AM > To: sumit.sax...@avagotech.com > Cc: linux-scsi@vger.kernel.org; the...@redhat.com; > martin.peter...@oracle.com; h...@infradead.org; jbottom...@parallels.com; >

Persistent Reservation API V2

2015-08-11 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 5/5] dm: add support for passing through persistent reservations

2015-08-11 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 | 122

[PATCH 4/5] dm: refactor ioctl handling

2015-08-11 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 3/5] sd: implement the Persistent Reservation API

2015-08-11 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 | 90 +++ 1 file changed, 90 insertions(+) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 160e44e..14b

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

2015-08-11 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-11 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