Re: [PATCH v3 1/8] blk-mq: use the right hctx when getting a driver tag fails

2017-04-06 Thread Ming Lei
Hi Jens, Thanks for your comment! On Thu, Apr 06, 2017 at 01:29:26PM -0600, Jens Axboe wrote: > On 04/06/2017 02:23 AM, Ming Lei wrote: > > On Thu, Apr 06, 2017 at 12:57:51AM -0700, Omar Sandoval wrote: > >> On Thu, Apr 06, 2017 at 12:31:18PM +0800, Ming Lei wrote: > >>> On Wed, Apr 05, 2017 at

[PATCH 2/2] block: trace completion of all bios.

2017-04-06 Thread NeilBrown
Currently only dm and md/raid5 bios trigger trace_block_bio_complete(). Now that we have bio_chain() and bio_inc_remaining(), it is not possible, in general, for a driver to know when the bio is really complete. Only bio_endio() knows that. So move the trace_block_bio_complete() call to

[PATCH 1/2] block: simple improvements for bio->flags

2017-04-06 Thread NeilBrown
The comment for the 'flags' field of 'bio' mentions "command" which is no longer stored there, and doesn't mention the bvec pool number, which is. BIO_RESET_BITS is set in such a way that it would need to be updated if new bits were added, which is easy to miss. BVEC_POOL_BITS is larger than

[PATCH 0/2] Trace completion of all bios

2017-04-06 Thread NeilBrown
Hi Jens, I think all objections to this patch have been answered so I'm resending. I've added a small cleanup patch first which makes some small enhancements to the documentation and #defines for the bio->flags field. Thanks, NeilBrown --- NeilBrown (2): block: simple improvements

[PATCH v3] loop: Add PF_LESS_THROTTLE to block/loop device thread.

2017-04-06 Thread NeilBrown
When a filesystem is mounted from a loop device, writes are throttled by balance_dirty_pages() twice: once when writing to the filesystem and once when the loop_handle_cmd() writes to the backing file. This double-throttling can trigger positive feedback loops that create significant delays.

Re: [PATCH 7/8] nowait aio: xfs

2017-04-06 Thread Darrick J. Wong
On Mon, Apr 03, 2017 at 11:52:11PM -0700, Christoph Hellwig wrote: > > + if (unaligned_io) { > > + /* If we are going to wait for other DIO to finish, bail */ > > + if ((iocb->ki_flags & IOCB_NOWAIT) && > > +atomic_read(>i_dio_count)) > > +

Re: [PATCH 14/25] nbd: don't use req->errors

2017-04-06 Thread Josef Bacik
> On Apr 6, 2017, at 11:39 AM, Christoph Hellwig wrote: > > Add a nbd-specific field instead. > > Signed-off-by: Christoph Hellwig This is fine with me, you can add, Reviewed-by: Josef Bacik Thanks, Josef

Re: [PATCH 00/12] nbd: Netlink interface and path failure enhancements

2017-04-06 Thread Josef Bacik
> On Apr 6, 2017, at 5:01 PM, Josef Bacik wrote: > > This patchset adds a new netlink configuration interface to NBD as well as a > bunch of enhancments around path failures. The patches provide the following > enhancemnts to NBD > > - Netlink configuration interface

[PATCH 11/12] nbd: add device refcounting

2017-04-06 Thread Josef Bacik
In order to support deleting the device on disconnect we need to refcount the actual nbd_device struct. So add the refcounting framework and change how we free the normal devices at rmmod time so we can catch reference leaks. Signed-off-by: Josef Bacik --- drivers/block/nbd.c |

[PATCH 12/12] nbd: add a flag to destroy an nbd device on disconnect

2017-04-06 Thread Josef Bacik
For ease of management it would be nice for users to specify that the device node for a nbd device is destroyed once it is disconnected and there are no more users. Add a client flag and enable this operation to happen. Signed-off-by: Josef Bacik --- drivers/block/nbd.c |

[PATCH 09/12] nbd: handle dead connections

2017-04-06 Thread Josef Bacik
Sometimes we like to upgrade our server without making all of our clients freak out and reconnect. This patch provides a way to specify a dead connection timeout to allow us to pause all requests and wait for new connections to be opened. With this in place I can take down the nbd server for

[PATCH 10/12] nbd: add a status netlink command

2017-04-06 Thread Josef Bacik
Allow users to query the status of existing nbd devices. Right now this only returns whether or not the device is connected, but could be extended in the future to include more information. Signed-off-by: Josef Bacik --- drivers/block/nbd.c | 108

[PATCH 00/12] nbd: Netlink interface and path failure enhancements

2017-04-06 Thread Josef Bacik
This patchset adds a new netlink configuration interface to NBD as well as a bunch of enhancments around path failures. The patches provide the following enhancemnts to NBD - Netlink configuration interface that doesn't leave a userspace application waiting in kernel space for the device to

[PATCH 05/12] nbd: add a basic netlink interface

2017-04-06 Thread Josef Bacik
The existing ioctl interface for configuring NBD devices is a bit cumbersome and hard to extend. The other problem is we leave a userspace app sitting in it's syscall until the device disconnects, which is less than ideal. This patch introduces a netlink interface for adding and disconnecting

[PATCH 04/12] nbd: stop using the bdev everywhere

2017-04-06 Thread Josef Bacik
In preparation for the upcoming netlink interface we need to not rely on already having the bdev for the NBD device we are doing operations on. Instead of passing the bdev around, just use it in places where we know we already have the bdev. Signed-off-by: Josef Bacik ---

[PATCH 03/12] nbd: separate out the config information

2017-04-06 Thread Josef Bacik
In order to properly refcount the various aspects of a NBD device we need to separate out the configuration elements of the nbd device. The configuration of a NBD device has a different lifetime from the actual device, so it doesn't make sense to bundle these two concepts. Add a config_refs to

[PATCH 07/12] nbd: multicast dead link notifications

2017-04-06 Thread Josef Bacik
Provide a mechanism to notify userspace that there's been a link problem on a NBD device. This will allow userspace to re-establish a connection and provide the new socket to the device without disrupting the device. Signed-off-by: Josef Bacik --- drivers/block/nbd.c

[PATCH 01/12] nbd: put socket in error cases

2017-04-06 Thread Josef Bacik
When adding a new socket we look it up and then try to add it to our configuration. If any of those steps fail we need to make sure we put the socket so we don't leak them. Signed-off-by: Josef Bacik --- drivers/block/nbd.c | 9 +++-- 1 file changed, 7 insertions(+), 2

[PATCH 08/12] nbd: only clear the queue on device teardown

2017-04-06 Thread Josef Bacik
When running a disconnect torture test I noticed that sometimes we would crash with a negative ref count on our queue. This was because we were ending the same request twice. Turns out we were racing with NBD_CLEAR_SOCK clearing the requests as well as the teardown of the device clearing the

[PATCH 02/12] nbd: handle single path failures gracefully

2017-04-06 Thread Josef Bacik
Currently if we have multiple connections and one of them goes down we will tear down the whole device. However there's no reason we need to do this as we could have other connections that are working fine. Deal with this by keeping track of the state of the different connections, and if we lose

Re: kill req->errors

2017-04-06 Thread Konrad Rzeszutek Wilk
On Thu, Apr 06, 2017 at 05:39:19PM +0200, Christoph Hellwig wrote: > Currently the request structure has an errors field that is used in > various different ways. The oldest drivers use it as an error count, > blk-mq and the generic timeout code assume that it holds a Linux > errno for block

Re: [PATCH V2 04/16] block, bfq: modify the peak-rate estimator

2017-04-06 Thread Paolo Valente
> Il giorno 04 apr 2017, alle ore 17:28, Bart Van Assche > ha scritto: > > On Tue, 2017-04-04 at 12:42 +0200, Paolo Valente wrote: >>> Il giorno 31 mar 2017, alle ore 17:31, Bart Van Assche >>> ha scritto: >>> >>> On Fri, 2017-03-31 at

Re: [PATCH v3 1/8] blk-mq: use the right hctx when getting a driver tag fails

2017-04-06 Thread Jens Axboe
On 04/06/2017 02:23 AM, Ming Lei wrote: > On Thu, Apr 06, 2017 at 12:57:51AM -0700, Omar Sandoval wrote: >> On Thu, Apr 06, 2017 at 12:31:18PM +0800, Ming Lei wrote: >>> On Wed, Apr 05, 2017 at 12:01:29PM -0700, Omar Sandoval wrote: From: Omar Sandoval While

Re: [PATCH v3 2/5] blk-mq: Restart a single queue if tag sets are shared

2017-04-06 Thread Jens Axboe
On 04/06/2017 12:10 PM, Bart Van Assche wrote: > + for (i = 0; i < queue->nr_hw_queues; i++) { > + j = (i + hctx->queue_num + 1) % queue->nr_hw_queues; > + h = queue->queue_hw_ctx[j]; > + if (h->tags == tags &&

Re: [PATCH 07/25] virtio_blk: don't use req->errors

2017-04-06 Thread Johannes Thumshirn
On Thu, Apr 06, 2017 at 05:39:26PM +0200, Christoph Hellwig wrote: > Remove passing req->errors (which at that point is always 0) to > blk_mq_complete_requestq, and rely on the virtio status code for the blk_mq_complete_request ^ > serial number passthrough request. > > Signed-off-by: Christoph

Re: [PATCH 06/25] virtio: fix spelling of virtblk_scsi_request_done

2017-04-06 Thread Johannes Thumshirn
On Thu, Apr 06, 2017 at 05:39:25PM +0200, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > --- Fair enough, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de

Re: [PATCH 03/25] nvme-fc: fix status code handling in nvme_fc_fcpio_done

2017-04-06 Thread Johannes Thumshirn
On Thu, Apr 06, 2017 at 05:39:22PM +0200, Christoph Hellwig wrote: > nvme_complete_async_event expects the little endian status code > including the phase bit, and a new completion handler I plan to > introduce will do so as well. > > Change the status variable into the little endian format with

Re: [PATCH 04/25] nvme: split nvme status from block req->errors

2017-04-06 Thread Johannes Thumshirn
On Thu, Apr 06, 2017 at 05:39:23PM +0200, Christoph Hellwig wrote: > We want our own clearly defined error field for NVMe passthrough commands, > and the request errors field is going away in its current form. > > Just store the status and result field in the nvme_request field from > hardirq

Re: [PATCH 02/25] block: remove the blk_execute_rq return value

2017-04-06 Thread Johannes Thumshirn
On Thu, Apr 06, 2017 at 05:39:21PM +0200, Christoph Hellwig wrote: > The function only returns -EIO if rq->errors is non-zero, which is not > very useful and lets a large number of callers ignore the return value. > > Just let the callers figure out their error themselves. > > Signed-off-by:

Re: [PATCH 0/6] RFC add blkdev tests v2

2017-04-06 Thread Christoph Hellwig
On Thu, Apr 06, 2017 at 12:19:46PM -0600, Jens Axboe wrote: > We share that goal. The block related tests will have _fewer_ dependencies. > And it'll also be Linux only, so we don't have to worry about cross platform. xfstests effectively has been Linux-only for many years. We've just been to

Re: [PATCH 0/6] RFC add blkdev tests v2

2017-04-06 Thread Jens Axboe
On 04/06/2017 12:15 PM, Johannes Thumshirn wrote: > On Thu, Apr 06, 2017 at 10:32:43AM -0500, Eric Sandeen wrote: >> Full-blown xfstests doesn't have /that/ much in the way of deps, >> on debian it's ostensibly just: >> >> sudo apt-get install xfslibs-dev uuid-dev libtool-bin \ >>

Re: [PATCH 0/6] RFC add blkdev tests v2

2017-04-06 Thread Johannes Thumshirn
On Thu, Apr 06, 2017 at 10:32:43AM -0500, Eric Sandeen wrote: > Full-blown xfstests doesn't have /that/ much in the way of deps, > on debian it's ostensibly just: > > sudo apt-get install xfslibs-dev uuid-dev libtool-bin \ > e2fsprogs automake gcc libuuid1 quota

[PATCH v3 2/5] blk-mq: Restart a single queue if tag sets are shared

2017-04-06 Thread Bart Van Assche
To improve scalability, if hardware queues are shared, restart a single hardware queue in round-robin fashion. Rename blk_mq_sched_restart_queues() to reflect the new semantics. Remove blk_mq_sched_mark_restart_queue() because this function has no callers. Remove flag QUEUE_FLAG_RESTART because

[PATCH v3 4/5] blk-mq: Introduce blk_mq_delay_run_hw_queue()

2017-04-06 Thread Bart Van Assche
Introduce a function that runs a hardware queue unconditionally after a delay. Note: there is already a function that stops and restarts a hardware queue after a delay, namely blk_mq_delay_queue(). Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc:

[PATCH v3 5/5] scsi: Avoid that SCSI queues get stuck

2017-04-06 Thread Bart Van Assche
commit 52d7f1b5c2f3 ("blk-mq: Avoid that requeueing starts stopped queues") removed the blk_mq_stop_hw_queue() call from scsi_queue_rq() for the BLK_MQ_RQ_QUEUE_BUSY case. Hence change all calls to functions that are intended to rerun a busy queue such that these examine all hardware queues

[PATCH v3 3/5] blk-mq: Clarify comments in blk_mq_dispatch_rq_list()

2017-04-06 Thread Bart Van Assche
The blk_mq_dispatch_rq_list() implementation got modified several times but the comments in that function were not updated every time. Since it is nontrivial what is going on, update the comments in blk_mq_dispatch_rq_list(). Signed-off-by: Bart Van Assche Cc: Omar

[PATCH v3 1/5] blk-mq: Make it safe to use RCU to iterate over blk_mq_tag_set.tag_list

2017-04-06 Thread Bart Van Assche
Since the next patch in this series will use RCU to iterate over tag_list, make this safe. Add lockdep_assert_held() statements in functions that iterate over tag_list to make clear that using list_for_each_entry() instead of list_for_each_entry_rcu() is fine in these functions. Signed-off-by:

[PATCH v3 0/5] Avoid that scsi-mq queue processing stalls

2017-04-06 Thread Bart Van Assche
Hello Jens, The five patches in this patch series fix the queue lockup I reported recently on the linux-block mailing list. Please consider these patches for inclusion in the upstream kernel. Thanks, Bart. Changes between v2 and v3: - Removed the blk_mq_ops.restart_hctx function pointer again.

Re: [RFC PATCH] loop: set queue logical block size

2017-04-06 Thread Omar Sandoval
On Thu, Apr 06, 2017 at 10:52:01AM +0200, Hannes Reinecke wrote: > On 04/06/2017 10:19 AM, Omar Sandoval wrote: > > From: Omar Sandoval > > > > The request queue created when we create a loop device has the default > > logical block size of 512. When we associate the device with

[PATCH 21/25] ataflop: switch from req->errors to req->error_count

2017-04-06 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/block/ataflop.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c index 2104b1b4ccda..fa69ecd52cb5 100644 --- a/drivers/block/ataflop.c +++

[PATCH 19/25] block: add a error_count field to struct request

2017-04-06 Thread Christoph Hellwig
This is for the legacy floppy and ataflop drivers that currently abuse ->errors for this purpose. It's stashed away in a union to not grow the struct size, the other fields are either used by modern drivers for different purposes or the I/O scheduler before queing the I/O to drivers.

[PATCH 25/25] block: remove the errors field from struct request

2017-04-06 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- block/blk-core.c | 14 +- block/blk-exec.c | 3 +-- block/blk-mq.c | 10 +++--- block/blk-timeout.c | 1 - include/linux/blkdev.h | 2 -- include/trace/events/block.h | 17

[PATCH 16/25] xen-blkfront: don't use req->errors

2017-04-06 Thread Christoph Hellwig
xen-blkfron is the last users using rq->errros for passing back error to blk-mq, and I'd like to get rid of that. In the longer run the driver should be moving more of the completion processing into .complete, but this is the minimal change to move forward for now. Signed-off-by: Christoph

[PATCH 24/25] blktrace: remove the unused block_rq_abort tracepoint

2017-04-06 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- include/trace/events/block.h | 44 ++-- kernel/trace/blktrace.c | 9 - 2 files changed, 10 insertions(+), 43 deletions(-) diff --git a/include/trace/events/block.h

[PATCH 20/25] floppy: switch from req->errors to req->error_count

2017-04-06 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/block/floppy.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index ce102ec47ef2..60d4c7653178 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@

[PATCH 23/25] pd: remove bogus check for req->errors

2017-04-06 Thread Christoph Hellwig
The driver never sets req->errors --- drivers/block/paride/pd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c index 82c6d02193ae..3b0ab214fe74 100644 --- a/drivers/block/paride/pd.c +++ b/drivers/block/paride/pd.c @@

[PATCH 17/25] blk-mq: remove the error argument to blk_mq_complete_request

2017-04-06 Thread Christoph Hellwig
Now that we always have a ->complete callback we can remove the direct call to blk_mq_end_request, as well as the error argument to blk_mq_complete_request. Signed-off-by: Christoph Hellwig --- block/blk-mq.c| 14 +++--- drivers/block/loop.c

[PATCH 22/25] swim3: remove (commented out) printing of req->errors

2017-04-06 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/block/swim3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c index 61b3ffa4f458..ba4809c9bdba 100644 --- a/drivers/block/swim3.c +++ b/drivers/block/swim3.c @@ -343,8

[PATCH 15/25] mtip32xx: add a status field to struct mtip_cmd

2017-04-06 Thread Christoph Hellwig
Instead of using req->errors, which will go away. Signed-off-by: Christoph Hellwig --- drivers/block/mtip32xx/mtip32xx.c | 16 +--- drivers/block/mtip32xx/mtip32xx.h | 1 + 2 files changed, 10 insertions(+), 7 deletions(-) diff --git

[PATCH 18/25] blk-mq: simplify __blk_mq_complete_request

2017-04-06 Thread Christoph Hellwig
Merge blk_mq_ipi_complete_request and blk_mq_stat_add into their only caller. Signed-off-by: Christoph Hellwig --- block/blk-mq.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index

[PATCH 09/25] scsi: introduce a new result field in struct scsi_request

2017-04-06 Thread Christoph Hellwig
This passes on the scsi_cmnd result field to users of passthrough requests. Currently we abuse req->errors for this purpose, but that field will go away in its current form. Note that the old IDE code abuses the errors field in very creative ways and stores all kinds of different values in it.

[PATCH 12/25] dm rq: don't pass irrelevant error code to blk_mq_complete_request

2017-04-06 Thread Christoph Hellwig
dm never uses rq->errors, so there is no need to pass an error argument to blk_mq_complete_request. Signed-off-by: Christoph Hellwig --- drivers/md/dm-rq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c index

[PATCH 13/25] dm mpath: don't check for req->errors

2017-04-06 Thread Christoph Hellwig
We'll get all proper errors reported through ->end_io and ->errors will go away soon. Signed-off-by: Christoph Hellwig --- drivers/md/dm-mpath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index

[PATCH 10/25] loop: zero-fill bio on the submitting cpu

2017-04-06 Thread Christoph Hellwig
In thruth I've just audited which blk-mq drivers don't currently have a complete callback, but I think this change is at least borderline useful. Signed-off-by: Christoph Hellwig --- drivers/block/loop.c | 30 ++ drivers/block/loop.h | 1 + 2 files

[PATCH 11/25] null_blk: don't pass always-0 req->errors to blk_mq_complete_request

2017-04-06 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/block/null_blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index f93906ff31e8..24ca85a70fd8 100644 --- a/drivers/block/null_blk.c +++ b/drivers/block/null_blk.c

[PATCH 07/25] virtio_blk: don't use req->errors

2017-04-06 Thread Christoph Hellwig
Remove passing req->errors (which at that point is always 0) to blk_mq_complete_requestq, and rely on the virtio status code for the serial number passthrough request. Signed-off-by: Christoph Hellwig --- drivers/block/virtio_blk.c | 10 +++--- 1 file changed, 3 insertions(+),

[PATCH 03/25] nvme-fc: fix status code handling in nvme_fc_fcpio_done

2017-04-06 Thread Christoph Hellwig
nvme_complete_async_event expects the little endian status code including the phase bit, and a new completion handler I plan to introduce will do so as well. Change the status variable into the little endian format with the phase bit used in the NVMe CQE to fix / enable this. Signed-off-by:

kill req->errors

2017-04-06 Thread Christoph Hellwig
Currently the request structure has an errors field that is used in various different ways. The oldest drivers use it as an error count, blk-mq and the generic timeout code assume that it holds a Linux errno for block completions, and various drivers use it for internal status values, often

[PATCH 06/25] virtio: fix spelling of virtblk_scsi_request_done

2017-04-06 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/block/virtio_blk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index eaf99022bdc6..dbc4e80680b1 100644 --- a/drivers/block/virtio_blk.c +++

[PATCH 05/25] nvme: make nvme_error_status private

2017-04-06 Thread Christoph Hellwig
Currently it's used by the lighnvm passthrough ioctl, but we'd like to make it private in preparation of block layer specific error code. Lighnvm already returns the real NVMe status anyway, so I think we can just limit it to returning -EIO for any status set. This will need a careful audit from

[PATCH 08/25] scsi: fix fast-fail for non-passthrough requests

2017-04-06 Thread Christoph Hellwig
Currently error is always 0 for non-passthrough requests when reaching the scsi_noretry_cmd check in scsi_io_completion, which effectively disables all fastfail logic. Fix this by having a single call to __scsi_error_from_host_byte at the beginning of the function and always having a valid error

[PATCH 02/25] block: remove the blk_execute_rq return value

2017-04-06 Thread Christoph Hellwig
The function only returns -EIO if rq->errors is non-zero, which is not very useful and lets a large number of callers ignore the return value. Just let the callers figure out their error themselves. Signed-off-by: Christoph Hellwig --- block/blk-exec.c | 8 +---

[PATCH 04/25] nvme: split nvme status from block req->errors

2017-04-06 Thread Christoph Hellwig
We want our own clearly defined error field for NVMe passthrough commands, and the request errors field is going away in its current form. Just store the status and result field in the nvme_request field from hardirq completion context (using a new helper) and then generate a Linux errno for the

[PATCH 01/25] remove the mg_disk driver

2017-04-06 Thread Christoph Hellwig
This drivers was added in 2008, but as far as a I can tell we never had a single platform that actually registered resources for the platform driver. It's also been unmaintained for a long time and apparently has a ATA mode that can be driven using the IDE/libata subsystem. Signed-off-by:

Re: [PATCH 0/6] RFC add blkdev tests v2

2017-04-06 Thread Eric Sandeen
On 4/6/17 10:20 AM, Johannes Thumshirn wrote: > On Thu, Apr 06, 2017 at 08:51:36AM -0600, Jens Axboe wrote: >> On 04/06/2017 08:47 AM, Christoph Hellwig wrote: >>> On Thu, Apr 06, 2017 at 08:33:55AM -0600, Jens Axboe wrote: That is exactly what my recommendation was at lsfmm as well - fork

Re: [PATCH 0/6] RFC add blkdev tests v2

2017-04-06 Thread Johannes Thumshirn
On Thu, Apr 06, 2017 at 08:51:36AM -0600, Jens Axboe wrote: > On 04/06/2017 08:47 AM, Christoph Hellwig wrote: > > On Thu, Apr 06, 2017 at 08:33:55AM -0600, Jens Axboe wrote: > >> That is exactly what my recommendation was at lsfmm as well - fork > >> xfstest, prune bits we don't need, and off we

Re: [RFC PATCH] loop: set queue logical block size

2017-04-06 Thread Ming Lei
On Thu, Apr 06, 2017 at 02:21:56PM +0200, Hannes Reinecke wrote: > On 04/06/2017 02:03 PM, Ming Lei wrote: > > On Thu, Apr 06, 2017 at 04:43:18PM +0800, Ming Lei wrote: > >> On Thu, Apr 06, 2017 at 01:19:45AM -0700, Omar Sandoval wrote: > >>> From: Omar Sandoval > >>> > >>> The

Re: [PATCH 0/6] RFC add blkdev tests v2

2017-04-06 Thread Jens Axboe
On 04/06/2017 08:47 AM, Christoph Hellwig wrote: > On Thu, Apr 06, 2017 at 08:33:55AM -0600, Jens Axboe wrote: >> That is exactly what my recommendation was at lsfmm as well - fork >> xfstest, prune bits we don't need, and off we go. I'll get around to >> it soonish. > > So you volunteer to do

Re: [PATCH 0/6] RFC add blkdev tests v2

2017-04-06 Thread Christoph Hellwig
On Thu, Apr 06, 2017 at 08:33:55AM -0600, Jens Axboe wrote: > That is exactly what my recommendation was at lsfmm as well - fork > xfstest, prune bits we don't need, and off we go. I'll get around to > it soonish. So you volunteer to do it? I was -><- this close to offering it myself, and than

Re: [PATCH 0/6] RFC add blkdev tests v2

2017-04-06 Thread Jens Axboe
On 04/06/2017 07:55 AM, Christoph Hellwig wrote: > I still disagree with using xfstests for this. Even if we were going > to treat the block devices nodes as yet another file system that's not > what the patches do - they create specific virtual devices to test > for each test. > > I think the

Re: [PATCH v2 4/6] mlx5: support ->get_vector_affinity

2017-04-06 Thread Leon Romanovsky
On Thu, Apr 06, 2017 at 01:36:36PM +0300, Sagi Grimberg wrote: > Simply refer to the generic affinity mask helper. > > Reviewed-by: Christoph Hellwig > Signed-off-by: Sagi Grimberg > --- Thanks, Acked-by: Leon Romanovsky signature.asc

Re: [PATCH v2 2/6] mlx5: move affinity hints assignments to generic code

2017-04-06 Thread Leon Romanovsky
On Thu, Apr 06, 2017 at 01:36:34PM +0300, Sagi Grimberg wrote: > generic api takes care of spreading affinity similar to > what mlx5 open coded (and even handles better asymmetric > configurations). Ask the generic API to spread affinity > for us, and feed him pre_vectors that do not participate >

Re: [PATCH v2 1/6] mlx5: convert to generic pci_alloc_irq_vectors

2017-04-06 Thread Leon Romanovsky
On Thu, Apr 06, 2017 at 01:36:33PM +0300, Sagi Grimberg wrote: > Now that we have a generic code to allocate an array > of irq vectors and even correctly spread their affinity, > correctly handle cpu hotplug events and more, were much > better off using it. > > Reviewed-by: Christoph Hellwig

Re: [PATCH 0/6] RFC add blkdev tests v2

2017-04-06 Thread Christoph Hellwig
I still disagree with using xfstests for this. Even if we were going to treat the block devices nodes as yet another file system that's not what the patches do - they create specific virtual devices to test for each test. I think the right way is to keep your patches as-is and copy the few bits

[PATCH 6/6] new: blockdev/005 Check that busy fs survives blkdev page truncation

2017-04-06 Thread Dmitry Monakhov
same as blockdev/004 but with add more stress on corrupted fs. Signed-off-by: Dmitry Monakhov --- tests/blockdev/005 | 92 ++ tests/blockdev/005.out | 2 ++ tests/blockdev/group | 1 + tests/generic/390 | 1 + 4

[PATCH 5/6] new: blockdev/004 Check that live fs survives blkdev page truncation

2017-04-06 Thread Dmitry Monakhov
Signed-off-by: Dmitry Monakhov --- tests/blockdev/004 | 81 ++ tests/blockdev/004.out | 2 ++ tests/blockdev/group | 1 + 3 files changed, 84 insertions(+) create mode 100755 tests/blockdev/004 create mode 100644

[PATCH 2/6] add: blockdev/001 check page-cache coherency after BLKDISCARD

2017-04-06 Thread Dmitry Monakhov
Regression test for fix https://lkml.org/lkml/2017/3/22/789 Page cache should be dropped after successful discard Signed-off-by: Dmitry Monakhov --- common/config | 1 + tests/blockdev/001 | 74 ++

[PATCH 0/6] RFC add blkdev tests v2

2017-04-06 Thread Dmitry Monakhov
During LSFMM we have discussed how to test lower-backend of linux IO-stack. Main idea was that xfstests is the most obvious solution which cover most use-cases filesystem do care about. There were reasonable objections that xfstests is not ideal place for that, especially when they mixed with pure

[PATCH 4/6] new: blockdev/003 basic blockdev T10-DIF-TYPE1 integrity checks

2017-04-06 Thread Dmitry Monakhov
Test create virtual block device via lio-targed infastructure and perform basic IO operations with data corruption detection. Temprorally mark is as dangerous, because currently it trigger BUG_ON inside blkdev_issue_flush BTW: I use 'dd' to test read from corrupted image instead of xfs_io

[PATCH 1/6] add lio-target helpers

2017-04-06 Thread Dmitry Monakhov
Linux-IO Target is very good framework for testing block backend. It is more flexible than scsi_debug. http://linux-iscsi.org/wiki/LIO Signed-off-by: Dmitry Monakhov --- common/config| 2 + common/liotarget | 111

Re: [RFC PATCH] loop: set queue logical block size

2017-04-06 Thread Hannes Reinecke
On 04/06/2017 02:03 PM, Ming Lei wrote: > On Thu, Apr 06, 2017 at 04:43:18PM +0800, Ming Lei wrote: >> On Thu, Apr 06, 2017 at 01:19:45AM -0700, Omar Sandoval wrote: >>> From: Omar Sandoval >>> >>> The request queue created when we create a loop device has the default >>> logical

Re: [RFC PATCH] loop: set queue logical block size

2017-04-06 Thread Ming Lei
On Thu, Apr 06, 2017 at 04:43:18PM +0800, Ming Lei wrote: > On Thu, Apr 06, 2017 at 01:19:45AM -0700, Omar Sandoval wrote: > > From: Omar Sandoval > > > > The request queue created when we create a loop device has the default > > logical block size of 512. When we associate the

Re: [PATCH] blk-mq-pci: Remove unneeded includes

2017-04-06 Thread Sagi Grimberg
Stephen added the first two includes after a linux-next build failure. Did this go through a long buildbot cycle to verify it's really not needed anymore? Umm no. I just compiled it and ran and it worked... If these are actually needed then we can safely discard this patch.

Re: [PATCH] blk-mq-pci: Remove unneeded includes

2017-04-06 Thread Christoph Hellwig
Stephen added the first two includes after a linux-next build failure. Did this go through a long buildbot cycle to verify it's really not needed anymore? On Thu, Apr 06, 2017 at 01:33:36PM +0300, Sagi Grimberg wrote: > Signed-off-by: Sagi Grimberg > --- > block/blk-mq-pci.c

Re: [PATCH 9/9] bio-integrity: Restore original iterator on verify stage

2017-04-06 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH 8/9] bio: add bvec_iter rewind API

2017-04-06 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig On Tue, Apr 04, 2017 at 10:56:40PM +0400, Dmitry Monakhov wrote: > Some ->bi_end_io handlers (for example: pi_verify or decrypt handlers) Just curious: are you planning to use it for the latter as well in future patches? If not can you

Re: [PATCH 7/9] Guard bvec iteration logic v3

2017-04-06 Thread Christoph Hellwig
> if (bio_no_advance_iter(bio)) > iter->bi_size -= bytes; > - else > - bvec_iter_advance(bio->bi_io_vec, iter, bytes); > + else { > + int err; > + err = bvec_iter_advance(bio->bi_io_vec, iter, bytes); > + if

Re: [PATCH 6/9] T10: Move opencoded contants to common header

2017-04-06 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH 5/9] bio-integrity: fold bio_integrity_enabled to bio_integrity_prep

2017-04-06 Thread Christoph Hellwig
> --- a/Documentation/block/data-integrity.txt > +++ b/Documentation/block/data-integrity.txt > @@ -202,9 +202,6 @@ will require extra work due to the application tag. >added. It is up to the caller to ensure that the bio does not >change while I/O is in progress. > > -

Re: [PATCH 4/9] bio-integrity: fix interface for bio_integrity_trim v2

2017-04-06 Thread Christoph Hellwig
Please drop the v2 from the subject line and move your changelog either into the cover letter (preferred) or at least below the --- line. Otherwise looks good: Reviewed-by: Christoph Hellwig

Re: [PATCH 3/9] bio-integrity: bio_integrity_advance must update integrity seed

2017-04-06 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [Nbd] [PATCH 3/4] treewide: convert PF_MEMALLOC manipulations to new helpers

2017-04-06 Thread Mel Gorman
On Thu, Apr 06, 2017 at 08:38:10AM +0200, Wouter Verhelst wrote: > On Wed, Apr 05, 2017 at 01:30:31PM +0200, Michal Hocko wrote: > > On Wed 05-04-17 09:46:59, Vlastimil Babka wrote: > > > We now have memalloc_noreclaim_{save,restore} helpers for robust setting > > > and > > > clearing of

[PATCH] remove the mg_disk driver

2017-04-06 Thread Christoph Hellwig
This drivers was added in 2008, but as far as a I can tell we never had a single platform that actually registered resources for the platform driver. It's also been unmaintained for a long time and apparently has a ATA mode that can be driven using the IDE/libata subsystem. Signed-off-by:

[PATCH v2 6/6] nvme-rdma: use intelligent affinity based queue mappings

2017-04-06 Thread Sagi Grimberg
Use the generic block layer affinity mapping helper. Also, limit nr_hw_queues to the rdma device number of irq vectors as we don't really need more. Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg --- drivers/nvme/host/rdma.c | 29

[PATCH v2 5/6] block: Add rdma affinity based queue mapping helper

2017-04-06 Thread Sagi Grimberg
Like pci and virtio, we add a rdma helper for affinity spreading. This achieves optimal mq affinity assignments according to the underlying rdma device affinity maps. Reviewed-by: Jens Axboe Reviewed-by: Christoph Hellwig Reviewed-by: Max Gurtovoy

[PATCH v2 0/6] Automatic affinity settings for nvme over rdma

2017-04-06 Thread Sagi Grimberg
This patch set is aiming to automatically find the optimal queue <-> irq multi-queue assignments in storage ULPs (demonstrated on nvme-rdma) based on the underlying rdma device irq affinity settings. Changes from v1: - Removed mlx5e_get_cpu as Christoph suggested - Fixed up nvme-rdma queue

[PATCH v2 1/6] mlx5: convert to generic pci_alloc_irq_vectors

2017-04-06 Thread Sagi Grimberg
Now that we have a generic code to allocate an array of irq vectors and even correctly spread their affinity, correctly handle cpu hotplug events and more, were much better off using it. Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg ---

[PATCH] blk-mq-pci: Remove unneeded includes

2017-04-06 Thread Sagi Grimberg
Signed-off-by: Sagi Grimberg --- block/blk-mq-pci.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/block/blk-mq-pci.c b/block/blk-mq-pci.c index 0c3354cf3552..70b8a6765cc7 100644 --- a/block/blk-mq-pci.c +++ b/block/blk-mq-pci.c @@ -10,12 +10,9 @@ * FITNESS FOR A

Re: [PATCH rfc 5/6] block: Add rdma affinity based queue mapping helper

2017-04-06 Thread Sagi Grimberg
shouldn't you include and like in commit 8ec2ef2b66ea2f that fixes blk-mq-pci.c ? Not really. We can lose these from blk-mq-pci.c as well. +#include +#include +#include +#include +#include "blk-mq.h" Is this include needed ? You're right, I can just keep: +#include +#include

Re: [RFC PATCH] loop: set queue logical block size

2017-04-06 Thread Ming Lei
On Thu, Apr 06, 2017 at 01:19:45AM -0700, Omar Sandoval wrote: > From: Omar Sandoval > > The request queue created when we create a loop device has the default > logical block size of 512. When we associate the device with an fd, we > set the block size on the block_device but

  1   2   >