[PATCH 0/5] block/target queue/LUN reset support

2016-05-25 Thread mchristi
Currently, for SCSI LUN_RESETs the target layer can only wait on bio/requests it has sent. This normally results in the LUN_RESET timing out on the initiator side and that SCSI error handler escalating to something more disruptive. To fix this, the following patches add a block layer helper and ca

[PATCH 4/5] scsi: add new async device reset support

2016-05-25 Thread mchristi
From: Mike Christie Currently, if the SCSI eh runs then before we do a LUN_RESET we stop the host. This patch and the block layer one before it begin to add infrastructure to be able to do a LUN_RESET and eventually do a transport level recovery without having to stop the host. For LUn-reset, th

[PATCH 3/5] target: call queue reset if supported

2016-05-25 Thread mchristi
From: Mike Christie Instead of waiting for commands, map the lun reset operation to a queue reset. We do not check the result of blk_reset_queue because if it works then we need to wait for the bio/request completions and if it failed we might as wait and hope like we did before. Signed-off-by:

[PATCH 2/5] block: add queue reset support

2016-05-25 Thread mchristi
From: Mike Christie This adds a request_queue/mq_ops callout which when called should force the completion/failure of requests that have been dequeued by the driver. Requests can be completed normally or should be failed with -EINTR. On success the reset callout should complete/fail dequeued req

[PATCH 5/5] iscsi initiator: support eh_async_device_reset_handler

2016-05-25 Thread mchristi
From: Mike Christie Like a lot of drivers, iscsi already supported SG_SCSI_RESET_DEVICE and did not need the host stopped, so supporting eh_async_device_reset_handler just required some renames, and changing the callout argument from a scsi_cmnd to a scsi_device. Signed-off-by: Mike Christie --

[PATCH 1/5] blk mq: take ref to q when running it

2016-05-25 Thread mchristi
From: Mike Christie If the __blk_mq_run_hw_queue is a result of a async run or retry then we do not have a reference to the queue. At this time, blk_cleanup_queue could begin tearing it down while the queue_rq function is being run. This patch just has us do a blk_queue_enter call. Signed-off-b

Re: [PATCHv3 0/2] target: make location of /var/targets configurable

2016-05-25 Thread Zhu Lingshan
Hi experts, I think these patches are great, and I am ready to help in user space. Thanks, BR Zhu Lingshan On 05/09/2016 09:17 AM, Lee Duncan wrote: On 04/14/2016 06:18 PM, Lee Duncan wrote: These patches make the location of "/var/target" configurable, though it still defauls to "/var/target

mpt3sas: memory allocation for firmware upgrade DMA memory question

2016-05-25 Thread Johannes Thumshirn
Hi Chaitra and Suganath, I've got a question regarding mpt3sas' memory allocation used when doing a firmware upgrade. Currently you're doing a pci_alloc_consitent() which tries to allocate memory via GFP_ATOMIC. This memory then is passed as a single element on a sg_list. Jeff reported it returne

Re: [PATCH] USB: uas: Fix slave queue_depth not being set

2016-05-25 Thread Hans de Goede
Hi, On 24-05-16 14:44, James Bottomley wrote: On Tue, 2016-05-24 at 08:53 +0200, Hans de Goede wrote: Hi, On 23-05-16 19:36, James Bottomley wrote: On Mon, 2016-05-23 at 13:49 +0200, Hans de Goede wrote: Commit 198de51dbc34 ("USB: uas: Limit qdepth at the scsi-host level") removed the scsi_c

Re: [PATCH] USB: uas: Fix slave queue_depth not being set

2016-05-25 Thread Tom Yan
What if a UAS bridge requires specific SCSI command (e.g. UNMAP) to be issued unqueued/untagged? Would track_queue_depth help? On 25 May 2016 at 19:04, Hans de Goede wrote: > Hi, > > > On 24-05-16 14:44, James Bottomley wrote: >> >> On Tue, 2016-05-24 at 08:53 +0200, Hans de Goede wrote: >>> >>>

IBM VSCSI Target Driver Initial Patch Sets

2016-05-25 Thread Bryant G. Ly
This patch series addresses comments by Joe with runing checkpatch with a --strict. It cleans up all the misc styling and removes all the forward declarations. The patch also addresses all of Bart's comments besides the preallocation of buffers before IO starts and the merging of unpack_lun with s

[PATCH 3/3] ibmvscsis: clean up functions

2016-05-25 Thread Bryant G. Ly
From: bryantly This patch removes forward declarations and re-organizes the functions within the driver. This patch also fixes MAINTAINERS for ibmvscsis. Signed-off-by: bryantly --- MAINTAINERS |4 +- drivers/scsi/ibmvscsi/ibmvscsis.c | 2709 ++

[PATCH 2/3] ibmvscsis: Addressing Bart's comments

2016-05-25 Thread Bryant G. Ly
From: bryantly This patch contains cleaning up the code for styling and also addresses Bart's comments. Signed-off-by: bryantly --- MAINTAINERS | 4 +- drivers/scsi/Kconfig | 36 +-- drivers/scsi/Makefile | 4 +- drivers/scsi/ibmvscsi/Makefi

Re: [PATCH 3/3] ibmvscsis: clean up functions

2016-05-25 Thread Joe Perches
On Wed, 2016-05-25 at 09:17 -0500, Bryant G. Ly wrote: > From: bryantly Please use your whole name here and for your sign-off like: From: Bryant G. Ly Signed-off-by: Bryant G. Ly > This patch removes forward declarations and re-organizes the > functions within the driver. This patch also fixe

sd: ZBC Update Read/Write Commands to SCSI spec

2016-05-25 Thread Petros Koutoupis
This patch is based on: git.kernel.org:/pub/scm/linux/kernel/git/hare/scsi-devel branch zbc.v6 According to the Zoned Block Commands (ZBC) Revision 5 SCSI specification, a Host Managed and Host Aware device is limited to support at a minimum the READ (16) and WRITE (16) read/write CDBs. This means

Re: [PATCH v3 13/13] cxgbit: add files for cxgbit.ko

2016-05-25 Thread Or Gerlitz
On Tue, May 24, 2016 at 9:40 AM, Nicholas A. Bellinger wrote: > Hi Or & Co, > On Wed, 2016-05-18 at 14:45 +0300, Or Gerlitz wrote: >> On Sat, Apr 30, 2016 at 6:54 PM, Or Gerlitz wrote: >> > On Tue, Apr 19, 2016 at 9:30 PM, Varun Prakash wrote: >> >> cxgbit.h - This file contains data structure >

Re: [PATCH 1/5] blk mq: take ref to q when running it

2016-05-25 Thread Bart Van Assche
On 05/25/2016 12:54 AM, mchri...@redhat.com wrote: If the __blk_mq_run_hw_queue is a result of a async run or retry then we do not have a reference to the queue. At this time, blk_cleanup_queue could begin tearing it down while the queue_rq function is being run. This patch just has us do a blk_

Re: [PATCH 2/5] block: add queue reset support

2016-05-25 Thread Bart Van Assche
On 05/25/2016 12:55 AM, mchri...@redhat.com wrote: + spin_lock_irq(q->queue_lock); + wait_event_lock_irq(q->reset_wq, + !queue_flag_test_and_set(QUEUE_FLAG_RESETTING, q), + *q->queue_lock); + if (blk_queue_dead(q)) { +

RE: [PATCH v3 13/13] cxgbit: add files for cxgbit.ko

2016-05-25 Thread Steve Wise
> From: Or Gerlitz [mailto:gerlitz...@gmail.com] > > On Tue, May 24, 2016 at 9:40 AM, Nicholas A. Bellinger > wrote: > > Hi Or & Co, > > On Wed, 2016-05-18 at 14:45 +0300, Or Gerlitz wrote: > >> On Sat, Apr 30, 2016 at 6:54 PM, Or Gerlitz wrote: > >> > On Tue, Apr 19, 2016 at 9:30 PM, Varun Prak

Re: [PATCH 2/5] block: add queue reset support

2016-05-25 Thread Mike Christie
On 05/25/2016 11:13 AM, Bart Van Assche wrote: > On 05/25/2016 12:55 AM, mchri...@redhat.com wrote: >> +spin_lock_irq(q->queue_lock); >> +wait_event_lock_irq(q->reset_wq, >> +!queue_flag_test_and_set(QUEUE_FLAG_RESETTING, q), >> +*q->queue_lock); >> +if (

Re: [PATCH 1/5] blk mq: take ref to q when running it

2016-05-25 Thread Mike Christie
On 05/25/2016 02:15 PM, Mike Christie wrote: > On 05/25/2016 10:53 AM, Bart Van Assche wrote: >> On 05/25/2016 12:54 AM, mchri...@redhat.com wrote: >>> If the __blk_mq_run_hw_queue is a result of a async run or retry >>> then we do not have a reference to the queue. At this time, >>> blk_cleanup_qu

[PATCH 2/2] mpt3sas - avoid mpt3sas_transport_port_add NULL parent_dev

2016-05-25 Thread Joe Lawrence
If _scsih_sas_host_add's call to mpt3sas_config_get_sas_iounit_pg0 fails, ioc->sas_hba.parent_dev may be left uninitialized. A later device probe could invoke mpt3sas_transport_port_add which will call sas_port_alloc_num [scsi_transport_sas] with a NULL parent_dev pointer. Signed-off-by: Joe Lawr

[PATCH 1/2] mpt3sas - set num_phys after allocating phy[] space

2016-05-25 Thread Joe Lawrence
In _scsih_sas_host_add, the number of HBA phys are determined and then later used to allocate an array of struct _sas_phy's. If the routine sets ioc->sas_hba.num_phys, but then fails to allocate the ioc->sas_hba.phy array (by kcalloc error or other intermediate error/exit path), ioc->sas_hba is l

Re: [PATCH 1/5] blk mq: take ref to q when running it

2016-05-25 Thread Mike Christie
On 05/25/2016 10:53 AM, Bart Van Assche wrote: > On 05/25/2016 12:54 AM, mchri...@redhat.com wrote: >> If the __blk_mq_run_hw_queue is a result of a async run or retry >> then we do not have a reference to the queue. At this time, >> blk_cleanup_queue could begin tearing it down while the queue_rq

[PATCH 0/2] _scsih_sas_host_add early exits can crash system

2016-05-25 Thread Joe Lawrence
There are many error paths in _scsih_sas_host_add that lead to an early exit and a few that leave IOC resources uninitialized, setting the stage for a later crash. This can be emulated using a systemtap script like: % stap -g -e \ 'probe module("mpt3sas").function("mpt3sas_config_get_sas_ioun

Converting ipr to use ata_port_operations->error_handler

2016-05-25 Thread Tejun Heo
Hello, Brian. So, of all the ata drivers, ipr seems to be the only driver which doesn't implement ata_port_opeations->error_handler and thus depends on the old error handling path. I'm wondering whether it'd be possible to convert ipr to implement ->error_handler and drop the old path. Would that

[PATCH] target: Fix missing complete during ABORT_TASK + CMD_T_FABRIC_STOP

2016-05-25 Thread Nicholas A. Bellinger
From: Nicholas Bellinger During transport_generic_free_cmd() with a concurrent TMR ABORT_TASK and shutdown CMD_T_FABRIC_STOP bit set, the caller will be blocked on se_cmd->cmd_wait_stop completion until the final kref_put() -> target_release_cmd_kref() has been invoked to call complete(). Howeve

Re: [PATCH] tcm_qla2xxx Add SCSI command jammer/discard capability to the tcm_qla2xxx module

2016-05-25 Thread Laurence Oberman
- Original Message - > From: "Himanshu Madhani" > To: "Laurence Oberman" , "Nicholas A. Bellinger" > > Cc: "Bart Van Assche" , "linux-scsi" > , "target-devel" > , "Quinn Tran" > Sent: Monday, May 9, 2016 1:08:36 PM > Subject: Re: [PATCH] tcm_qla2xxx Add SCSI command jammer/discard c

Re: [PATCH v3 13/13] cxgbit: add files for cxgbit.ko

2016-05-25 Thread Or Gerlitz
On Wed, May 25, 2016 at 8:40 PM, Steve Wise wrote: >> From: Or Gerlitz [mailto:gerlitz...@gmail.com] >> >> On Tue, May 24, 2016 at 9:40 AM, Nicholas A. Bellinger >> wrote: >> > Hi Or & Co, >> > On Wed, 2016-05-18 at 14:45 +0300, Or Gerlitz wrote: >> >> On Sat, Apr 30, 2016 at 6:54 PM, Or Gerlitz

bio-based DM multipath is back from the dead [was: Re: Notes from the four separate IO track sessions at LSF/MM]

2016-05-25 Thread Mike Snitzer
On Thu, Apr 28 2016 at 11:40am -0400, James Bottomley wrote: > On Thu, 2016-04-28 at 08:11 -0400, Mike Snitzer wrote: > > Full disclosure: I'll be looking at reinstating bio-based DM multipath to > > regain efficiencies that now really matter when issuing IO to extremely > > fast devices (e.g. NV

Re: [PATCH] tcm_qla2xxx Add SCSI command jammer/discard capability to the tcm_qla2xxx module

2016-05-25 Thread Nicholas A. Bellinger
On Wed, 2016-05-25 at 16:12 -0400, Laurence Oberman wrote: > > Hi Nicholas, > > Can we pull this one in for submission now that its been acked'd by Himanshu. > Thanks > Laurence This patch has been queued in target-pending/for-next for the last weeks, and will be included in the v4.7-rc1 PULL

Re: [PATCH v3 13/13] cxgbit: add files for cxgbit.ko

2016-05-25 Thread Nicholas A. Bellinger
On Wed, 2016-05-25 at 23:41 +0300, Or Gerlitz wrote: > On Wed, May 25, 2016 at 8:40 PM, Steve Wise > wrote: > >> From: Or Gerlitz [mailto:gerlitz...@gmail.com] > >> > . > > > > Hey Or and Nicholas, > > > > I've been staying out of this directly due to my workload. But I will now > > take a lo

Re: [PATCH] target: Fix missing complete during ABORT_TASK + CMD_T_FABRIC_STOP

2016-05-25 Thread Christoph Hellwig
I think the function could be further cut down, given that a) there is no need to take a lock to read a single field b) CMD_T_FABRIC_STOP is never cleared and we can check it later See the incremental patch below: diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_co