Re: [PATCH 00/13] convert block layer to bioset_init()/mempool_init()

2018-05-21 Thread Christoph Hellwig
On Mon, May 21, 2018 at 07:38:55PM -0400, Kent Overstreet wrote: > On Mon, May 21, 2018 at 02:24:32PM -0400, Mike Snitzer wrote: > > Every single data structure change in this series should be reviewed for > > unforeseen alignment consequences. Jens seemed to say that is > > worthwhile. Not sure

Re: [PATCH v2 14/26] ibtrs: include client and server modules into kernel compilation

2018-05-21 Thread Leon Romanovsky
On Fri, May 18, 2018 at 03:04:01PM +0200, Roman Pen wrote: > Add IBTRS Makefile, Kconfig and also corresponding lines into upper > layer infiniband/ulp files. > > Signed-off-by: Roman Pen > Signed-off-by: Danil Kipnis > Cc: Jack Wang > --- > drivers/infiniband/Kconfig| 1 + > drive

Re: [RFC PATCH 3/3] blk-mq: Remove generation seqeunce

2018-05-21 Thread Jens Axboe
On May 21, 2018, at 9:47 PM, Ming Lei wrote: > >> On Mon, May 21, 2018 at 09:16:33PM -0600, Jens Axboe wrote: >>> On 5/21/18 8:49 PM, Ming Lei wrote: On Mon, May 21, 2018 at 05:11:31PM -0600, Keith Busch wrote: This patch simplifies the timeout handling by relying on the request re

Re: [RFC PATCH 3/3] blk-mq: Remove generation seqeunce

2018-05-21 Thread Ming Lei
On Mon, May 21, 2018 at 09:16:33PM -0600, Jens Axboe wrote: > On 5/21/18 8:49 PM, Ming Lei wrote: > > On Mon, May 21, 2018 at 05:11:31PM -0600, Keith Busch wrote: > >> This patch simplifies the timeout handling by relying on the request > >> reference counting to ensure the iterator is operating on

Re: [RFC PATCH 3/3] blk-mq: Remove generation seqeunce

2018-05-21 Thread Jens Axboe
On 5/21/18 8:49 PM, Ming Lei wrote: > On Mon, May 21, 2018 at 05:11:31PM -0600, Keith Busch wrote: >> This patch simplifies the timeout handling by relying on the request >> reference counting to ensure the iterator is operating on an inflight > > The reference counting isn't free, what is the rea

Re: [RFC PATCH 3/3] blk-mq: Remove generation seqeunce

2018-05-21 Thread Ming Lei
On Mon, May 21, 2018 at 05:11:31PM -0600, Keith Busch wrote: > This patch simplifies the timeout handling by relying on the request > reference counting to ensure the iterator is operating on an inflight The reference counting isn't free, what is the real benefit in this way? > and truly timed ou

Re: [RFC PATCH 2/3] blk-mq: Fix timeout and state order

2018-05-21 Thread Ming Lei
On Mon, May 21, 2018 at 05:11:30PM -0600, Keith Busch wrote: > The block layer had been setting the state to in-flight prior to updating > the timer. This is the wrong order since the timeout handler could observe > the in-flight state with the older timeout, believing the request had > expired whe

Re: [RFC PATCH 1/3] blk-mq: Reference count request usage

2018-05-21 Thread Ming Lei
On Mon, May 21, 2018 at 05:11:29PM -0600, Keith Busch wrote: > This patch adds a struct kref to struct request so that request users > can be sure they're operating on the same request without it changing > while they're processing it. The request's tag won't be released for > reuse until the last

Re: [PATCH 1/6] nvme: Sync request queues on reset

2018-05-21 Thread Ming Lei
On Mon, May 21, 2018 at 10:25:17AM -0600, Keith Busch wrote: > On Tue, May 22, 2018 at 12:08:37AM +0800, Ming Lei wrote: > > Please take a look at blk_mq_complete_request(). Even with Bart's > > change, the request still won't be completed by driver. The request can > > only be completed by either

Re: [PATCH 3/6] nvme: Move all IO out of controller reset

2018-05-21 Thread Ming Lei
On Mon, May 21, 2018 at 10:23:55AM -0600, Keith Busch wrote: > On Tue, May 22, 2018 at 12:04:53AM +0800, Ming Lei wrote: > > On Mon, May 21, 2018 at 09:44:33AM -0600, Keith Busch wrote: > > > On Mon, May 21, 2018 at 11:34:27PM +0800, Ming Lei wrote: > > > > nvme_dev_disable() quiesces queues first

Re: [PATCH 16/34] iomap: add initial support for writes without buffer heads

2018-05-21 Thread Dave Chinner
On Mon, May 21, 2018 at 04:27:00PM -0700, Darrick J. Wong wrote: > On Fri, May 18, 2018 at 06:48:12PM +0200, Christoph Hellwig wrote: > > For now just limited to blocksize == PAGE_SIZE, where we can simply read > > in the full page in write begin, and just set the whole page dirty after > > copying

Re: [PATCH 00/13] convert block layer to bioset_init()/mempool_init()

2018-05-21 Thread Kent Overstreet
On Mon, May 21, 2018 at 02:24:32PM -0400, Mike Snitzer wrote: > Every single data structure change in this series should be reviewed for > unforeseen alignment consequences. Jens seemed to say that is > worthwhile. Not sure if he'll do it or we divide it up. If we divide > it up a temp topic bra

Re: [RFC PATCH 0/3] blk-mq: Timeout rework

2018-05-21 Thread Bart Van Assche
On Mon, 2018-05-21 at 17:11 -0600, Keith Busch wrote: > The current blk-mq code potentially locks requests out of completion by > the thousands, making drivers jump through hoops to handle them. This > patch set allows drivers to complete their requests whenever they're > completed without requirin

Re: [RFC PATCH 3/3] blk-mq: Remove generation seqeunce

2018-05-21 Thread Bart Van Assche
On Mon, 2018-05-21 at 17:11 -0600, Keith Busch wrote: > @@ -650,27 +600,10 @@ static u64 blk_mq_rq_aborted_gstate(struct request *rq) > void blk_mq_complete_request(struct request *rq) > { > struct request_queue *q = rq->q; > - struct blk_mq_hw_ctx *hctx = blk_mq_map_queue(q, rq->mq_ctx

Re: [PATCH 16/34] iomap: add initial support for writes without buffer heads

2018-05-21 Thread Darrick J. Wong
On Fri, May 18, 2018 at 06:48:12PM +0200, Christoph Hellwig wrote: > For now just limited to blocksize == PAGE_SIZE, where we can simply read > in the full page in write begin, and just set the whole page dirty after > copying data into it. This code is enabled by default and XFS will now > be fee

[RFC PATCH 0/3] blk-mq: Timeout rework

2018-05-21 Thread Keith Busch
The current blk-mq code potentially locks requests out of completion by the thousands, making drivers jump through hoops to handle them. This patch set allows drivers to complete their requests whenever they're completed without requiring drivers know anything about the timeout code with minimal sy

[RFC PATCH 2/3] blk-mq: Fix timeout and state order

2018-05-21 Thread Keith Busch
The block layer had been setting the state to in-flight prior to updating the timer. This is the wrong order since the timeout handler could observe the in-flight state with the older timeout, believing the request had expired when in fact it is just getting started. Signed-off-by: Keith Busch --

[RFC PATCH 3/3] blk-mq: Remove generation seqeunce

2018-05-21 Thread Keith Busch
This patch simplifies the timeout handling by relying on the request reference counting to ensure the iterator is operating on an inflight and truly timed out request. Since the reference counting prevents the tag from being reallocated, the block layer no longer needs to prevent drivers from compl

[RFC PATCH 1/3] blk-mq: Reference count request usage

2018-05-21 Thread Keith Busch
This patch adds a struct kref to struct request so that request users can be sure they're operating on the same request without it changing while they're processing it. The request's tag won't be released for reuse until the last user is done with it. Signed-off-by: Keith Busch --- block/blk-mq.

Re: INFO: task hung in blk_queue_enter

2018-05-21 Thread Tetsuo Handa
Bart Van Assche wrote: > On Wed, 2018-05-16 at 17:16 +0200, Dmitry Vyukov wrote: > > On Wed, May 16, 2018 at 4:56 PM, Bart Van Assche > > wrote: > > > On Wed, 2018-05-16 at 22:05 +0900, Tetsuo Handa wrote: > > > > diff --git a/block/blk-core.c b/block/blk-core.c > > > > index 85909b4..59e2496 100

Re: [PATCH v5 4/5] fs: blkdev set bio prio from kiocb prio

2018-05-21 Thread Adam Manzanares
On 5/21/18 2:04 PM, Jeff Moyer wrote: > adam.manzana...@wdc.com writes: > >> From: Adam Manzanares >> >> Now that kiocb has an ioprio field copy this over to the bio when it is >> created from the kiocb. >> >> Signed-off-by: Adam Manzanares >> --- >> fs/block_dev.c | 1 + >> 1 file changed,

Re: [PATCH v5 0/5] AIO add per-command iopriority

2018-05-21 Thread Adam Manzanares
On 5/21/18 1:57 PM, Jeff Moyer wrote: > Hi, Adam, > > adam.manzana...@wdc.com writes: > >> From: Adam Manzanares >> >> This is the per-I/O equivalent of the ioprio_set system call. >> See the following link for performance implications on a SATA HDD: >> https://lkml.org/lkml/2016/12/6/495 >> >

Re: [PATCH v5 4/5] fs: blkdev set bio prio from kiocb prio

2018-05-21 Thread Jeff Moyer
adam.manzana...@wdc.com writes: > From: Adam Manzanares > > Now that kiocb has an ioprio field copy this over to the bio when it is > created from the kiocb. > > Signed-off-by: Adam Manzanares > --- > fs/block_dev.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fs/block_dev.c b/fs/bl

Re: [PATCH v5 1/5] block: add ioprio_check_cap function

2018-05-21 Thread Jeff Moyer
adam.manzana...@wdc.com writes: > From: Adam Manzanares > > Aio per command iopriority support introduces a second interface between > userland and the kernel capable of passing iopriority. The aio interface also > needs the ability to verify that the submitting context has sufficient > priviledg

Re: [PATCH v5 5/5] fs: iomap dio set bio prio from kiocb prio

2018-05-21 Thread Jeff Moyer
adam.manzana...@wdc.com writes: > From: Adam Manzanares > > Now that kiocb has an ioprio field copy this over to the bio when it is > created from the kiocb during direct IO. > > Signed-off-by: Adam Manzanares Reviewed-by: Jeff Moyer > --- > fs/iomap.c | 1 + > 1 file changed, 1 insertion(+

Re: [PATCH v5 4/5] fs: blkdev set bio prio from kiocb prio

2018-05-21 Thread Jeff Moyer
adam.manzana...@wdc.com writes: > From: Adam Manzanares > > Now that kiocb has an ioprio field copy this over to the bio when it is > created from the kiocb. > > Signed-off-by: Adam Manzanares Reviewed-by: Jeff Moyer > --- > fs/block_dev.c | 1 + > 1 file changed, 1 insertion(+) > > diff --

Re: [PATCH v5 3/5] fs: Add aio iopriority support

2018-05-21 Thread Jeff Moyer
adam.manzana...@wdc.com writes: > From: Adam Manzanares > > This is the per-I/O equivalent of the ioprio_set system call. > > When IOCB_FLAG_IOPRIO is set on the iocb aio_flags field, then we set the > newly added kiocb ki_ioprio field to the value in the iocb aio_reqprio field. > > We set the bl

Re: [PATCH v5 0/5] AIO add per-command iopriority

2018-05-21 Thread Jeff Moyer
Hi, Adam, adam.manzana...@wdc.com writes: > From: Adam Manzanares > > This is the per-I/O equivalent of the ioprio_set system call. > See the following link for performance implications on a SATA HDD: > https://lkml.org/lkml/2016/12/6/495 > > First patch factors ioprio_check_cap function out of

Re: buffered I/O without buffer heads in xfs and iomap v2

2018-05-21 Thread Darrick J. Wong
On Fri, May 18, 2018 at 06:47:56PM +0200, Christoph Hellwig wrote: > Hi all, > > this series adds support for buffered I/O without buffer heads to > the iomap and XFS code. > > For now this series only contains support for block size == PAGE_SIZE, > with the 4k support split into a separate serie

Re: [PATCH 05/34] fs: use ->is_partially_uptodate in page_cache_seek_hole_data

2018-05-21 Thread Darrick J. Wong
On Fri, May 18, 2018 at 06:48:01PM +0200, Christoph Hellwig wrote: > This way the implementation doesn't depend on buffer_head internals. > > Signed-off-by: Christoph Hellwig > --- > fs/iomap.c | 83 +++--- > 1 file changed, 42 insertions(+), 41 de

Re: [PATCH 00/10] Misc block layer patches for bcachefs

2018-05-21 Thread Bart Van Assche
On Mon, 2018-05-21 at 11:37 -0700, Omar Sandoval wrote: > Have you made any progress in porting srp-test to blktests so we don't > have to have this conversation again? Hello Omar, Porting the srp-test software to the blktests framework is still high on my to-do list. I will start working on this

Re: [PATCH 11/12] xfs: convert to bioset_init()/mempool_init()

2018-05-21 Thread Darrick J. Wong
On Sun, May 20, 2018 at 06:25:57PM -0400, Kent Overstreet wrote: > Signed-off-by: Kent Overstreet Looks ok, I guess... Acked-by: Darrick J. Wong --D > --- > fs/xfs/xfs_aops.c | 2 +- > fs/xfs/xfs_aops.h | 2 +- > fs/xfs/xfs_super.c | 11 +-- > 3 files changed, 7 insertions(+), 8 d

Re: [PATCH 00/10] Misc block layer patches for bcachefs

2018-05-21 Thread Omar Sandoval
On Mon, May 21, 2018 at 03:11:08PM +, Bart Van Assche wrote: > On Sun, 2018-05-20 at 19:58 -0400, Kent Overstreet wrote: > > On Sun, May 20, 2018 at 11:40:45PM +, Bart Van Assche wrote: > > > On Sun, 2018-05-20 at 19:21 -0400, Kent Overstreet wrote: > > > > I really have better things to do

Re: [PATCH RESEND] loop: clear wb_err in bd_inode when detaching backing file

2018-05-21 Thread Jens Axboe
On 5/21/18 12:35 PM, Jeff Layton wrote: > From: Jeff Layton > > When a loop block device encounters a writeback error, that error will > get propagated to the bd_inode's wb_err field. If we then detach the > backing file from it, attach another and fsync it, we'll get back the > writeback error t

[PATCH RESEND] loop: clear wb_err in bd_inode when detaching backing file

2018-05-21 Thread Jeff Layton
From: Jeff Layton When a loop block device encounters a writeback error, that error will get propagated to the bd_inode's wb_err field. If we then detach the backing file from it, attach another and fsync it, we'll get back the writeback error that we had from the previous backing file. This is

Re: [PATCH] loop: clear wb_err in bd_inode when detaching backing file

2018-05-21 Thread Jens Axboe
On 5/21/18 12:26 PM, Jeff Layton wrote: > On Mon, 2018-05-21 at 08:37 -0400, Jeff Layton wrote: >> From: Jeff Layton >> >> When a loop block device encounters a writeback error, that error will >> get propagated to the bd_inode's wb_err field. If we then detach the >> backing file from it, attach

Re: [PATCH blktests] Documentation: document prerequisite scriptlets

2018-05-21 Thread Omar Sandoval
On Mon, May 14, 2018 at 01:40:42PM +0200, Johannes Thumshirn wrote: > The config file is bash and it gets sourced, so all bash magic is > doable in there as well. Document it so others don't have to > re-discover this gem as well. I'm supportive of this... > Signed-off-by: Johannes Thumshirn > -

Re: [PATCH] loop: clear wb_err in bd_inode when detaching backing file

2018-05-21 Thread Jeff Layton
On Mon, 2018-05-21 at 08:37 -0400, Jeff Layton wrote: > From: Jeff Layton > > When a loop block device encounters a writeback error, that error will > get propagated to the bd_inode's wb_err field. If we then detach the > backing file from it, attach another and fsync it, we'll get back the > wri

Re: [PATCH 00/13] convert block layer to bioset_init()/mempool_init()

2018-05-21 Thread Mike Snitzer
On Mon, May 21 2018 at 1:37pm -0400, Kent Overstreet wrote: > > Uh, you came across as upset and paranoid to me too. Chalk it up to email? :) Awesome. See how easy it is to make someone with purely constructive questions and feedback come off as upset and paranoid? The tipping point occurs w

[PATCH] block: Verify whether blk_queue_enter() is used when necessary

2018-05-21 Thread Bart Van Assche
It is required to protect blkg_lookup() calls with a blk_queue_enter() / blk_queue_exit() pair. Since it is nontrivial to verify whether this is the case, verify this at runtime. Only perform this verification if CONFIG_LOCKDEP=y to avoid that unnecessary runtime overhead is added. Note: using loc

Re: [PATCH 00/13] convert block layer to bioset_init()/mempool_init()

2018-05-21 Thread Kent Overstreet
On Mon, May 21, 2018 at 12:09:14PM -0400, Mike Snitzer wrote: > On Mon, May 21 2018 at 11:36am -0400, > Jens Axboe wrote: > > > On 5/21/18 9:18 AM, Mike Snitzer wrote: > > > On Mon, May 21 2018 at 11:09am -0400, > > > Jens Axboe wrote: > > > > > >> On 5/21/18 9:04 AM, Mike Snitzer wrote: > > >>

[PATCH v12 2/2] blk-mq: Rework blk-mq timeout handling again

2018-05-21 Thread Bart Van Assche
Recently the blk-mq timeout handling code was reworked. See also Tejun Heo, "[PATCHSET v4] blk-mq: reimplement timeout handling", 08 Jan 2018 (https://www.mail-archive.com/linux-block@vger.kernel.org/msg16985.html). This patch reworks the blk-mq timeout handling code again. The timeout handling cod

[PATCH v12 1/2] ARM: cmpxchg64: Only define cmpxchg64() if not using the Thumb instruction set

2018-05-21 Thread Bart Van Assche
Since the implementation of cmpxchg64() uses instructions that are not Thumb instructions, only define cmpxchg64() if not building in Thumb mode. This patch allows the next patch in this series to check for cmpxchg64() support using #if defined(cmpxchg64). Signed-off-by: Bart Van Assche Cc: Catal

[PATCH v12 0/2] blk-mq: Rework blk-mq timeout handling again

2018-05-21 Thread Bart Van Assche
Hello Jens, This patch series reworks blk-mq timeout handling by introducing a state machine per request. Please consider this patch series for inclusion in the upstream kernel. Bart. Changes compared to v11: - Reworked patch 1/2: instead of introducing CONFIG_ARCH_HAVE_CMPXCHG64, make sure th

Re: [PATCH 1/6] nvme: Sync request queues on reset

2018-05-21 Thread Keith Busch
On Tue, May 22, 2018 at 12:08:37AM +0800, Ming Lei wrote: > Please take a look at blk_mq_complete_request(). Even with Bart's > change, the request still won't be completed by driver. The request can > only be completed by either driver or blk-mq, not both. So you're saying blk-mq can't complete a

Re: [PATCH 3/6] nvme: Move all IO out of controller reset

2018-05-21 Thread Keith Busch
On Tue, May 22, 2018 at 12:04:53AM +0800, Ming Lei wrote: > On Mon, May 21, 2018 at 09:44:33AM -0600, Keith Busch wrote: > > On Mon, May 21, 2018 at 11:34:27PM +0800, Ming Lei wrote: > > > nvme_dev_disable() quiesces queues first before killing queues. > > > > > > If queues are quiesced during or

Re: [PATCH 00/13] convert block layer to bioset_init()/mempool_init()

2018-05-21 Thread Jens Axboe
On 5/21/18 10:09 AM, Mike Snitzer wrote: > On Mon, May 21 2018 at 11:36am -0400, > Jens Axboe wrote: > >> On 5/21/18 9:18 AM, Mike Snitzer wrote: >>> On Mon, May 21 2018 at 11:09am -0400, >>> Jens Axboe wrote: >>> On 5/21/18 9:04 AM, Mike Snitzer wrote: > On Mon, May 21 2018 at 10:52am

Re: [PATCH 00/13] convert block layer to bioset_init()/mempool_init()

2018-05-21 Thread Mike Snitzer
On Mon, May 21 2018 at 11:36am -0400, Jens Axboe wrote: > On 5/21/18 9:18 AM, Mike Snitzer wrote: > > On Mon, May 21 2018 at 11:09am -0400, > > Jens Axboe wrote: > > > >> On 5/21/18 9:04 AM, Mike Snitzer wrote: > >>> On Mon, May 21 2018 at 10:52am -0400, > >>> Jens Axboe wrote: > >>> ... > >>>

Re: [PATCH 1/6] nvme: Sync request queues on reset

2018-05-21 Thread Ming Lei
On Mon, May 21, 2018 at 09:59:09AM -0600, Keith Busch wrote: > On Mon, May 21, 2018 at 11:25:43PM +0800, Ming Lei wrote: > > On Mon, May 21, 2018 at 08:04:13AM -0600, Keith Busch wrote: > > > On Sat, May 19, 2018 at 08:01:42AM +0800, Ming Lei wrote: > > > > > You keep saying that, but the controlle

Re: [PATCH 3/6] nvme: Move all IO out of controller reset

2018-05-21 Thread Ming Lei
On Mon, May 21, 2018 at 09:44:33AM -0600, Keith Busch wrote: > On Mon, May 21, 2018 at 11:34:27PM +0800, Ming Lei wrote: > > nvme_dev_disable() quiesces queues first before killing queues. > > > > If queues are quiesced during or before nvme_wait_freeze() is run > > from the 2nd part of reset, the

[PATCH v5 4/5] fs: blkdev set bio prio from kiocb prio

2018-05-21 Thread adam . manzanares
From: Adam Manzanares Now that kiocb has an ioprio field copy this over to the bio when it is created from the kiocb. Signed-off-by: Adam Manzanares --- fs/block_dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/block_dev.c b/fs/block_dev.c index 7ec920e27065..da1e94d2bb75 100644 --

[PATCH v5 3/5] fs: Add aio iopriority support

2018-05-21 Thread adam . manzanares
From: Adam Manzanares This is the per-I/O equivalent of the ioprio_set system call. When IOCB_FLAG_IOPRIO is set on the iocb aio_flags field, then we set the newly added kiocb ki_ioprio field to the value in the iocb aio_reqprio field. We set the blkdev bio iopriority unconditionally, so we nee

[PATCH v5 5/5] fs: iomap dio set bio prio from kiocb prio

2018-05-21 Thread adam . manzanares
From: Adam Manzanares Now that kiocb has an ioprio field copy this over to the bio when it is created from the kiocb during direct IO. Signed-off-by: Adam Manzanares --- fs/iomap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/iomap.c b/fs/iomap.c index afd163586aa0..65aae194aeca 1006

[PATCH v5 1/5] block: add ioprio_check_cap function

2018-05-21 Thread adam . manzanares
From: Adam Manzanares Aio per command iopriority support introduces a second interface between userland and the kernel capable of passing iopriority. The aio interface also needs the ability to verify that the submitting context has sufficient priviledges to submit IOPRIO_RT commands. This patch

[PATCH v5 2/5] fs: Convert kiocb rw_hint from enum to u16

2018-05-21 Thread adam . manzanares
From: Adam Manzanares In order to avoid kiocb bloat for per command iopriority support, rw_hint is converted from enum to a u16. Added a guard around ki_hint assigment. Signed-off-by: Adam Manzanares --- include/linux/fs.h | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) d

[PATCH v5 0/5] AIO add per-command iopriority

2018-05-21 Thread adam . manzanares
From: Adam Manzanares This is the per-I/O equivalent of the ioprio_set system call. See the following link for performance implications on a SATA HDD: https://lkml.org/lkml/2016/12/6/495 First patch factors ioprio_check_cap function out of ioprio_set system call to also be used by the aio ioprio

Re: [PATCH 1/6] nvme: Sync request queues on reset

2018-05-21 Thread Keith Busch
On Mon, May 21, 2018 at 11:25:43PM +0800, Ming Lei wrote: > On Mon, May 21, 2018 at 08:04:13AM -0600, Keith Busch wrote: > > On Sat, May 19, 2018 at 08:01:42AM +0800, Ming Lei wrote: > > > > You keep saying that, but the controller state is global to the > > > > controller. It doesn't matter which

Re: [PATCH 3/6] nvme: Move all IO out of controller reset

2018-05-21 Thread Keith Busch
On Mon, May 21, 2018 at 11:34:27PM +0800, Ming Lei wrote: > nvme_dev_disable() quiesces queues first before killing queues. > > If queues are quiesced during or before nvme_wait_freeze() is run > from the 2nd part of reset, the 2nd part can't move on, and IO hang > is caused. Finally no reset can

Re: [PATCH 00/13] convert block layer to bioset_init()/mempool_init()

2018-05-21 Thread Jens Axboe
On 5/21/18 9:18 AM, Mike Snitzer wrote: > On Mon, May 21 2018 at 11:09am -0400, > Jens Axboe wrote: > >> On 5/21/18 9:04 AM, Mike Snitzer wrote: >>> On Mon, May 21 2018 at 10:52am -0400, >>> Jens Axboe wrote: >>> On 5/21/18 8:47 AM, Mike Snitzer wrote: > On Mon, May 21 2018 at 10:36am -

Re: [PATCH v11 1/2] arch/*: Add CONFIG_ARCH_HAVE_CMPXCHG64

2018-05-21 Thread Bart Van Assche
On Fri, 2018-05-18 at 11:32 -0700, h...@zytor.com wrote: > On May 18, 2018 11:00:05 AM PDT, Bart Van Assche > wrote: > > The next patch in this series introduces a call to cmpxchg64() > > in the block layer core for those architectures on which this > > functionality is available. Make it possibl

Re: [PATCH 3/6] nvme: Move all IO out of controller reset

2018-05-21 Thread Ming Lei
On Mon, May 21, 2018 at 09:03:31AM -0600, Keith Busch wrote: > On Mon, May 21, 2018 at 10:58:51PM +0800, Ming Lei wrote: > > On Mon, May 21, 2018 at 08:22:19AM -0600, Keith Busch wrote: > > > On Sat, May 19, 2018 at 07:03:58AM +0800, Ming Lei wrote: > > > > On Fri, May 18, 2018 at 10:38:20AM -0600,

Re: [PATCH v2 01/26] rculist: introduce list_next_or_null_rr_rcu()

2018-05-21 Thread Paul E. McKenney
On Mon, May 21, 2018 at 08:16:59AM -0700, Linus Torvalds wrote: > On Mon, May 21, 2018 at 6:51 AM Roman Penyaev < > roman.peny...@profitbricks.com> wrote: > > > No, I continue from the pointer, which I assigned on the previous IO > > in order to send IO fairly and keep load balanced. > > Right. A

Re: [PATCH v2 01/26] rculist: introduce list_next_or_null_rr_rcu()

2018-05-21 Thread Paul E. McKenney
On Mon, May 21, 2018 at 03:50:10PM +0200, Roman Penyaev wrote: > On Sun, May 20, 2018 at 2:43 AM, Paul E. McKenney > wrote: > > On Sat, May 19, 2018 at 10:20:48PM +0200, Roman Penyaev wrote: > >> On Sat, May 19, 2018 at 6:37 PM, Paul E. McKenney > >> wrote: > >> > On Fri, May 18, 2018 at 03:03:48

Re: [PATCH 1/6] nvme: Sync request queues on reset

2018-05-21 Thread Ming Lei
On Mon, May 21, 2018 at 08:04:13AM -0600, Keith Busch wrote: > On Sat, May 19, 2018 at 08:01:42AM +0800, Ming Lei wrote: > > > You keep saying that, but the controller state is global to the > > > controller. It doesn't matter which namespace request_queue started the > > > reset: every namespaces

Re: [PATCH 00/13] convert block layer to bioset_init()/mempool_init()

2018-05-21 Thread Jens Axboe
On 5/21/18 9:12 AM, David Sterba wrote: > On Mon, May 21, 2018 at 08:19:58AM -0600, Jens Axboe wrote: >> On 5/21/18 8:03 AM, Mike Snitzer wrote: >>> On Sun, May 20 2018 at 6:25pm -0400, >>> Kent Overstreet wrote: >>> Jens - this series does the rest of the conversions that Christoph wanted,

Re: [PATCH 00/13] convert block layer to bioset_init()/mempool_init()

2018-05-21 Thread Mike Snitzer
On Mon, May 21 2018 at 11:09am -0400, Jens Axboe wrote: > On 5/21/18 9:04 AM, Mike Snitzer wrote: > > On Mon, May 21 2018 at 10:52am -0400, > > Jens Axboe wrote: > > > >> On 5/21/18 8:47 AM, Mike Snitzer wrote: > >>> On Mon, May 21 2018 at 10:36am -0400, > >>> Jens Axboe wrote: > >>> > On

Re: [PATCH v2 01/26] rculist: introduce list_next_or_null_rr_rcu()

2018-05-21 Thread Linus Torvalds
On Mon, May 21, 2018 at 6:51 AM Roman Penyaev < roman.peny...@profitbricks.com> wrote: > No, I continue from the pointer, which I assigned on the previous IO > in order to send IO fairly and keep load balanced. Right. And that's exactly what has both me and Paul nervous. You're no longer in the R

Re: [PATCH 00/13] convert block layer to bioset_init()/mempool_init()

2018-05-21 Thread David Sterba
On Mon, May 21, 2018 at 08:19:58AM -0600, Jens Axboe wrote: > On 5/21/18 8:03 AM, Mike Snitzer wrote: > > On Sun, May 20 2018 at 6:25pm -0400, > > Kent Overstreet wrote: > > > >> Jens - this series does the rest of the conversions that Christoph wanted, > >> and > >> drops bioset_create(). > >>

Re: [PATCH 00/10] Misc block layer patches for bcachefs

2018-05-21 Thread Bart Van Assche
On Sun, 2018-05-20 at 19:58 -0400, Kent Overstreet wrote: > On Sun, May 20, 2018 at 11:40:45PM +, Bart Van Assche wrote: > > On Sun, 2018-05-20 at 19:21 -0400, Kent Overstreet wrote: > > > I really have better things to do than debug someone else's tests... > > > [ ... ] > > > ../run_tests: lin

Re: [PATCH 00/13] convert block layer to bioset_init()/mempool_init()

2018-05-21 Thread Jens Axboe
On 5/21/18 9:04 AM, Mike Snitzer wrote: > On Mon, May 21 2018 at 10:52am -0400, > Jens Axboe wrote: > >> On 5/21/18 8:47 AM, Mike Snitzer wrote: >>> On Mon, May 21 2018 at 10:36am -0400, >>> Jens Axboe wrote: >>> On 5/21/18 8:31 AM, Mike Snitzer wrote: > On Mon, May 21 2018 at 10:19am -

Re: [PATCH 00/13] convert block layer to bioset_init()/mempool_init()

2018-05-21 Thread Mike Snitzer
On Mon, May 21 2018 at 10:52am -0400, Jens Axboe wrote: > On 5/21/18 8:47 AM, Mike Snitzer wrote: > > On Mon, May 21 2018 at 10:36am -0400, > > Jens Axboe wrote: > > > >> On 5/21/18 8:31 AM, Mike Snitzer wrote: > >>> On Mon, May 21 2018 at 10:19am -0400, > >>> Jens Axboe wrote: > >>> > On

Re: [PATCH 3/6] nvme: Move all IO out of controller reset

2018-05-21 Thread Keith Busch
On Mon, May 21, 2018 at 10:58:51PM +0800, Ming Lei wrote: > On Mon, May 21, 2018 at 08:22:19AM -0600, Keith Busch wrote: > > On Sat, May 19, 2018 at 07:03:58AM +0800, Ming Lei wrote: > > > On Fri, May 18, 2018 at 10:38:20AM -0600, Keith Busch wrote: > > > > + > > > > + if (unfreeze) > > > > +

Re: [PATCH 3/6] nvme: Move all IO out of controller reset

2018-05-21 Thread Ming Lei
On Mon, May 21, 2018 at 08:22:19AM -0600, Keith Busch wrote: > On Sat, May 19, 2018 at 07:03:58AM +0800, Ming Lei wrote: > > On Fri, May 18, 2018 at 10:38:20AM -0600, Keith Busch wrote: > > > + > > > + if (unfreeze) > > > + nvme_wait_freeze(&dev->ctrl); > > > + > > > > timeout may comes ju

Re: [PATCH 00/13] convert block layer to bioset_init()/mempool_init()

2018-05-21 Thread Jens Axboe
On 5/21/18 8:47 AM, Mike Snitzer wrote: > On Mon, May 21 2018 at 10:36am -0400, > Jens Axboe wrote: > >> On 5/21/18 8:31 AM, Mike Snitzer wrote: >>> On Mon, May 21 2018 at 10:19am -0400, >>> Jens Axboe wrote: >>> On 5/21/18 8:03 AM, Mike Snitzer wrote: > On Sun, May 20 2018 at 6:25pm -

Re: [PATCH 00/13] convert block layer to bioset_init()/mempool_init()

2018-05-21 Thread Mike Snitzer
On Mon, May 21 2018 at 10:36am -0400, Jens Axboe wrote: > On 5/21/18 8:31 AM, Mike Snitzer wrote: > > On Mon, May 21 2018 at 10:19am -0400, > > Jens Axboe wrote: > > > >> On 5/21/18 8:03 AM, Mike Snitzer wrote: > >>> On Sun, May 20 2018 at 6:25pm -0400, > >>> Kent Overstreet wrote: > >>> > >>

Re: [PATCH] fs: clear writeback errors in inode_init_always

2018-05-21 Thread Theodore Y. Ts'o
On Mon, May 21, 2018 at 07:20:05AM -0400, Jeff Layton wrote: > > As a side note, it looks like __loop_update_dio will discard an error > from vfs_fsync, so certain ioctls against a loop device can cause errors > to be lost. It seems like those ought to get propagated to userland or > to the blockd

Re: [PATCH 00/13] convert block layer to bioset_init()/mempool_init()

2018-05-21 Thread Jens Axboe
On 5/21/18 8:31 AM, Mike Snitzer wrote: > On Mon, May 21 2018 at 10:19am -0400, > Jens Axboe wrote: > >> On 5/21/18 8:03 AM, Mike Snitzer wrote: >>> On Sun, May 20 2018 at 6:25pm -0400, >>> Kent Overstreet wrote: >>> Jens - this series does the rest of the conversions that Christoph wanted

Re: [PATCH 00/13] convert block layer to bioset_init()/mempool_init()

2018-05-21 Thread Mike Snitzer
On Mon, May 21 2018 at 10:19am -0400, Jens Axboe wrote: > On 5/21/18 8:03 AM, Mike Snitzer wrote: > > On Sun, May 20 2018 at 6:25pm -0400, > > Kent Overstreet wrote: > > > >> Jens - this series does the rest of the conversions that Christoph wanted, > >> and > >> drops bioset_create(). > >> >

Re: [PATCH 00/13] convert block layer to bioset_init()/mempool_init()

2018-05-21 Thread Jens Axboe
On 5/20/18 4:25 PM, Kent Overstreet wrote: > Jens - this series does the rest of the conversions that Christoph wanted, and > drops bioset_create(). > > Only lightly tested, but the changes are pretty mechanical. Based on your > for-next tree. Looks good to me. I'll let it simmer for a bit to giv

Re: [PATCH 3/6] nvme: Move all IO out of controller reset

2018-05-21 Thread Keith Busch
On Sat, May 19, 2018 at 07:03:58AM +0800, Ming Lei wrote: > On Fri, May 18, 2018 at 10:38:20AM -0600, Keith Busch wrote: > > + > > + if (unfreeze) > > + nvme_wait_freeze(&dev->ctrl); > > + > > timeout may comes just before&during blk_mq_update_nr_hw_queues() or > the above nvme_wait_fr

Re: [PATCH 00/13] convert block layer to bioset_init()/mempool_init()

2018-05-21 Thread Jens Axboe
On 5/21/18 8:03 AM, Mike Snitzer wrote: > On Sun, May 20 2018 at 6:25pm -0400, > Kent Overstreet wrote: > >> Jens - this series does the rest of the conversions that Christoph wanted, >> and >> drops bioset_create(). >> >> Only lightly tested, but the changes are pretty mechanical. Based on you

Re: [PATCH blktests] Fix block/011 to not use sysfs for device disabling

2018-05-21 Thread Keith Busch
On Mon, May 21, 2018 at 02:37:56AM -0400, Yi Zhang wrote: > Hi Keith > I tried this patch on my R730 Server, but it lead to system hang after > setpci, could you help check it, thanks. > > Console log: > storageqe-62 login: > Kernel 4.17.0-rc5 on an x86_64 > > storageqe-62 login: [ 1058.118258]

Re: [PATCH 00/13] convert block layer to bioset_init()/mempool_init()

2018-05-21 Thread Mike Snitzer
On Sun, May 20 2018 at 6:25pm -0400, Kent Overstreet wrote: > Jens - this series does the rest of the conversions that Christoph wanted, and > drops bioset_create(). > > Only lightly tested, but the changes are pretty mechanical. Based on your > for-next tree. By switching 'mempool_t *' to 'me

Re: [PATCH 1/6] nvme: Sync request queues on reset

2018-05-21 Thread Keith Busch
On Sat, May 19, 2018 at 08:01:42AM +0800, Ming Lei wrote: > > You keep saying that, but the controller state is global to the > > controller. It doesn't matter which namespace request_queue started the > > reset: every namespaces request queue sees the RESETTING controller state > > When timeouts

Re: [PATCH v2 01/26] rculist: introduce list_next_or_null_rr_rcu()

2018-05-21 Thread Roman Penyaev
On Sun, May 20, 2018 at 2:43 AM, Paul E. McKenney wrote: > On Sat, May 19, 2018 at 10:20:48PM +0200, Roman Penyaev wrote: >> On Sat, May 19, 2018 at 6:37 PM, Paul E. McKenney >> wrote: >> > On Fri, May 18, 2018 at 03:03:48PM +0200, Roman Pen wrote: >> >> Function is going to be used in transport

[PATCH] loop: clear wb_err in bd_inode when detaching backing file

2018-05-21 Thread Jeff Layton
From: Jeff Layton When a loop block device encounters a writeback error, that error will get propagated to the bd_inode's wb_err field. If we then detach the backing file from it, attach another and fsync it, we'll get back the writeback error that we had from the previous backing file. This is

Re: [PATCH] fs: clear writeback errors in inode_init_always

2018-05-21 Thread Jeff Layton
On Sun, 2018-05-20 at 15:41 -0400, Theodore Y. Ts'o wrote: > On Sun, May 20, 2018 at 12:20:09PM -0700, Matthew Wilcox wrote: > > Oh! I misunderstood. I thought that bd_inode->i_mapping pointed to > > lo_backing_file->f_mapping. > > > > So how about this to preserve the error _in the file with th

Re: [PATCH] bdi: Fix oops in wb_workfn()

2018-05-21 Thread Jan Kara
On Sat 19-05-18 23:27:09, Tetsuo Handa wrote: > Tetsuo Handa wrote: > > Jan Kara wrote: > > > Make wb_workfn() use wakeup_wb() for requeueing the work which takes all > > > the necessary precautions against racing with bdi unregistration. > > > > Yes, this patch will solve NULL pointer dereference