Re: [PATCH] target: Fix NULL dereference during LUN lookup + active I/O shutdown

2017-03-01 Thread Nicholas A. Bellinger
On Thu, 2017-02-23 at 11:46 -0600, Bryant G. Ly wrote: > > From: Nicholas Bellinger > > > > When transport_clear_lun_ref() is shutting down a se_lun via > > configfs with new I/O in-flight, it's possible to trigger a > > NULL pointer dereference in transport_lookup_cmd_lun() due > > to the fact pe

RE: [PATCH v4 11/19] scsi: megaraid: Replace PCI pool old API

2017-03-01 Thread Sumit Saxena
>-Original Message- >From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi- >ow...@vger.kernel.org] On Behalf Of Romain Perier >Sent: Wednesday, March 01, 2017 9:25 PM >To: Dan Williams; Doug Ledford; Sean Hefty; Hal Rosenstock; >jeffrey.t.kirs...@intel.com; David S. Miller; stas.yakov.

Re: sg driver, sg_io and sg tablesize

2017-03-01 Thread Laurence Oberman
- Original Message - > From: "Laurence Oberman" > To: dgilb...@interlog.com, "Linux SCSI List" > Sent: Wednesday, March 1, 2017 10:44:32 AM > Subject: sg driver, sg_io and sg tablesize > > Hi Doug > I have a quick question here regarding the sg tablesize and retrieval of the > supporte

Re: [PATCH 1/1] fnic: Adding Check Condition counter to misc fnicstats

2017-03-01 Thread Martin K. Petersen
> "Satish" == Satish Kharat writes: Satish, Satish> Just a simple counter of number of check conditions encountered Satish> on that host. Please test and review the following: https://patchwork.kernel.org/patch/9549777/ Thank you! -- Martin K. Petersen Oracle Linux Engineer

Re: [PATCH v6] sd: Check for unaligned partial completion

2017-03-01 Thread Martin K. Petersen
> "Damien" == Damien Le Moal writes: Damien, Damien> Move the partial completion alignement check of mpt3sas to a Damien> generic implementation in sd_done(). The check is added within Damien> the default section of the initial req_op() switch case so that Damien> the report and reset zone c

Re: [PATCH v2] scsi: ufs: Factor out ufshcd_read_desc_param

2017-03-01 Thread Martin K. Petersen
> "Michal'" == Potomski, MichalX writes: Michal'> Since in UFS 2.1 specification some of the descriptor lengths Michal'> differs from 2.0 specification and some devices, which are Michal'> reporting spec version 2.0 have different descriptor lengths we Michal'> can not rely on hardcoded value

[PATCH] scsi: remove incorrect __exit markups

2017-03-01 Thread Dmitry Torokhov
Even if bus is not hot-pluggable, devices can be unbound from the driver via sysfs, so we should not be using __exit annotations on remove() methods. The only exception is drivers registered with platform_driver_probe() which specifically disables sysfs bind/unbind attributes. Signed-off-by: Dmitr

Re: SCSI regression in 4.11

2017-03-01 Thread Stephen Hemminger
On Thu, 2 Mar 2017 01:56:15 +0100 Christoph Hellwig wrote: > On Thu, Mar 02, 2017 at 01:01:35AM +0100, Christoph Hellwig wrote: > > On Wed, Mar 01, 2017 at 07:54:12AM -0800, Stephen Hemminger wrote: > > > > > > > > http://git.infradead.org/users/hch/block.git/commitdiff/148cff67b401e22

Re: SCSI regression in 4.11

2017-03-01 Thread Stephen Hemminger
On Thu, 2 Mar 2017 01:01:35 +0100 Christoph Hellwig wrote: > On Wed, Mar 01, 2017 at 07:54:12AM -0800, Stephen Hemminger wrote: > > > > > > http://git.infradead.org/users/hch/block.git/commitdiff/148cff67b401e2229c076c0ea418712654be77e4 > > > > > > > It appears that is already in the code

Re: SCSI regression in 4.11

2017-03-01 Thread Christoph Hellwig
On Thu, Mar 02, 2017 at 01:01:35AM +0100, Christoph Hellwig wrote: > On Wed, Mar 01, 2017 at 07:54:12AM -0800, Stephen Hemminger wrote: > > > > > > http://git.infradead.org/users/hch/block.git/commitdiff/148cff67b401e2229c076c0ea418712654be77e4 > > > > It appears that is already in the code I a

Re: SCSI regression in 4.11

2017-03-01 Thread James Bottomley
On Wed, 2017-03-01 at 10:57 -0800, James Bottomley wrote: > On Wed, 2017-03-01 at 10:48 -0800, Stephen Hemminger wrote: > > On Tue, 28 Feb 2017 22:20:58 -0800 > > James Bottomley wrote: > > > > > On Tue, 2017-02-28 at 17:25 -0800, Stephen Hemminger wrote: > > > > [1.346023] hv_storvsc: IO cm

Re: SCSI regression in 4.11

2017-03-01 Thread Stephen Hemminger
On Wed, 01 Mar 2017 15:09:44 -0800 James Bottomley wrote: > On Wed, 2017-03-01 at 13:27 -0800, Stephen Hemminger wrote: > > Ok here is much better data, wasn't accounting for the offset in the > > payload > > But now both responses are the same: > > > Working 4.10 > [...] > > [1.048920]

Re: SCSI regression in 4.11

2017-03-01 Thread James Bottomley
On Wed, 2017-03-01 at 13:27 -0800, Stephen Hemminger wrote: > Ok here is much better data, wasn't accounting for the offset in the > payload But now both responses are the same: > Working 4.10 [...] > [1.048920] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 > srb status 0x20 length 36

Re: SCSI regression in 4.11

2017-03-01 Thread Christoph Hellwig
On Wed, Mar 01, 2017 at 07:54:12AM -0800, Stephen Hemminger wrote: > > > > http://git.infradead.org/users/hch/block.git/commitdiff/148cff67b401e2229c076c0ea418712654be77e4 > > It appears that is already in the code I am testing in linux-next... It's in -next now, but it wasn't at the time yo

Re: [PATCHv3 5/6] scsi: make scsi_eh_scmd_add() always succeed

2017-03-01 Thread Bart Van Assche
On Wed, 2017-03-01 at 10:15 +0100, Hannes Reinecke wrote: > scsi_eh_scmd_add() currently only will fail if no > error handler thread is started (which will never be the > case) or if the state machine encounters an illegal transition. > > But if we're encountering an invalid state transition > cha

Re: [PATCHv3 3/6] scsi: make eh_eflags persistent

2017-03-01 Thread Bart Van Assche
On Wed, 2017-03-01 at 10:15 +0100, Hannes Reinecke wrote: > To detect if a failed command has been retried we must not > clear scmd->eh_eflags when EH finishes. > The flag should be persistent throughout the lifetime > of the command. > > Reviewed-by: Johannes Thumshirn > Signed-off-by: Hannes Re

Re: [PATCHv3 1/6] scsi_error: count medium access timeout only once per EH run

2017-03-01 Thread Bart Van Assche
On Wed, 2017-03-01 at 10:15 +0100, Hannes Reinecke wrote: > The current medium access timeout counter will be increased for > each command, so if there are enough failed commands we'll hit > the medium access timeout for even a single failure. This sentence describes multiple failed commands as a

Re: [PATCH v6] sd: Check for unaligned partial completion

2017-03-01 Thread Guilherme G. Piccoli
Looks good, thanks for the patch. Reviewed-by: Guilherme G. Piccoli Cheers, Guilherme

Re: SCSI regression in 4.11

2017-03-01 Thread Linus Torvalds
On Wed, Mar 1, 2017 at 10:48 AM, Stephen Hemminger wrote: > > Bad 4.11 initial INQUIRY buffer > [1.218159] data: : 00 00 05 02 1f 00 00 02 4d 73 66 74 20 20 20 20 > [1.225654] data: 0010: 56 69 72 74 75 61 6c 20 44 69 73 6b 20 20 20 20 > [1.242930] data: 0020: 31 2e 30

Re: SCSI regression in 4.11

2017-03-01 Thread Stephen Hemminger
Ok here is much better data, wasn't accounting for the offset in the payload Working 4.10 [1.020041] scsi host0: storvsc_host_t [1.024998] hv_storvsc: INQUIRY cmd 0x12 0x0 0x0 scsi status 0x0 srb status 0x1 length 36 [1.027452] hv_storvsc: payload size 288 count 1 offset 3072 len 36

Re: SCSI regression in 4.11

2017-03-01 Thread Stephen Hemminger
On Wed, 01 Mar 2017 11:20:22 -0800 James Bottomley wrote: > On Wed, 2017-03-01 at 10:57 -0800, James Bottomley wrote: > > On Wed, 2017-03-01 at 10:48 -0800, Stephen Hemminger wrote: > > > On Tue, 28 Feb 2017 22:20:58 -0800 > > > James Bottomley wrote: > > > > > > > On Tue, 2017-02-28 at 17:

Re: [PATCH v4 00/19] Replace PCI pool by DMA pool API

2017-03-01 Thread Joe Perches
On Wed, 2017-03-01 at 16:55 +0100, Romain Perier wrote: > support to warn about this old API in checkpath.pl checkpatch This part isn't true anymore, but it seems sensible enough, thanks.

Re: SCSI regression in 4.11

2017-03-01 Thread James Bottomley
On Wed, 2017-03-01 at 10:48 -0800, Stephen Hemminger wrote: > On Tue, 28 Feb 2017 22:20:58 -0800 > James Bottomley wrote: > > > On Tue, 2017-02-28 at 17:25 -0800, Stephen Hemminger wrote: > > > [1.346023] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 > > > srb > > > status 0x20 length 36 >

Re: SCSI regression in 4.11

2017-03-01 Thread Stephen Hemminger
On Tue, 28 Feb 2017 22:20:58 -0800 James Bottomley wrote: > On Tue, 2017-02-28 at 17:25 -0800, Stephen Hemminger wrote: > > [1.346023] hv_storvsc: IO cmd 0x12 0x0 0x0 scsi status 0x0 srb > > status 0x20 length 36 > > [1.352913] inquiry data: : 00 aa be f1 5c 98 ff ff f0 64 > > 02

Re: [PATCH v2] scsi: ufs: Factor out ufshcd_read_desc_param

2017-03-01 Thread Subhash Jadavani
On 2017-02-27 19:24, Martin K. Petersen wrote: "Michal" == Potomski, MichalX writes: Michal> Since in UFS 2.1 specification some of the descriptor lengths Michal> differs from 2.0 specification and some devices, which are Michal> reporting spec version 2.0 have different descriptor lengths we

Re: [PATCH] mpt3sas: Avoid sleeping in interrupt context

2017-03-01 Thread Omar Sandoval
On Wed, Mar 01, 2017 at 05:09:48PM +, Bart Van Assche wrote: > On Wed, 2017-03-01 at 09:04 -0800, Omar Sandoval wrote: > > Thanks, Bart, you can add > > > > Tested-by: Omar Sandoval > > Hello Omar, > > Have you been able to test both code paths - scsi-mq enabled and scsi-mq > disabled? > >

Re: [PATCH] mpt3sas: Avoid sleeping in interrupt context

2017-03-01 Thread Bart Van Assche
On Wed, 2017-03-01 at 09:28 -0800, Omar Sandoval wrote: > Just tried on blk-mq and I didn't get the splat, seems to be fine. Thanks for the testing! Bart.

Re: [PATCH] mpt3sas: Avoid sleeping in interrupt context

2017-03-01 Thread Omar Sandoval
On Wed, Mar 01, 2017 at 09:00:36AM -0800, Bart Van Assche wrote: > Commit 669f044170d8 ("scsi: srp_transport: Move queuecommand() wait > code to SCSI core") can make scsi_internal_device_block() sleep. > However, the mpt3sas driver can call this function from an interrupt > handler. Hence add a sec

Re: [PATCH] mpt3sas: Avoid sleeping in interrupt context

2017-03-01 Thread Bart Van Assche
On Wed, 2017-03-01 at 09:04 -0800, Omar Sandoval wrote: > Thanks, Bart, you can add > > Tested-by: Omar Sandoval Hello Omar, Have you been able to test both code paths - scsi-mq enabled and scsi-mq disabled? Thanks, Bart.

[PATCH] mpt3sas: Avoid sleeping in interrupt context

2017-03-01 Thread Bart Van Assche
Commit 669f044170d8 ("scsi: srp_transport: Move queuecommand() wait code to SCSI core") can make scsi_internal_device_block() sleep. However, the mpt3sas driver can call this function from an interrupt handler. Hence add a second argument to scsi_internal_device_block() that restores the old behavi

Re: [PATCHv3 1/6] scsi_error: count medium access timeout only once per EH run

2017-03-01 Thread Steffen Maier
Hannes, thanks for posting this. I just found time to review the description so far: Subject: [PATCHv3 1/6] scsi_error: count medium access timeout only once per EH run "... to prevent false positives" Might be nice for understanding but also makes the short log quite long. On 03/01/2017 1

Re: SCSI regression in 4.11

2017-03-01 Thread Stephen Hemminger
Dexuan has reproduced the same problem and discovered that is related to whether virtual DVD is attached to the VM. My VM had empty virtual DVD (offline) from the installation of the ISO. If the DVD device is removed then the VM boots. This makes the problem less of a catastrophic but we still

Re: [ANNOUNCE]: Broadcom (Emulex) FC Target driver - efct

2017-03-01 Thread Hannes Reinecke
On 02/28/2017 07:14 PM, James Smart wrote: > > On 2/28/2017 8:34 AM, Hannes Reinecke wrote: >> Can you clarify these? >> Are these 'just' resource allocation problems or something else, too? > > Most are resource allocation - buffer pools, dma pools, pages for > resources, and hw resource allocat

Re: [PATCH v6] sd: Check for unaligned partial completion

2017-03-01 Thread Bart Van Assche
On Wed, 2017-03-01 at 17:27 +0900, Damien Le Moal wrote: > Commit ("mpt3sas: Force request partial completion > alignment") was not considering the case of commands not operating on > logical block size units (e.g. REQ_OP_ZONE_REPORT and its 64B aligned > partial replies). In this case, forcing al

[PATCH v4 12/19] scsi: mpt3sas: Replace PCI pool old API

2017-03-01 Thread Romain Perier
The PCI pool API is deprecated. This commits replaces the PCI pool old API by the appropriated function with the DMA pool API. Signed-off-by: Romain Perier Reviewed-by: Peter Senna Tschudin --- drivers/scsi/mpt3sas/mpt3sas_base.c | 73 + 1 file changed, 34 in

[PATCH v4 10/19] scsi: lpfc: Replace PCI pool old API

2017-03-01 Thread Romain Perier
The PCI pool API is deprecated. This commits replaces the PCI pool old API by the appropriated function with the DMA pool API. It also updates some comments, accordingly. Signed-off-by: Romain Perier Reviewed-by: Peter Senna Tschudin --- drivers/scsi/lpfc/lpfc.h | 12 ++--- drivers/scsi/

[PATCH v4 13/19] scsi: mvsas: Replace PCI pool old API

2017-03-01 Thread Romain Perier
The PCI pool API is deprecated. This commits replaces the PCI pool old API by the appropriated function with the DMA pool API. Signed-off-by: Romain Perier Reviewed-by: Peter Senna Tschudin --- drivers/scsi/mvsas/mv_init.c | 6 +++--- drivers/scsi/mvsas/mv_sas.c | 6 +++--- 2 files changed, 6

[PATCH v4 16/19] usb: gadget: net2280: Replace PCI pool old API

2017-03-01 Thread Romain Perier
The PCI pool API is deprecated. This commits replaces the PCI pool old API by the appropriated function with the DMA pool API. Signed-off-by: Romain Perier Acked-by: Peter Senna Tschudin Tested-by: Peter Senna Tschudin --- drivers/usb/gadget/udc/net2280.c | 12 ++-- drivers/usb/gadget/

[PATCH v4 11/19] scsi: megaraid: Replace PCI pool old API

2017-03-01 Thread Romain Perier
The PCI pool API is deprecated. This commits replaces the PCI pool old API by the appropriated function with the DMA pool API. Signed-off-by: Romain Perier Reviewed-by: Peter Senna Tschudin --- drivers/scsi/megaraid/megaraid_mbox.c | 33 +++ drivers/scsi/megaraid/megaraid_mm.c

[PATCH v4 19/19] PCI: Remove PCI pool macro functions

2017-03-01 Thread Romain Perier
Now that all the drivers use dma pool API, we can remove the macro functions for PCI pool. Signed-off-by: Romain Perier Reviewed-by: Peter Senna Tschudin --- include/linux/pci.h | 9 - 1 file changed, 9 deletions(-) diff --git a/include/linux/pci.h b/include/linux/pci.h index 282ed32..

[PATCH v4 07/19] wireless: ipw2200: Replace PCI pool old API

2017-03-01 Thread Romain Perier
The PCI pool API is deprecated. This commits replaces the PCI pool old API by the appropriated function with the DMA pool API. Signed-off-by: Romain Perier Reviewed-by: Peter Senna Tschudin --- drivers/net/wireless/intel/ipw2x00/ipw2200.c | 13 +++-- 1 file changed, 7 insertions(+), 6 d

[PATCH v4 18/19] usb: host: Remove remaining pci_pool in comments

2017-03-01 Thread Romain Perier
This replaces remaining occurences of pci_pool by dma_pool, as this is the new API that could be used for that purpose. Signed-off-by: Romain Perier Reviewed-by: Peter Senna Tschudin --- drivers/usb/host/ehci-hcd.c | 2 +- drivers/usb/host/fotg210-hcd.c | 2 +- drivers/usb/host/oxu210hp-hc

[PATCH v4 15/19] usb: gadget: amd5536udc: Replace PCI pool old API

2017-03-01 Thread Romain Perier
The PCI pool API is deprecated. This commits replaces the PCI pool old API by the appropriated function with the DMA pool API. Signed-off-by: Romain Perier Acked-by: Peter Senna Tschudin Tested-by: Peter Senna Tschudin --- drivers/usb/gadget/udc/amd5536udc.c | 8 drivers/usb/gadget/ud

[PATCH v4 08/19] scsi: be2iscsi: Replace PCI pool old API

2017-03-01 Thread Romain Perier
The PCI pool API is deprecated. This commits replaces the PCI pool old API by the appropriated function with the DMA pool API. Signed-off-by: Romain Perier Acked-by: Peter Senna Tschudin Tested-by: Peter Senna Tschudin --- drivers/scsi/be2iscsi/be_iscsi.c | 6 +++--- drivers/scsi/be2iscsi/be_m

[PATCH v4 17/19] usb: gadget: pch_udc: Replace PCI pool old API

2017-03-01 Thread Romain Perier
The PCI pool API is deprecated. This commits replaces the PCI pool old API by the appropriated function with the DMA pool API. Signed-off-by: Romain Perier Reviewed-by: Peter Senna Tschudin --- drivers/usb/gadget/udc/pch_udc.c | 31 +++ 1 file changed, 15 insertions(

[PATCH v4 04/19] net: e100: Replace PCI pool old API

2017-03-01 Thread Romain Perier
The PCI pool API is deprecated. This commits replaces the PCI pool old API by the appropriated function with the DMA pool API. Signed-off-by: Romain Perier Acked-by: Peter Senna Tschudin Tested-by: Peter Senna Tschudin --- drivers/net/ethernet/intel/e100.c | 12 ++-- 1 file changed, 6

[PATCH v4 05/19] mlx4: Replace PCI pool old API

2017-03-01 Thread Romain Perier
The PCI pool API is deprecated. This commits replaces the PCI pool old API by the appropriated function with the DMA pool API. Signed-off-by: Romain Perier Acked-by: Peter Senna Tschudin Tested-by: Peter Senna Tschudin --- drivers/net/ethernet/mellanox/mlx4/cmd.c | 10 +- drivers/net/

[PATCH v4 00/19] Replace PCI pool by DMA pool API

2017-03-01 Thread Romain Perier
by the dma pool API, adds support to warn about this old API in checkpath.pl and remove the defines. Changes in v4: - Rebased series onto next-20170301 - Removed patch 20/20: checks done by checkpath.pl, no longer required. Thanks to Peter and Joe for their feedbacks. - Added Reviewed-by tags

[PATCH v4 06/19] mlx5: Replace PCI pool old API

2017-03-01 Thread Romain Perier
The PCI pool API is deprecated. This commits replaces the PCI pool old API by the appropriated function with the DMA pool API. Signed-off-by: Romain Perier Reviewed-by: Peter Senna Tschudin --- drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 11 ++- include/linux/mlx5/driver.h

Re: SCSI regression in 4.11

2017-03-01 Thread Christoph Hellwig
On Tue, Feb 28, 2017 at 10:48:45PM -0800, Stephen Hemminger wrote: > Let me know, I can run another test and dump more data. Could it be that we keep the old sense buffer values around because my commit change the way how sense buffers are handled. A while ago I suggested this patch to fix it, so

[PATCH v4 14/19] scsi: pmcraid: Replace PCI pool old API

2017-03-01 Thread Romain Perier
The PCI pool API is deprecated. This commits replaces the PCI pool old API by the appropriated function with the DMA pool API. Signed-off-by: Romain Perier Acked-by: Peter Senna Tschudin Tested-by: Peter Senna Tschudin --- drivers/scsi/pmcraid.c | 10 +- drivers/scsi/pmcraid.h | 2 +-

[PATCH v4 02/19] dmaengine: pch_dma: Replace PCI pool old API

2017-03-01 Thread Romain Perier
The PCI pool API is deprecated. This commits replaces the PCI pool old API by the appropriated function with the DMA pool API. Signed-off-by: Romain Perier Acked-by: Peter Senna Tschudin Tested-by: Peter Senna Tschudin --- drivers/dma/pch_dma.c | 12 ++-- 1 file changed, 6 insertions(+

[PATCH v4 09/19] scsi: csiostor: Replace PCI pool old API

2017-03-01 Thread Romain Perier
The PCI pool API is deprecated. This commits replaces the PCI pool old API by the appropriated function with the DMA pool API. It also updates the name of some variables and the content of comments, accordingly. Signed-off-by: Romain Perier Reviewed-by: Peter Senna Tschudin --- drivers/scsi/csi

[PATCH v4 01/19] block: DAC960: Replace PCI pool old API

2017-03-01 Thread Romain Perier
The PCI pool API is deprecated. This commits replaces the PCI pool old API by the appropriated function with the DMA pool API. Signed-off-by: Romain Perier Acked-by: Peter Senna Tschudin Tested-by: Peter Senna Tschudin --- drivers/block/DAC960.c | 36 ++-- drive

[PATCH v4 03/19] IB/mthca: Replace PCI pool old API

2017-03-01 Thread Romain Perier
The PCI pool API is deprecated. This commits replaces the PCI pool old API by the appropriated function with the DMA pool API. Signed-off-by: Romain Perier Acked-by: Peter Senna Tschudin Tested-by: Peter Senna Tschudin --- drivers/infiniband/hw/mthca/mthca_av.c | 10 +- drivers/infini

Re: SCSI regression in 4.11

2017-03-01 Thread Stephen Hemminger
On Wed, 1 Mar 2017 16:50:57 +0100 Christoph Hellwig wrote: > On Tue, Feb 28, 2017 at 10:48:45PM -0800, Stephen Hemminger wrote: > > Let me know, I can run another test and dump more data. > > Could it be that we keep the old sense buffer values around because > my commit change the way how sen

sg driver, sg_io and sg tablesize

2017-03-01 Thread Laurence Oberman
Hi Doug I have a quick question here regarding the sg tablesize and retrieval of the supported size via a userspace ioctl. lpfc defaults to lpfc_sg_seg_cnt:Max Scatter Gather Segment Count (uint) = 64 For sg_io sent from qemu if we exceed 512K I/O we fail, qlogic allows 128 by default. 7:0:2:

Re: [PATCH v6] sd: Check for unaligned partial completion

2017-03-01 Thread Christoph Hellwig
I much prefer this version: Acked-by: Christoph Hellwig

Re: [PATCH v5 02/11] phy: exynos-ufs: add UFS PHY driver for EXYNOS SoC

2017-03-01 Thread Kishon Vijay Abraham I
Hi, On Tuesday 28 February 2017 01:51 PM, Alim Akhtar wrote: > Hi Kishon, > > On 02/28/2017 09:04 AM, Kishon Vijay Abraham I wrote: >> Hi, >> >> On Monday 27 February 2017 07:40 PM, Alim Akhtar wrote: >>> Hi Kishon, >>> >>> On 02/27/2017 10:56 AM, Kishon Vijay Abraham I wrote: Hi,

Re: [PATCH] target/user: Add daynmic growing data area featuresupport

2017-03-01 Thread Xiubo Li
For now we will increase the data area size to 1G, and the cmd area size to 128M. The tcmu-runner should mmap() about (128M + 1G) when running and the TCMU will dynamically grows the data area from 0 to max 1G size. Cool. This is a good approach for an initial patch but this raises concerns ab

[PATCHv3 3/6] scsi: make eh_eflags persistent

2017-03-01 Thread Hannes Reinecke
To detect if a failed command has been retried we must not clear scmd->eh_eflags when EH finishes. The flag should be persistent throughout the lifetime of the command. Reviewed-by: Johannes Thumshirn Signed-off-by: Hannes Reinecke --- Documentation/scsi/scsi_eh.txt | 14 +++--- dr

[PATCHv3 0/6] SCSI EH cleanup

2017-03-01 Thread Hannes Reinecke
Hi all, this is a resend of a small patchset for cleaning up SCSI EH. Primary goal is to make asynchronous aborts mandatory; there hasn't been a single report so far where asynchronous abort won't work, so the 'no_async_abort' flag has never been used and will be removed with this patchset. Additi

[PATCHv3 6/6] scsi: make asynchronous aborts mandatory

2017-03-01 Thread Hannes Reinecke
There hasn't been any reports for HBAs where asynchronous abort would not work, so we should make it mandatory and remove the fallback. Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche --- Documentation/scsi/scsi_eh.txt | 18 -- drivers/scsi/s

[PATCHv3 5/6] scsi: make scsi_eh_scmd_add() always succeed

2017-03-01 Thread Hannes Reinecke
scsi_eh_scmd_add() currently only will fail if no error handler thread is started (which will never be the case) or if the state machine encounters an illegal transition. But if we're encountering an invalid state transition chances is we cannot fixup things with the error handler. So better add a

[PATCHv3 1/6] scsi_error: count medium access timeout only once per EH run

2017-03-01 Thread Hannes Reinecke
The current medium access timeout counter will be increased for each command, so if there are enough failed commands we'll hit the medium access timeout for even a single failure. Fix this by making the timeout per EH run, ie the counter will only be increased once per device and EH run. Cc: Ewan

[PATCHv3 4/6] scsi_error: do not escalate failed EH command

2017-03-01 Thread Hannes Reinecke
When a command is sent as part of the error handling there is not point whatsoever to start EH escalation when that command fails; we are _already_ in the error handler, and the escalation is about to commence anyway. So just call 'scsi_try_to_abort_cmd()' to abort outstanding commands and let the

[PATCHv3 2/6] libsas: allow async aborts

2017-03-01 Thread Hannes Reinecke
From: Christoph Hellwig We now first try to call ->eh_abort_handler from a work queue, but libsas was always failing that for no good reason. Allow async aborts. Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig --- drivers/scsi/libsas/sas_scsi_ho

Re: [PATCH 0/3] Separate zone requests from medium access requests

2017-03-01 Thread Damien Le Moal
Martin, On 3/1/17 12:21, Martin K. Petersen wrote: >> "Damien" == Damien Le Moal writes: > > Damien, > > Damien> The problem remains that the mpt3sas driver needs fixing. As you > Damien> suggest, we can do that in sd, or directly in mpt3sas. I tried > Damien> to do a clean fix in sd, but

[PATCH v6] sd: Check for unaligned partial completion

2017-03-01 Thread Damien Le Moal
Commit ("mpt3sas: Force request partial completion alignment") was not considering the case of commands not operating on logical block size units (e.g. REQ_OP_ZONE_REPORT and its 64B aligned partial replies). In this case, forcing alignment of resid to the device logical block size can break the c