Re: [PATCH 0/2][RFC] block: default to deadline for SMR devices

2018-05-30 Thread Damien Le Moal
Christoph, On 5/30/18 17:47, Christoph Hellwig wrote: > On Wed, May 30, 2018 at 06:22:04AM +, Damien Le Moal wrote: >> That would necessitate splitting elevator_init() into a generic elevator >> initialization function setting up the elevator related fields of the >> request queue and a

Re: [PATCH 0/2][RFC] block: default to deadline for SMR devices

2018-05-30 Thread Damien Le Moal
On 5/31/18 00:52, Jens Axboe wrote: > On 5/30/18 9:45 AM, Jeff Moyer wrote: >> Jens Axboe writes: >> >>> On 5/30/18 9:06 AM, Jeff Moyer wrote: Hi, Jens, Jens Axboe writes: > On 5/30/18 2:49 AM, Christoph Hellwig wrote: >> While I really don't want drivers to change

Re: [PATCH 0/2][RFC] block: default to deadline for SMR devices

2018-05-30 Thread Damien Le Moal
On 5/31/18 00:45, Jeff Moyer wrote: > Jens Axboe writes: >> But what's the regression? 4.15 had no zone write locking at all. > > The zone write locking was done in the sd driver prior to 4.16. See > commit 39051dd85f287 ("scsi: sd: Remove zone write locking") for where > it was removed. That

Re: [PATCH 12/12] nvme: limit warnings from nvme_identify_ns

2018-05-30 Thread Sagi Grimberg
Looks good, Reviewed-by: Sagi Grimberg

Re: [PATCH 11/12] nvme: use the changed namespaces list log to clear ns data changed AENs

2018-05-30 Thread Sagi Grimberg
Looks good, Reviewed-by: Sagi Grimberg

Re: [PATCH 10/12] nvme: mark nvme_queue_scan static

2018-05-30 Thread Sagi Grimberg
Looks good, Reviewed-by: Sagi Grimberg

Re: [PATCH 10/12] btrfs: convert to bioset_init()/mempool_init()

2018-05-30 Thread Chris Mason
On 20 May 2018, at 18:25, Kent Overstreet wrote: Signed-off-by: Kent Overstreet --- fs/btrfs/extent_io.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) Assuming the rest of the comments/questions for the series get worked out, the btrfs side of this

Re: [PATCH 08/12] nvmet: mask pending AERs

2018-05-30 Thread Sagi Grimberg
Reviewed-by: Sagi Grimberg

Re: [PATCH 09/12] nvme: submit AEN event configuration on startup

2018-05-30 Thread Sagi Grimberg
Looks good, Reviewed-by: Sagi Grimberg

Re: [PATCH 07/12] nvmet: Add AEN configuration support

2018-05-30 Thread Sagi Grimberg
Looks good, Reviewed-by: Sagi Grimberg

Re: [PATCH 06/12] nvmet: implement the changed namespaces log

2018-05-30 Thread Sagi Grimberg
Looks good, Reviewed-by: Sagi Grimberg

Re: [PATCH 05/12] nvmet: split log page implementation

2018-05-30 Thread Sagi Grimberg
Looks good, Reviewed-by: Sagi Grimberg

Re: [PATCH 04/12] nvmet: add a new nvmet_zero_sgl helper

2018-05-30 Thread Sagi Grimberg
+u16 nvmet_zero_sgl(struct nvmet_req *req, off_t off, size_t len) Would personally prefer nvmet_clear_sgl, but not hard headed on it, Reviewed-by: Sagi Grimberg

Re: [PATCH 03/12] nvme.h: add AER configuration symbols

2018-05-30 Thread Sagi Grimberg
Looks good, Reviewed-by: Sagi Grimberg

Re: [PATCH 02/12] nvme.h: add the changed namespace list log

2018-05-30 Thread Sagi Grimberg
Looks good, Reviewed-by: Sagi Grimberg

Re: [PATCH 01/12] nvme.h: untangle AEN notice definitions

2018-05-30 Thread Sagi Grimberg
Looks good, Reviewed-by: Sagi Grimberg

[GIT PULL] Single fix for 4.17 final

2018-05-30 Thread Jens Axboe
Hi Linus, Just a single fix that should make it into this release, fixing a regression with T10-DIF on NVMe. Please pull! git://git.kernel.dk/linux-block.git tags/for-linus-20180530 Jens Axboe (1): Merge branch 'nvme

Re: [PATCH] blk-throttle: return proper bool type to caller instead of 0/1

2018-05-30 Thread Jens Axboe
On 5/29/18 4:32 AM, Chengguang Xu wrote: > Change to return true/false only for bool type return code. Looks good, applied. -- Jens Axboe

Re: [PATCH 06/12] nvmet: implement the changed namespaces log

2018-05-30 Thread Daniel Verkamp
On 05/30/2018 09:45 AM, Christoph Hellwig wrote: > Just keep a per-controller buffer of changed namespaces and copy it out > in the get log page implementation. > > Signed-off-by: Christoph Hellwig > --- [...] > +static void nvmet_add_to_changed_ns_log(struct nvmet_ctrl *ctrl, __le32 nsid) > +{

Re: [PATCH] blk-mq: only iterate over inflight requests in blk_mq_tagset_busy_iter

2018-05-30 Thread Jens Axboe
On 5/30/18 10:51 AM, Christoph Hellwig wrote: > We already check for started commands in all callbacks, but we should > also protect against already completed commands. Do this by taking > the checks to common code. Looks good, applied. -- Jens Axboe

Re: [PATCH] nbd: clear DISCONNECT_REQUESTED flag once disconnection occurs.

2018-05-30 Thread Jens Axboe
On 5/30/18 10:45 AM, kvi...@gmail.com wrote: > From: Kevin Vigor > > When a userspace client requests a NBD device be disconnected, the > DISCONNECT_REQUESTED flag is set. While this flag is set, the driver > will not inform userspace when a connection is closed. > > Unfortunately the flag was

Re: [PATCH] nbd: clear DISCONNECT_REQUESTED flag once disconnection occurs.

2018-05-30 Thread Josef Bacik
On Wed, May 30, 2018 at 10:45:11AM -0600, kvi...@gmail.com wrote: > From: Kevin Vigor > > When a userspace client requests a NBD device be disconnected, the > DISCONNECT_REQUESTED flag is set. While this flag is set, the driver > will not inform userspace when a connection is closed. > >

Re: [PATCH] blk-mq: only iterate over inflight requests in blk_mq_tagset_busy_iter

2018-05-30 Thread Josef Bacik
On Wed, May 30, 2018 at 06:51:00PM +0200, Christoph Hellwig wrote: > We already check for started commands in all callbacks, but we should > also protect against already completed commands. Do this by taking > the checks to common code. > > Signed-off-by: Christoph Hellwig Acked-by: Josef

[PATCH 11/12] nvme: use the changed namespaces list log to clear ns data changed AENs

2018-05-30 Thread Christoph Hellwig
Per section 5.2 we need to issue the corresponding log page to clear an AEN, so for a namespace data changed AEN we need to read the changed namespace list log. And once we read that log anyway we might as well use it to optimize the rescan. Signed-off-by: Christoph Hellwig ---

[PATCH 10/12] nvme: mark nvme_queue_scan static

2018-05-30 Thread Christoph Hellwig
And move it toward the top of the file to avoid a forward declaration. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn --- drivers/nvme/host/core.c | 19 +-- drivers/nvme/host/nvme.h | 1 - 2 files changed, 9 insertions(+), 11 deletions(-) diff --git

[PATCH 12/12] nvme: limit warnings from nvme_identify_ns

2018-05-30 Thread Christoph Hellwig
When rescanning namespaces after an AEN we will issue Identify Namespace comands to namespaces that have gone away, so don't warn for this specific case. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn --- drivers/nvme/host/core.c | 4 +++- 1 file changed, 3 insertions(+), 1

[PATCH 09/12] nvme: submit AEN event configuration on startup

2018-05-30 Thread Christoph Hellwig
From: Hannes Reinecke We should register for AEN events; some law-abiding targets might not be sending us AENs otherwise. Signed-off-by: Hannes Reinecke [hch: slight cleanups] Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn --- drivers/nvme/host/core.c | 17

[PATCH 07/12] nvmet: Add AEN configuration support

2018-05-30 Thread Christoph Hellwig
AEN configuration via the 'Get Features' and 'Set Features' admin command is mandatory, so we should be implemeting handling for it. Signed-off-by: Hannes Reinecke [hch: use WRITE_ONCE, check for invalid values] Signed-off-by: Christoph Hellwig --- drivers/nvme/target/admin-cmd.c | 15

[PATCH 08/12] nvmet: mask pending AERs

2018-05-30 Thread Christoph Hellwig
Per section 5.2 of the NVMe 1.3 spec: "When the controller posts a completion queue entry for an outstanding Asynchronous Event Request command and thus reports an asynchronous event, subsequent events of that event type are automatically masked by the controller until the host clears

[PATCH 03/12] nvme.h: add AER configuration symbols

2018-05-30 Thread Christoph Hellwig
From: Hannes Reinecke Signed-off-by: Hannes Reinecke [hch: split from a larger patch] Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn --- include/linux/nvme.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/nvme.h b/include/linux/nvme.h index

[PATCH 02/12] nvme.h: add the changed namespace list log

2018-05-30 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn --- include/linux/nvme.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/nvme.h b/include/linux/nvme.h index c37103a4ad38..7ce0f3cf4409 100644 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h @@ -751,6

[PATCH 05/12] nvmet: split log page implementation

2018-05-30 Thread Christoph Hellwig
Remove the common code to allocate a buffer and copy it into the SGL. Instead the two no-op implementations just zero the SGL directly, and the smart log allocates a buffer on its own. This prepares for the more elaborate ANA log page. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes

[PATCH 01/12] nvme.h: untangle AEN notice definitions

2018-05-30 Thread Christoph Hellwig
Stop including the event type in the definitions for the notice type. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn --- drivers/nvme/host/core.c | 30 ++ include/linux/nvme.h | 8 ++-- 2 files changed, 24 insertions(+), 14 deletions(-)

[PATCH 04/12] nvmet: add a new nvmet_zero_sgl helper

2018-05-30 Thread Christoph Hellwig
Zeroes the SGL in the payload. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn --- drivers/nvme/target/core.c | 7 +++ drivers/nvme/target/nvmet.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c index

nvme/nvmet AEN and log page fixups v2

2018-05-30 Thread Christoph Hellwig
Hi all, this series started as prep work for ANA, but has grown a lot. The idea is to make the AEN handling in the target closer to what the standard says, and implement the changed namespaces list log page, which is required to clear the namespace attribute notice event. One the host side this

[PATCH] nbd: clear DISCONNECT_REQUESTED flag once disconnection occurs.

2018-05-30 Thread kvigor
From: Kevin Vigor When a userspace client requests a NBD device be disconnected, the DISCONNECT_REQUESTED flag is set. While this flag is set, the driver will not inform userspace when a connection is closed. Unfortunately the flag was never cleared, so once a disconnect was requested the

Re: [PATCH 0/2][RFC] block: default to deadline for SMR devices

2018-05-30 Thread Jens Axboe
On 5/30/18 9:45 AM, Jeff Moyer wrote: > Jens Axboe writes: > >> On 5/30/18 9:06 AM, Jeff Moyer wrote: >>> Hi, Jens, >>> >>> Jens Axboe writes: >>> On 5/30/18 2:49 AM, Christoph Hellwig wrote: > While I really don't want drivers to change the I/O schedule themselves > we have a

Re: [PATCH 0/2][RFC] block: default to deadline for SMR devices

2018-05-30 Thread Jeff Moyer
Jens Axboe writes: > On 5/30/18 9:06 AM, Jeff Moyer wrote: >> Hi, Jens, >> >> Jens Axboe writes: >> >>> On 5/30/18 2:49 AM, Christoph Hellwig wrote: While I really don't want drivers to change the I/O schedule themselves we have a class of devices (zoned) that don't work at all with

Re: [PATCH] nbd: clear DISCONNECT_REQUESTED flag once disconnection occurs.

2018-05-30 Thread Jens Axboe
On 5/29/18 5:09 PM, kvi...@gmail.com wrote: > @@ -937,7 +946,7 @@ static int nbd_reconnect_socket(struct nbd_device *nbd, > unsigned long arg) > queue_work(recv_workqueue, >work); > > atomic_inc(>live_connections); > - wake_up(>conn_wait); > +

Re: [PATCH 0/2][RFC] block: default to deadline for SMR devices

2018-05-30 Thread Jens Axboe
On 5/30/18 9:06 AM, Jeff Moyer wrote: > Hi, Jens, > > Jens Axboe writes: > >> On 5/30/18 2:49 AM, Christoph Hellwig wrote: >>> While I really don't want drivers to change the I/O schedule themselves >>> we have a class of devices (zoned) that don't work at all with certain >>> I/O schedulers.

Re: [PATCH 0/2][RFC] block: default to deadline for SMR devices

2018-05-30 Thread Jeff Moyer
Hi, Jens, Jens Axboe writes: > On 5/30/18 2:49 AM, Christoph Hellwig wrote: >> While I really don't want drivers to change the I/O schedule themselves >> we have a class of devices (zoned) that don't work at all with certain >> I/O schedulers. The kernel not chosing something sane and

Re: [PATCH 0/2][RFC] block: default to deadline for SMR devices

2018-05-30 Thread Jens Axboe
On 5/30/18 2:49 AM, Christoph Hellwig wrote: > While I really don't want drivers to change the I/O schedule themselves > we have a class of devices (zoned) that don't work at all with certain > I/O schedulers. The kernel not chosing something sane and requiring > user workarounds is just silly.

Re: [PATCH 0/2][RFC] block: default to deadline for SMR devices

2018-05-30 Thread Bryan Gurney
On Wed, May 30, 2018 at 2:22 AM, Damien Le Moal wrote: > Jens, > > On 5/26/18 13:01, Jens Axboe wrote: >> On 5/25/18 4:18 PM, Jeff Moyer wrote: >>> Hi, Jens, >>> >>> Jens Axboe writes: >>> On 5/25/18 3:14 PM, Jeff Moyer wrote: > Bryan Gurney reported I/O errors when using dm-zoned with

Re: [bug report] IO blocked after offline CPU during fio on nvme SSD

2018-05-30 Thread Yi Zhang
Thanks for the update, will have a try after Keith update v4 fix. :) On 05/30/2018 04:29 PM, Ming Lei wrote: On Wed, May 30, 2018 at 3:53 PM, Yi Zhang wrote: Hi I found this issue during my NVMe test on 4.17.0-rc7, here is the reproducer and dmesg log, let me know if you need more info,

Re: [PATCH 0/2][RFC] block: default to deadline for SMR devices

2018-05-30 Thread Christoph Hellwig
While I really don't want drivers to change the I/O schedule themselves we have a class of devices (zoned) that don't work at all with certain I/O schedulers. The kernel not chosing something sane and requiring user workarounds is just silly.

Re: [PATCH 0/2][RFC] block: default to deadline for SMR devices

2018-05-30 Thread Christoph Hellwig
On Wed, May 30, 2018 at 06:22:04AM +, Damien Le Moal wrote: > That would necessitate splitting elevator_init() into a generic elevator > initialization function setting up the elevator related fields of the > request queue and a second part setting up the default elevator (e.g. >

Re: [bug report] IO blocked after offline CPU during fio on nvme SSD

2018-05-30 Thread Ming Lei
On Wed, May 30, 2018 at 3:53 PM, Yi Zhang wrote: > Hi > I found this issue during my NVMe test on 4.17.0-rc7, here is the reproducer > and dmesg log, let me know if you need more info, thanks. > > Reproduce steps: > #!/bin/bash > set -x > fio -filename=/dev/nvme0n1p1 -iodepth=1 -thread

[bug report] IO blocked after offline CPU during fio on nvme SSD

2018-05-30 Thread Yi Zhang
Hi I found this issue during my NVMe test on 4.17.0-rc7, here is the reproducer and dmesg log, let me know if you need more info, thanks. Reproduce steps: #!/bin/bash set -x fio -filename=/dev/nvme0n1p1 -iodepth=1 -thread -rw=randwrite -ioengine=psync

blktests block/019 lead system hang

2018-05-30 Thread Yi Zhang
Hi Keith I found blktest block/019 also can lead my NVMe server hang with 4.17.0-rc7, let me know if you need more info, thanks. Server: Dell R730xd NVMe SSD: 85:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller 172X (rev 01) Console log: Kernel 4.17.0-rc7 on

Re: [PATCH 0/2][RFC] block: default to deadline for SMR devices

2018-05-30 Thread Damien Le Moal
Jens, On 5/26/18 13:01, Jens Axboe wrote: > On 5/25/18 4:18 PM, Jeff Moyer wrote: >> Hi, Jens, >> >> Jens Axboe writes: >> >>> On 5/25/18 3:14 PM, Jeff Moyer wrote: Bryan Gurney reported I/O errors when using dm-zoned with a host-managed SMR device. It turns out he was using CFQ,