Re: [PATCH 00/10] nvme multipath support on top of nvme-4.13 branch

2017-09-12 Thread Hannes Reinecke
On 09/12/2017 06:20 AM, Anish M Jhaveri wrote: > Hello everyone, > Please find patchset for supporting Multipathing using nvme namespace > and nvme controller. > > Basic idea behind the design and implementation is to re-use the same > logic which is between generic nvme namespace and it's cont

Re: [PATCH 01/10] Initial multipath implementation.

2017-09-12 Thread Anish Jhaveri
On Tue, Sep 12, 2017 at 12:00:44PM -0400, Keith Busch wrote: > > I find this patch series confusing to review. You declare these failover > functions in patch 1, use them in patch 2, but they're not defined until > patch 7. Sorry for late reply. Idea was to keep header file changes as separate p

Re: [PATCH 02/10] RDMA timeout triggers failover.

2017-09-12 Thread Anish Jhaveri
On Tue, Sep 12, 2017 at 08:48:58AM -0700, James Smart wrote: > I don't know this is a good idea - just because there's a controller reset > we need to failover a path ? Also putting failover smarts in the transport > doesn't seem like a great idea. Also, there's more than just an rdma > transport.

Re: [PATCH] blk-mq: put the driver tag of nxt rq before first one is requeued

2017-09-12 Thread jianchao.wang
On 09/13/2017 11:54 AM, Jens Axboe wrote: > On 09/12/2017 09:39 PM, jianchao.wang wrote: >>> Exactly, and especially the readability is the key element here. It's >>> just not worth it to try and be too clever, especially not for >>> something like this. When you read the above, you immediately k

Re: [PATCH] blk-mq: put the driver tag of nxt rq before first one is requeued

2017-09-12 Thread Jens Axboe
On 09/12/2017 09:39 PM, jianchao.wang wrote: >> Exactly, and especially the readability is the key element here. It's >> just not worth it to try and be too clever, especially not for >> something like this. When you read the above, you immediately know >> what the code does without needing a comme

Re: [PATCH] blk-mq: put the driver tag of nxt rq before first one is requeued

2017-09-12 Thread Ming Lei
On Tue, Sep 12, 2017 at 08:45:19PM -0600, Jens Axboe wrote: > On 09/12/2017 08:42 PM, jianchao.wang wrote: > > > > > > On 09/13/2017 10:23 AM, Jens Axboe wrote: > >> On 09/12/2017 07:39 PM, jianchao.wang wrote: > >>> > >>> > >>> On 09/13/2017 09:24 AM, Ming Lei wrote: > On Wed, Sep 13, 2017

Re: [PATCH] blk-mq: put the driver tag of nxt rq before first one is requeued

2017-09-12 Thread jianchao.wang
On 09/13/2017 10:45 AM, Jens Axboe wrote: @@ -1029,14 +1029,20 @@ bool blk_mq_dispatch_rq_list(struct request_queue *q, struct list_head *list) if (list_empty(list)) bd.last = true; else {

Re: [PATCH] blk-mq: put the driver tag of nxt rq before first one is requeued

2017-09-12 Thread Jens Axboe
On 09/12/2017 08:42 PM, jianchao.wang wrote: > > > On 09/13/2017 10:23 AM, Jens Axboe wrote: >> On 09/12/2017 07:39 PM, jianchao.wang wrote: >>> >>> >>> On 09/13/2017 09:24 AM, Ming Lei wrote: On Wed, Sep 13, 2017 at 09:01:25AM +0800, jianchao.wang wrote: > Hi ming > > On 09/12/2

Re: [PATCH] blk-mq: put the driver tag of nxt rq before first one is requeued

2017-09-12 Thread jianchao.wang
On 09/13/2017 10:23 AM, Jens Axboe wrote: > On 09/12/2017 07:39 PM, jianchao.wang wrote: >> >> >> On 09/13/2017 09:24 AM, Ming Lei wrote: >>> On Wed, Sep 13, 2017 at 09:01:25AM +0800, jianchao.wang wrote: Hi ming On 09/12/2017 06:23 PM, Ming Lei wrote: >> @@ -1029,14 +1029,20 @

Re: [PATCH] blk-mq: put the driver tag of nxt rq before first one is requeued

2017-09-12 Thread Jens Axboe
On 09/12/2017 07:39 PM, jianchao.wang wrote: > > > On 09/13/2017 09:24 AM, Ming Lei wrote: >> On Wed, Sep 13, 2017 at 09:01:25AM +0800, jianchao.wang wrote: >>> Hi ming >>> >>> On 09/12/2017 06:23 PM, Ming Lei wrote: > @@ -1029,14 +1029,20 @@ bool blk_mq_dispatch_rq_list(struct request_queue

Re: [PATCH] blk-mq: put the driver tag of nxt rq before first one is requeued

2017-09-12 Thread Ming Lei
On Wed, Sep 13, 2017 at 09:39:44AM +0800, jianchao.wang wrote: > > > On 09/13/2017 09:24 AM, Ming Lei wrote: > > On Wed, Sep 13, 2017 at 09:01:25AM +0800, jianchao.wang wrote: > >> Hi ming > >> > >> On 09/12/2017 06:23 PM, Ming Lei wrote: > @@ -1029,14 +1029,20 @@ bool blk_mq_dispatch_rq_lis

Re: [PATCH] blk-mq: put the driver tag of nxt rq before first one is requeued

2017-09-12 Thread jianchao.wang
On 09/13/2017 09:24 AM, Ming Lei wrote: > On Wed, Sep 13, 2017 at 09:01:25AM +0800, jianchao.wang wrote: >> Hi ming >> >> On 09/12/2017 06:23 PM, Ming Lei wrote: @@ -1029,14 +1029,20 @@ bool blk_mq_dispatch_rq_list(struct request_queue *q, struct list_head *list) if (li

Re: [PATCH] blk-mq: put the driver tag of nxt rq before first one is requeued

2017-09-12 Thread Ming Lei
On Wed, Sep 13, 2017 at 09:01:25AM +0800, jianchao.wang wrote: > Hi ming > > On 09/12/2017 06:23 PM, Ming Lei wrote: > >> @@ -1029,14 +1029,20 @@ bool blk_mq_dispatch_rq_list(struct request_queue > >> *q, struct list_head *list) > >>if (list_empty(list)) > >>bd.las

Re: [PATCH] blk-mq: put the driver tag of nxt rq before first one is requeued

2017-09-12 Thread jianchao.wang
Hi ming On 09/12/2017 06:23 PM, Ming Lei wrote: >> @@ -1029,14 +1029,20 @@ bool blk_mq_dispatch_rq_list(struct request_queue >> *q, struct list_head *list) >> if (list_empty(list)) >> bd.last = true; >> else { >> -struct request *

Re: [PATCH V2 10/12] scsi: sd_zbc: Disable zone write locking with scsi-mq

2017-09-12 Thread Damien Le Moal
Ming, On 9/12/17 18:26, Ming Lei wrote: >>> OK, I suggest to document this guarantee of no write reorder for ZBC >>> somewhere, so that people will keep it in mind when trying to change >>> the current code. >> >> Have you looked at the comments in sd_zbc.c ? That is explained there. >> Granted, t

Re: [PATCH V4 0/10] block/scsi: safe SCSI quiescing

2017-09-12 Thread Cathy Avery
On 09/11/2017 07:10 AM, Ming Lei wrote: Hi, The current SCSI quiesce isn't safe and easy to trigger I/O deadlock. Once SCSI device is put into QUIESCE, no new request except for RQF_PREEMPT can be dispatched to SCSI successfully, and scsi_device_quiesce() just simply waits for completion of I/O

Re: [PATCH 4/5] block: Make SCSI device suspend work reliably

2017-09-12 Thread Ming Lei
On Fri, Sep 08, 2017 at 04:52:25PM -0700, Bart Van Assche wrote: > Instead of allowing request allocation to succeed for suspended > request queues and only to process power management requests, make > blk_get_request() wait until the request queue is resumed for > requests that are not power manag

Re: [PATCH 4/5] block: Make SCSI device suspend work reliably

2017-09-12 Thread Ming Lei
On Tue, Sep 12, 2017 at 03:45:50PM +, Bart Van Assche wrote: > On Tue, 2017-09-12 at 10:29 +0800, Ming Lei wrote: > > On Fri, Sep 08, 2017 at 04:52:25PM -0700, Bart Van Assche wrote: > > > @@ -1350,6 +1368,16 @@ static struct request *get_request(struct > > > request_queue *q, unsigned int op,

Re: [PATCH 01/10] Initial multipath implementation.

2017-09-12 Thread Keith Busch
On Mon, Sep 11, 2017 at 09:21:49PM -0700, Anish M Jhaveri wrote: > struct nvme_ctrl_ops { > @@ -277,6 +307,7 @@ bool nvme_change_ctrl_state(struct nvme_ctrl *ctrl, > int nvme_disable_ctrl(struct nvme_ctrl *ctrl, u64 cap); > int nvme_enable_ctrl(struct nvme_ctrl *ctrl, u64 cap); > int nvme_shutd

Re: [PATCH 10/10] Reserved tag for active ns command

2017-09-12 Thread James Smart
Please commonize the # of reserved tags.  There's more than 1 transport and they all do the same things. -- james On 9/11/2017 9:33 PM, Anish M Jhaveri wrote: Using reserved tag for setting standby namespace to active using nvme command. Signed-off-by: Anish M Jhaveri --- drivers/nvme/hos

Re: [PATCH 02/10] RDMA timeout triggers failover.

2017-09-12 Thread James Smart
I don't know this is a good idea - just because there's a controller reset we need to failover a path ? Also putting failover smarts in the transport doesn't seem like a great idea. Also, there's more than just an rdma transport -- james On 9/11/2017 9:22 PM, Anish M Jhaveri wrote: Tri

Re: [PATCH 4/5] block: Make SCSI device suspend work reliably

2017-09-12 Thread Bart Van Assche
On Tue, 2017-09-12 at 10:29 +0800, Ming Lei wrote: > On Fri, Sep 08, 2017 at 04:52:25PM -0700, Bart Van Assche wrote: > > @@ -1350,6 +1368,16 @@ static struct request *get_request(struct > > request_queue *q, unsigned int op, > > lockdep_assert_held(q->queue_lock); > > WARN_ON_ONCE(q->mq_o

Re: [PATCH] blk-mq: fix nr_requests wrong value when modify it from sysfs

2017-09-12 Thread weiping zhang
On Wed, Sep 06, 2017 at 01:00:44PM +, Bart Van Assche wrote: > On Wed, 2017-09-06 at 15:34 +0800, weiping zhang wrote: > > On Tue, Sep 05, 2017 at 03:42:45PM +, Bart Van Assche wrote: > > > On Sun, 2017-09-03 at 21:46 +0800, weiping zhang wrote: > > > > if blk-mq use "none" io scheduler, nr

Re: [PATCH V2] lightnvm: prevent bd removal if busy

2017-09-12 Thread Javier González
> On 10 Sep 2017, at 21.07, Rakesh Pandit wrote: > > When a virtual block device is formatted and mounted after creating > with "nvme lnvm create... -t pblk", a removal from "nvm lnvm remove" > would result in this: > > 446416.309757] bdi-block not registered > [446416.309773] [ cut

Re: [PATCH] blk-mq: put the driver tag of nxt rq before first one is requeued

2017-09-12 Thread Ming Lei
On Wed, Sep 13, 2017 at 01:14:35AM +0800, Jianchao Wang wrote: > When free the driver tag of the next rq with I/O scheduler > configured, it get the first entry of the list, however, at the > moment, the failed rq has been requeued at the head of the list. > The rq it gets is the failed rq not the

Re: [PATCH V2 10/12] scsi: sd_zbc: Disable zone write locking with scsi-mq

2017-09-12 Thread Ming Lei
On Tue, Sep 12, 2017 at 05:24:02PM +0900, Damien Le Moal wrote: > Ming, > > On 9/10/17 14:10, Ming Lei wrote: > > On Fri, Sep 08, 2017 at 09:53:53AM -0700, Damien Le Moal wrote: > >> Ming, > >> > >> On 9/8/17 05:43, Ming Lei wrote: > >>> Hi Damien, > >>> > >>> On Fri, Sep 08, 2017 at 01:16:38AM +0

Re: [PATCH 5/5] blk-mq: Implement power management support

2017-09-12 Thread Ming Lei
On Fri, Sep 08, 2017 at 04:52:26PM -0700, Bart Van Assche wrote: > Implement the following approach for blk-mq: > - Either make blk_get_request() wait or make it fail when a > request queue is not in status RPM_ACTIVE. > - While suspending, suspended or resuming, only process power > management

[PATCH] blk-mq: put the driver tag of nxt rq before first one is requeued

2017-09-12 Thread Jianchao Wang
When free the driver tag of the next rq with I/O scheduler configured, it get the first entry of the list, however, at the moment, the failed rq has been requeued at the head of the list. The rq it gets is the failed rq not the next rq. Free the driver tag of next rq before the failed one is requeu

Re: [PATCH V2 00/12] scsi-mq support for ZBC disks

2017-09-12 Thread Damien Le Moal
Christoph, On 9/11/17 21:24, Christoph Hellwig wrote: > On Fri, Sep 08, 2017 at 09:12:12AM -0700, Damien Le Moal wrote: >> 1) The zone size and the number of zones of the device (for the bitmaps >> allocation and offset->zone number conversion). >> 2) Zone type for the optimization that avoids loc

Re: [PATCH V2 10/12] scsi: sd_zbc: Disable zone write locking with scsi-mq

2017-09-12 Thread Damien Le Moal
Ming, On 9/10/17 14:10, Ming Lei wrote: > On Fri, Sep 08, 2017 at 09:53:53AM -0700, Damien Le Moal wrote: >> Ming, >> >> On 9/8/17 05:43, Ming Lei wrote: >>> Hi Damien, >>> >>> On Fri, Sep 08, 2017 at 01:16:38AM +0900, Damien Le Moal wrote: In the case of a ZBC disk used with scsi-mq, zone wr

Re: [PATCH V2 11/12] scsi: sd: Introduce scsi_disk_from_queue()

2017-09-12 Thread Damien Le Moal
Ming, On 9/10/17 14:16, Ming Lei wrote: > On Fri, Sep 08, 2017 at 01:16:39AM +0900, Damien Le Moal wrote: >> Using scsi_device_from_queue(), return the scsi_disk structure >> associated with a request queue if the device is a disk. >> Export this function to make it available to modules. >> > > T