Re: [PATCH v2 6/7] SRP transport: Port srp_wait_for_queuecommand() to scsi-mq

2016-09-28 Thread Hannes Reinecke
On 09/29/2016 02:01 AM, Bart Van Assche wrote: > Ensure that if scsi-mq is enabled that srp_wait_for_queuecommand() > waits until ongoing shost->hostt->queuecommand() calls have finished. > > Signed-off-by: Bart Van Assche > Cc: James Bottomley

Re: [PATCH v2 2/7] dm: Use BLK_MQ_S_STOPPED instead of QUEUE_FLAG_STOPPED in blk-mq code

2016-09-28 Thread Hannes Reinecke
On 09/29/2016 01:58 AM, Bart Van Assche wrote: > Signed-off-by: Bart Van Assche > Cc: Mike Snitzer > --- > drivers/md/dm-rq.c | 18 ++ > 1 file changed, 2 insertions(+), 16 deletions(-) > Reviewed-by: Hannes Reinecke

Re: [PATCH v2 4/7] blk-mq: Introduce blk_quiesce_queue() and blk_resume_queue()

2016-09-28 Thread Hannes Reinecke
On 09/29/2016 01:59 AM, Bart Van Assche wrote: > blk_quiesce_queue() prevents that new queue_rq() invocations > occur and waits until ongoing invocations have finished. This > function does *not* wait until all outstanding requests have > finished (this means invocation of request.end_io()). >

Re: [PATCH] scsi_dh_alua: Fix a reference counting bug

2016-09-28 Thread Hannes Reinecke
On 09/29/2016 01:45 AM, Bart Van Assche wrote: > The code at the end of alua_rtpg_work() is as follows: > > scsi_device_put(sdev); > kref_put(>kref, release_port_group); > > Make sure that all code that queues the work item associated > with alua_rtpg_work() holds both references. >

[no subject]

2016-09-28 Thread Angela Kinto
docfKezS01GeT.doc Description: MS-Word document

Re: [PATCH v4 6/7] sd: Implement support for ZBC devices

2016-09-28 Thread Shaun Tancheff
On Wed, Sep 28, 2016 at 3:45 AM, Damien Le Moal wrote: > From: Hannes Reinecke > > Implement ZBC support functions to setup zoned disks, both > host-managed and host-aware models. Only zoned disks that satisfy > the following conditions are supported: > 1)

Zprava pro vas!!

2016-09-28 Thread K May
Ahoj. Dobry vecer a jak se mas? Jen rychly jedno, je tu oficialni prilezitosti bych chtel diskutovat s vami soukrome.   Ocenil bych vasi rychlou reakci tady na mem osobnim soukromeho e-mailu nize pro dalsí komunikaci. S pratelským pozdravem, Paní Ko May Leung email:

Re: [PATCH v4 5/7] block: Implement support for zoned block devices

2016-09-28 Thread Shaun Tancheff
On Wed, Sep 28, 2016 at 3:45 AM, Damien Le Moal wrote: > From: Hannes Reinecke > > Implement zoned block device zone information reporting and reset. > Zone information are reported as struct blk_zone. This implementation > does not differentiate between

Re: [PATCH v4 3/7] block: update chunk_sectors in blk_stack_limits()

2016-09-28 Thread Shaun Tancheff
On Wed, Sep 28, 2016 at 3:45 AM, Damien Le Moal wrote: > From: Hannes Reinecke > > Signed-off-by: Hannes Reinecke > Signed-off-by: Damien Le Moal > --- > block/blk-settings.c | 4 > 1 file changed, 4

Re: [PATCH v4 2/7] blk-sysfs: Add 'chunk_sectors' to sysfs attributes

2016-09-28 Thread Shaun Tancheff
On Wed, Sep 28, 2016 at 3:45 AM, Damien Le Moal wrote: > From: Hannes Reinecke > > The queue limits already have a 'chunk_sectors' setting, so > we should be presenting it via sysfs. > > Signed-off-by: Hannes Reinecke > > [Damien: Updated

Re: [PATCH v4 1/7] block: Add 'zoned' queue limit

2016-09-28 Thread Shaun Tancheff
On Wed, Sep 28, 2016 at 3:45 AM, Damien Le Moal wrote: > Add the zoned queue limit to indicate the zoning model of a block device. > Defined values are 0 (BLK_ZONED_NONE) for regular block devices, > 1 (BLK_ZONED_HA) for host-aware zone block devices and 2 (BLK_ZONED_HM) >

[PATCH v2 2/7] dm: Use BLK_MQ_S_STOPPED instead of QUEUE_FLAG_STOPPED in blk-mq code

2016-09-28 Thread Bart Van Assche
Signed-off-by: Bart Van Assche Cc: Mike Snitzer --- drivers/md/dm-rq.c | 18 ++ 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c index 182b679..f2c271a 100644 ---

[PATCH v2 3/7] [RFC] nvme: Use BLK_MQ_S_STOPPED instead of QUEUE_FLAG_STOPPED in blk-mq code

2016-09-28 Thread Bart Van Assche
Make nvme_requeue_req() check BLK_MQ_S_STOPPED instead of QUEUE_FLAG_STOPPED. Remove the QUEUE_FLAG_STOPPED manipulations that became superfluous because of this change. This patch fixes a race condition: using queue_flag_clear_unlocked() is not safe if any other function that manipulates the

[PATCH v2 2/7] dm: Use BLK_MQ_S_STOPPED instead of QUEUE_FLAG_STOPPED in blk-mq code

2016-09-28 Thread Bart Van Assche
Signed-off-by: Bart Van Assche Cc: Mike Snitzer --- drivers/md/dm-rq.c | 18 ++ 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c index 182b679..f2c271a 100644 ---

[PATCH v2 7/7] [RFC] nvme: Fix a race condition

2016-09-28 Thread Bart Van Assche
Avoid that nvme_queue_rq() is still running when nvme_stop_queues() returns. Untested. Signed-off-by: Bart Van Assche Cc: Keith Busch Cc: Christoph Hellwig Cc: Sagi Grimberg --- drivers/nvme/host/core.c | 20

[PATCH v2 6/7] SRP transport: Port srp_wait_for_queuecommand() to scsi-mq

2016-09-28 Thread Bart Van Assche
Ensure that if scsi-mq is enabled that srp_wait_for_queuecommand() waits until ongoing shost->hostt->queuecommand() calls have finished. Signed-off-by: Bart Van Assche Cc: James Bottomley Cc: Martin K. Petersen

[PATCH v2 5/7] dm: Fix a race condition related to stopping and starting queues

2016-09-28 Thread Bart Van Assche
Ensure that all ongoing dm_mq_queue_rq() and dm_mq_requeue_request() calls have stopped before setting the "queue stopped" flag. This allows to remove the "queue stopped" test from dm_mq_queue_rq() and dm_mq_requeue_request(). This patch fixes a race condition because dm_mq_queue_rq() is called

[PATCH v2 4/7] blk-mq: Introduce blk_quiesce_queue() and blk_resume_queue()

2016-09-28 Thread Bart Van Assche
blk_quiesce_queue() prevents that new queue_rq() invocations occur and waits until ongoing invocations have finished. This function does *not* wait until all outstanding requests have finished (this means invocation of request.end_io()). blk_resume_queue() resumes normal I/O processing.

[PATCH v2 3/7] [RFC] nvme: Use BLK_MQ_S_STOPPED instead of QUEUE_FLAG_STOPPED in blk-mq code

2016-09-28 Thread Bart Van Assche
Make nvme_requeue_req() check BLK_MQ_S_STOPPED instead of QUEUE_FLAG_STOPPED. Remove the QUEUE_FLAG_STOPPED manipulations that became superfluous because of this change. This patch fixes a race condition: using queue_flag_clear_unlocked() is not safe if any other function that manipulates the

[PATCH v2 1/7] blk-mq: Introduce blk_mq_queue_stopped()

2016-09-28 Thread Bart Van Assche
The function blk_queue_stopped() allows to test whether or not a traditional request queue has been stopped. Introduce a helper function that allows block drivers to query easily whether or not one or more hardware contexts of a blk-mq queue have been stopped. Signed-off-by: Bart Van Assche

[PATCH v2 0/7] Introduce blk_quiesce_queue() and blk_resume_queue()

2016-09-28 Thread Bart Van Assche
Hello Jens, Multiple block drivers need the functionality to stop a request queue and to wait until all ongoing request_fn() / queue_rq() calls have finished without waiting until all outstanding requests have finished. Hence this patch series that introduces the blk_mq_quiesce_queue() and

[PATCH] scsi_dh_alua: Fix a reference counting bug

2016-09-28 Thread Bart Van Assche
The code at the end of alua_rtpg_work() is as follows: scsi_device_put(sdev); kref_put(>kref, release_port_group); Make sure that all code that queues the work item associated with alua_rtpg_work() holds both references. Signed-off-by: Bart Van Assche

Re: UFS API in the kernel

2016-09-28 Thread subhashj
On 2016-09-28 02:19, Joao Pinto wrote: Hi again! Could you also send me an example of how you are using the IOCTL from your user app (send/receive data)? I already have my implemented but you use a different mechanism (I have checked your structures in uapi/scsi/ufs/) and I have to port it!

Re: [PATCH 3/3] g_NCR5380: Stop using scsi_module.c

2016-09-28 Thread Finn Thain
Acked-by: Finn Thain On Tue, 27 Sep 2016, Ondrej Zary wrote: > Convert g_NCR5380 to use scsi_add_host instead of scsi_module.c > Use pnp_driver and isa_driver to manage cards. > > In order to support multiple cards, new module parameter format is > introduced. The

Re: [PATCH 2/3] g_NCR5380: Reduce overrides[] from array to struct

2016-09-28 Thread Finn Thain
Acked-by: Finn Thain On Tue, 27 Sep 2016, Ondrej Zary wrote: > Remove compile-time card type definition GENERIC_NCR5380_OVERRIDE. > Then remove all code iterating the overrides[] array and reduce it to > struct card. > > Signed-off-by: Ondrej Zary

Re: [PATCH 1/3] g_NCR5380: Remove deprecated __setup

2016-09-28 Thread Finn Thain
Acked-by: Finn Thain On Tue, 27 Sep 2016, Ondrej Zary wrote: > Remove deprecated __setup for parsing command line parameters. > g_NCR5380.* parameters could be used instead. > > This might break existing setups with g_NCR5380 built-in (if there are > any). But it

Re: [PATCH -next] scsi: ufs: fix error return code in ufshcd_init()

2016-09-28 Thread subhashj
Looks good to me. Reviewed-by: Subhash Jadavani On 2016-09-28 07:49, Wei Yongjun wrote: From: Wei Yongjun Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei

Re: UFS API in the kernel

2016-09-28 Thread subhashj
On 2016-09-28 02:57, Joao Pinto wrote: I was able to get the 7 patches to have the UFS IOCTL features from your repo. BTW, why weren't these features submitted to the kernel? I checked lots of tweaks that you have been making to the UFS... do you synchronize them periodically with the mainline?

Re: [PATCH v2] UFS: Date Segment only need for WRITE DESCRIPTOR

2016-09-28 Thread subhashj
On 2016-09-27 22:14, Martin K. Petersen wrote: "Subhash" == subhashj writes: Subhash> Looks good to me. - /* Data segment length */ - ucd_req_ptr->header.dword_2 = UPIU_HEADER_DWORD( - 0, 0, len >> 8, (u8)len); + /* Data

[PATCH 0/2] libfc/fcoe Fixes

2016-09-28 Thread Chad Dupuis
Hi James, Martin During testing we fixed a deadlock we found in libfc while logging off from the fabric if an ELS command was still outstanding. Also we wanted to make clear virtual link handling a little more robust when the fcoe_ctlr is not logged into the fabric. Please apply at your

[PATCH 1/2] fcoe: Harden CVL handling when we have not logged into the fabric.

2016-09-28 Thread Chad Dupuis
If we haven't logged into the fabric yet we want to be a little more nuanced with our CVL handling than what we've been: - If the FCF has been selected, check the source MAC to make sure the frame is from the FCF we've selected. - If a FCF is selected and the CVL is from the FCF but we have not

[PATCH 2/2] libfc: Do not take rdata->rp_mutex when processing a -FC_EX_CLOSED ELS response.

2016-09-28 Thread Chad Dupuis
When an ELS response handler receives a -FC_EX_CLOSED, the rdata->rp_mutex is already held which can lead to a deadlock condition like the following stack trace: [] fc_rport_plogi_resp+0x28/0x200 [libfc] [] fc_invoke_resp+0x6a/0xe0 [libfc] [] fc_exch_mgr_reset+0x1b8/0x280 [libfc] []

[PATCH -next] scsi: ufs: fix error return code in ufshcd_init()

2016-09-28 Thread Wei Yongjun
From: Wei Yongjun Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/scsi/ufs/ufshcd.c | 1 + 1 file changed, 1 insertion(+) diff --git

RE: [PATCH 9/9] [RFC] nvme: Fix a race condition

2016-09-28 Thread Steve Wise
> > Hello James and Steve, > > I will add a comment. > > Please note that the above patch does not change the behavior of > nvme_stop_queues() except that it causes nvme_stop_queues() to wait > until any ongoing nvme_queue_rq() calls have finished. > blk_resume_queue() does not affect the value

Re: UFS API in the kernel

2016-09-28 Thread Joao Pinto
I was able to get the 7 patches to have the UFS IOCTL features from your repo. BTW, why weren't these features submitted to the kernel? I checked lots of tweaks that you have been making to the UFS... do you synchronize them periodically with the mainline? Thanks! On 9/28/2016 10:19 AM, Joao

Re: UFS API in the kernel

2016-09-28 Thread Joao Pinto
Hi Subhash, On 9/28/2016 12:05 AM, subha...@codeaurora.org wrote: > Hi Joao, > > > On 2016-09-26 18:10, Kiwoong Kim wrote: >> Hi. >> >> If you want to declare some things for user interface, >> is it be better to put those thing include/uapi/linux/ than include/linux? >> >> Agreed with Mr.

Re: UFS API in the kernel

2016-09-28 Thread Joao Pinto
Hi again! Could you also send me an example of how you are using the IOCTL from your user app (send/receive data)? I already have my implemented but you use a different mechanism (I have checked your structures in uapi/scsi/ufs/) and I have to port it! Thanks! On 9/28/2016 10:06 AM, Joao Pinto

[PATCH v4 6/7] sd: Implement support for ZBC devices

2016-09-28 Thread Damien Le Moal
From: Hannes Reinecke Implement ZBC support functions to setup zoned disks, both host-managed and host-aware models. Only zoned disks that satisfy the following conditions are supported: 1) All zones are the same size, with the exception of an eventual last smaller runt zone. 2)

[PATCH v4 7/7] blk-zoned: implement ioctls

2016-09-28 Thread Damien Le Moal
From: Shaun Tancheff Adds the new BLKREPORTZONE and BLKRESETZONE ioctls for respectively obtaining the zone configuration of a zoned block device and resetting the write pointer of sequential zones of a zoned block device. The BLKREPORTZONE ioctl maps directly to a single

[PATCH v4 4/7] block: Define zoned block device operations

2016-09-28 Thread Damien Le Moal
From: Shaun Tancheff Define REQ_OP_ZONE_REPORT and REQ_OP_ZONE_RESET for handling zones of host-managed and host-aware zoned block devices. With with these two new operations, the total number of operations defined reaches 8 and still fits with the 3 bits definition

[PATCH v4 3/7] block: update chunk_sectors in blk_stack_limits()

2016-09-28 Thread Damien Le Moal
From: Hannes Reinecke Signed-off-by: Hannes Reinecke Signed-off-by: Damien Le Moal --- block/blk-settings.c | 4 1 file changed, 4 insertions(+) diff --git a/block/blk-settings.c b/block/blk-settings.c index b1d5b7f..55369a6 100644

[PATCH v4 5/7] block: Implement support for zoned block devices

2016-09-28 Thread Damien Le Moal
From: Hannes Reinecke Implement zoned block device zone information reporting and reset. Zone information are reported as struct blk_zone. This implementation does not differentiate between host-aware and host-managed device models and is valid for both. Two functions are provided:

[PATCH v4 0/7] ZBC / Zoned block device support

2016-09-28 Thread Damien Le Moal
This series introduces support for zoned block devices. It integrates earlier submissions by Hannes Reinecke and Shaun Tancheff. Compared to the previous series version, the code was significantly simplified by limiting support to zoned devices satisfying the following conditions: 1) All zones of

[PATCH v4 2/7] blk-sysfs: Add 'chunk_sectors' to sysfs attributes

2016-09-28 Thread Damien Le Moal
From: Hannes Reinecke The queue limits already have a 'chunk_sectors' setting, so we should be presenting it via sysfs. Signed-off-by: Hannes Reinecke [Damien: Updated Documentation/ABI/testing/sysfs-block] Signed-off-by: Damien Le Moal

[PATCH v4 1/7] block: Add 'zoned' queue limit

2016-09-28 Thread Damien Le Moal
Add the zoned queue limit to indicate the zoning model of a block device. Defined values are 0 (BLK_ZONED_NONE) for regular block devices, 1 (BLK_ZONED_HA) for host-aware zone block devices and 2 (BLK_ZONED_HM) for host-managed zone block devices. The standards defined drive managed model is not