Re: [dm-devel] pd: remove bogus check for req->errors

2017-04-18 Thread Bart Van Assche
On Tue, 2017-04-18 at 08:52 -0700, Christoph Hellwig wrote: > The driver never sets req->errors Reviewed-by: Bart Van Assche -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] block: add a error_count field to struct request

2017-04-18 Thread Bart Van Assche
On Tue, 2017-04-18 at 08:52 -0700, Christoph Hellwig wrote: > From: 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

Re: [dm-devel] blk-mq: remove the error argument to blk_mq_complete_request

2017-04-18 Thread Bart Van Assche
On Tue, 2017-04-18 at 08:52 -0700, Christoph Hellwig wrote: > 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. Hello Christoph, Please add a runtime check that issues a warning early

Re: [dm-devel] scsi: introduce a new result field in struct scsi_request

2017-04-18 Thread Bart Van Assche
On Tue, 2017-04-18 at 08:52 -0700, Christoph Hellwig wrote: > --- a/block/bsg.c > +++ b/block/bsg.c > @@ -391,13 +391,13 @@ static int blk_complete_sgv4_hdr_rq(struct request *rq, > struct sg_io_v4 *hdr, > struct scsi_request *req = scsi_req(rq); > int ret = 0; > > - dprintk("rq

Re: [dm-devel] block: remove the blk_execute_rq return value

2017-04-18 Thread Bart Van Assche
On Tue, 2017-04-18 at 08:52 -0700, Christoph Hellwig wrote: > diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c > index b05e151c9b38..82c6d02193ae 100644 > --- a/drivers/block/paride/pd.c > +++ b/drivers/block/paride/pd.c > @@ -747,7 +747,8 @@ static int pd_special_command(struct

Re: [dm-devel] [PATCH] device-mapper: Convert printks to pr_ macros

2017-04-18 Thread Joe Perches
op us a note to > help improve the system] > > url: > https://github.com/0day-ci/linux/commits/Joe-Perches/device-mapper-Convert-printks-to-pr_-level-macros/20170418-030508 > config: i386-allmodconfig (attached as .config) > compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901

Re: [dm-devel] [PATCH v6 0/3] dm: boot a mapped device without an initramfs

2017-04-18 Thread Kees Cook
On Tue, Apr 18, 2017 at 9:42 AM, Enric Balletbo i Serra wrote: > Hello, > > Some of these patches were send few years back, I saw that first > version was send to this list in 2010, and after version 4 did not > land [1]. Some days ago I resend the patches [2] and

[dm-devel] [PATCH v6 3/3] init: add support to directly boot to a mapped device

2017-04-18 Thread Enric Balletbo i Serra
From: Will Drewry Add a dm= kernel parameter modeled after the md= parameter from do_mounts_md. It allows for device-mapper targets to be configured at boot time for use early in the boot process (as the root device or otherwise). Signed-off-by: Will Drewry

[dm-devel] [PATCH v6 0/3] dm: boot a mapped device without an initramfs

2017-04-18 Thread Enric Balletbo i Serra
Hello, Some of these patches were send few years back, I saw that first version was send to this list in 2010, and after version 4 did not land [1]. Some days ago I resend the patches [2] and few hours later I noticed that one year ago was send a v5 version [3] and I was not aware. There was

[dm-devel] [PATCH v6 2/3] dm: export a table+mapped device to the ioctl interface

2017-04-18 Thread Enric Balletbo i Serra
From: Will Drewry One function is added which allows for a programmatically created mapped device to be inserted into the dm-ioctl hash table. This binds the device to a name and, optional, uuid which is needed by udev and allows for userspace management of the mapped device.

[dm-devel] [PATCH v6 1/3] dm: make some mapped_device functions available

2017-04-18 Thread Enric Balletbo i Serra
From: Brian Norris For init to build a mapped_device, it must hold the appropriate locks, able to use dm_table_destroy() and the functions to get/set the md type, so move these to the common header. Signed-off-by: Brian Norris Signed-off-by:

[dm-devel] loop: zero-fill bio on the submitting cpu

2017-04-18 Thread Christoph Hellwig
From: 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 Reviewed-by: Ming Lei ---

[dm-devel] null_blk: don't pass always-0 req->errors to blk_mq_complete_request

2017-04-18 Thread Christoph Hellwig
From: 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 ---

[dm-devel] nvme-fc: fix status code handling in nvme_fc_fcpio_done

2017-04-18 Thread Christoph Hellwig
From: 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

[dm-devel] block: remove the errors field from struct request

2017-04-18 Thread Christoph Hellwig
From: Christoph Hellwig Signed-off-by: Christoph Hellwig Acked-by: Roger Pau Monné Reviewed-by: Konrad Rzeszutek Wilk --- block/blk-core.c | 14 +- block/blk-exec.c | 3 +--

[dm-devel] ataflop: switch from req->errors to req->error_count

2017-04-18 Thread Christoph Hellwig
From: 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 ---

[dm-devel] mtip32xx: add a status field to struct mtip_cmd

2017-04-18 Thread Christoph Hellwig
From: 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

[dm-devel] blktrace: remove the unused block_rq_abort tracepoint

2017-04-18 Thread Christoph Hellwig
From: 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

[dm-devel] nvme: split nvme status from block req->errors

2017-04-18 Thread Christoph Hellwig
From: 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)

[dm-devel] virtio_blk: don't use req->errors

2017-04-18 Thread Christoph Hellwig
From: Christoph Hellwig Remove passing req->errors (which at that point is always 0) to blk_mq_complete_request, and rely on the virtio status code for the serial number passthrough request. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn

[dm-devel] scsi: introduce a new result field in struct scsi_request

2017-04-18 Thread Christoph Hellwig
From: 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

[dm-devel] virtio: fix spelling of virtblk_scsi_request_done

2017-04-18 Thread Christoph Hellwig
From: Christoph Hellwig Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche --- drivers/block/virtio_blk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[dm-devel] xen-blkfront: don't use req->errors

2017-04-18 Thread Christoph Hellwig
From: 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

[dm-devel] dm rq: don't pass irrelevant error code to blk_mq_complete_request

2017-04-18 Thread Christoph Hellwig
From: 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

[dm-devel] dm mpath: don't check for req->errors

2017-04-18 Thread Christoph Hellwig
From: 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

[dm-devel] pd: remove bogus check for req->errors

2017-04-18 Thread Christoph Hellwig
From: 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 ---

[dm-devel] nbd: don't use req->errors

2017-04-18 Thread Christoph Hellwig
From: Christoph Hellwig Add a nbd-specific field instead. Signed-off-by: Christoph Hellwig Reviewed-by: Josef Bacik --- drivers/block/nbd.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git

[dm-devel] blk-mq: remove the error argument to blk_mq_complete_request

2017-04-18 Thread Christoph Hellwig
From: 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| 15

[dm-devel] swim3: remove (commented out) printing of req->errors

2017-04-18 Thread Christoph Hellwig
From: 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

[dm-devel] kill req->errors V2

2017-04-18 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

[dm-devel] block: remove the blk_execute_rq return value

2017-04-18 Thread Christoph Hellwig
From: 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

Re: [dm-devel] [PATCH] dm thin: fix a memory leak when passing discard bio down

2017-04-18 Thread Zdenek Kabelac
Dne 18.4.2017 v 09:27 Dennis Yang napsal(a): dm-thin does not free the discard_parent bio after all chained sub bios finished. The following kmemleak report could be observed after pool with discard_passdown option processes discard bios in linux v4.11-rc7. To fix this, we drop the

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

2017-04-18 Thread h...@lst.de
On Mon, Apr 17, 2017 at 10:01:09AM -0600, Jens Axboe wrote: > Are you respinning this series for 4.12? Yes, I think I got enough feedback by now to resend it. I'll try to get it out today. -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

[dm-devel] [PATCH] dm thin: fix a memory leak when passing discard bio down

2017-04-18 Thread Dennis Yang
dm-thin does not free the discard_parent bio after all chained sub bios finished. The following kmemleak report could be observed after pool with discard_passdown option processes discard bios in linux v4.11-rc7. To fix this, we drop the discard_parent bio reference when its endio (passdown_endio)

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

2017-04-18 Thread Ming Lei
On Thu, Apr 06, 2017 at 05:39:29PM +0200, Christoph Hellwig wrote: > 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

Re: [dm-devel] [PATCH v4 6/6] dm rq: Avoid that request processing stalls sporadically

2017-04-18 Thread Ming Lei
On Fri, Apr 14, 2017 at 05:12:50PM +, Bart Van Assche wrote: > On Fri, 2017-04-14 at 09:13 +0800, Ming Lei wrote: > > On Thu, Apr 13, 2017 at 09:59:57AM -0700, Bart Van Assche wrote: > > > On 04/12/17 19:20, Ming Lei wrote: > > > > On Wed, Apr 12, 2017 at 06:38:07PM +, Bart Van Assche

Re: [dm-devel] [PATCH v4 6/6] dm rq: Avoid that request processing stalls sporadically

2017-04-18 Thread Ming Lei
On Tue, Apr 11, 2017 at 06:18:36PM +, Bart Van Assche wrote: > On Tue, 2017-04-11 at 14:03 -0400, Mike Snitzer wrote: > > Rather than working so hard to use DM code against me, your argument > > should be: "blk-mq drivers X, Y and Z rerun the hw queue; this is a well > > established pattern" >

Re: [dm-devel] [RFC PATCH v5] IV Generation algorithms for dm-crypt

2017-04-18 Thread Binoy Jayan
Hi Milan, On 10 April 2017 at 19:30, Milan Broz wrote: Thank you for the reply. > Well, it is good that there is no performance degradation but it > would be nice to have some user of it that proves it is really > working for your hw. I have been able to get access to a

Re: [dm-devel] [PATCH 4/9] multipathd: don't call strlen on NULL variables

2017-04-18 Thread Martin Wilck
On Fri, 2017-04-07 at 01:16 -0500, Benjamin Marzinski wrote: > strlen has undefined results when passed a NULL variable, so don't do > it. > > Signed-off-by: Benjamin Marzinski > --- This is certainly correct. Yet I have two remarks:  1) There are many more calls to

Re: [dm-devel] [PATCH 09/22] dm-crypt: Make use of the new sg_map helper in 4 call sites

2017-04-18 Thread Logan Gunthorpe
Thanks for the information Milan. On 15/04/17 06:10 AM, Milan Broz wrote: > I think your patch is ok (if it is just plain conversion), if it is > really needed, we can switch to ahash later in follow-up patch. Sounds good to me. > p.s. > there is a lot of lists on cc, but for this patch is

Re: [dm-devel] [PATCH v4 6/6] dm rq: Avoid that request processing stalls sporadically

2017-04-18 Thread Ming Lei
On Wed, Apr 12, 2017 at 06:38:07PM +, Bart Van Assche wrote: > On Wed, 2017-04-12 at 11:42 +0800, Ming Lei wrote: > > On Tue, Apr 11, 2017 at 06:18:36PM +, Bart Van Assche wrote: > > > On Tue, 2017-04-11 at 14:03 -0400, Mike Snitzer wrote: > > > > Rather than working so hard to use DM code

Re: [dm-devel] [PATCH 2/8] target: remove iblock WRITE_SAME passthrough support

2017-04-18 Thread Nicholas A. Bellinger
On Mon, 2017-04-10 at 18:08 +0200, Christoph Hellwig wrote: > Use the pscsi driver to support arbitrary command passthrough > instead. > The people who are actively using iblock_execute_write_same_direct() are doing so in the context of ESX VAAI BlockZero, together with EXTENDED_COPY and

Re: [dm-devel] [PATCH 1/1] libmultipath/propsel: Do not select sysfs prioritizer for RDAC arrays

2017-04-18 Thread Schremmer, Steven
I know it just got merged, but Reviewed-by: Steve Schremmer > -Original Message- > From: dm-devel-boun...@redhat.com [mailto:dm-devel-boun...@redhat.com] On > Behalf Of Martin Wilck > Sent: Thursday, April 13, 2017 10:40 AM > To: Christophe Varoqui

Re: [dm-devel] [PATCH v4 6/6] dm rq: Avoid that request processing stalls sporadically

2017-04-18 Thread Ming Lei
On Thu, Apr 13, 2017 at 09:59:57AM -0700, Bart Van Assche wrote: > On 04/12/17 19:20, Ming Lei wrote: > > On Wed, Apr 12, 2017 at 06:38:07PM +, Bart Van Assche wrote: > >> If the blk-mq core would always rerun a hardware queue if a block driver > >> returns BLK_MQ_RQ_QUEUE_BUSY then that would