Re: [dm-devel] [PATCH v3] axon_ram: add dax_operations support

2017-04-19 Thread kbuild test robot
Hi Dan, [auto build test WARNING on powerpc/next] [also build test WARNING on v4.11-rc7 next-20170419] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Dan-Williams/axon_ram-add-dax_operations

Re: [dm-devel] [PATCH 08/23] scsi: introduce a result field in struct scsi_request

2017-04-19 Thread Christoph Hellwig
On Wed, Apr 19, 2017 at 09:43:00PM -0400, Martin K. Petersen wrote: > Really wish we could just obliterate drivers/ide. Same here. It's been _the_ major pain point for doing block layer heavy lifting for the last 1 or two years. -- dm-devel mailing list dm-devel@redhat.com

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

2017-04-19 Thread h...@lst.de
On Wed, Apr 19, 2017 at 09:07:45PM +, Bart Van Assche wrote: > > + blk_execute_rq(or->request->q, NULL, or->request, 0); > > + error = or->request ? -EIO : 0; > > Hello Christoph, > > Did you perhaps intend or->request->errors instead of or->request? Yes, thanks. -- dm-devel mailing

Re: [dm-devel] [PATCH v3] dcssblk: add dax_operations support

2017-04-19 Thread kbuild test robot
Hi Dan, [auto build test ERROR on linus/master] [also build test ERROR on v4.11-rc7 next-20170419] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Dan-Williams/dcssblk-add-dax_operations-support

Re: [dm-devel] [PATCH v3] axon_ram: add dax_operations support

2017-04-19 Thread Dan Williams
On Wed, Apr 19, 2017 at 8:01 PM, kbuild test robot <l...@intel.com> wrote: > Hi Dan, > > [auto build test ERROR on powerpc/next] > [also build test ERROR on v4.11-rc7 next-20170419] > [if your patch is applied to the wrong git tree, please drop us a note to > help impro

Re: [dm-devel] [PATCH v3] axon_ram: add dax_operations support

2017-04-19 Thread kbuild test robot
Hi Dan, [auto build test ERROR on powerpc/next] [also build test ERROR on v4.11-rc7 next-20170419] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Dan-Williams/axon_ram-add-dax_operations

Re: [dm-devel] [PATCH] block: get rid of blk_integrity_revalidate()

2017-04-19 Thread Martin K. Petersen
Ilya Dryomov writes: Ilya, > Commit 25520d55cdb6 ("block: Inline blk_integrity in struct gendisk") > introduced blk_integrity_revalidate(), which seems to assume ownership > of the stable pages flag and unilaterally clears it if no blk_integrity > profile is registered: > >

Re: [dm-devel] [PATCH 08/23] scsi: introduce a result field in struct scsi_request

2017-04-19 Thread Martin K. Petersen
Christoph Hellwig writes: > 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. Reviewed-by: Martin K. Petersen > Note that

Re: [dm-devel] [PATCH 26/27] scsi: sd: Separate zeroout and discard command choices

2017-04-19 Thread Martin K. Petersen
Paolo, > Should this be conditional on lbprz, lbpws, lbpws10 and max_ws_blocks? It is intentional that things can be overridden from userland for devices that report the "wrong" thing. We do the same for discard so people can set up udev rules. -- Martin K. Petersen Oracle Linux

[dm-devel] [PATCH v3] dcssblk: add dax_operations support

2017-04-19 Thread Dan Williams
Setup a dax_dev to have the same lifetime as the dcssblk block device and add a ->direct_access() method that is equivalent to dcssblk_direct_access(). Once fs/dax.c has been converted to use dax_operations the old dcssblk_direct_access() will be removed. Reported-by: Gerald Schaefer

[dm-devel] [PATCH v3] dax: add a facility to lookup a dax device by 'host' device name

2017-04-19 Thread Dan Williams
For the current block_device based filesystem-dax path, we need a way for it to lookup the dax_device associated with a block_device. Add a 'host' property of a dax_device that can be used for this purpose. It is a free form string, but for a dax_device associated with a block device it is the

[dm-devel] [PATCH v3] axon_ram: add dax_operations support

2017-04-19 Thread Dan Williams
Setup a dax_device to have the same lifetime as the axon_ram block device and add a ->direct_access() method that is equivalent to axon_ram_direct_access(). Once fs/dax.c has been converted to use dax_operations the old axon_ram_direct_access() will be removed. Reported-by: Gerald Schaefer

[dm-devel] new multipath device mistakenly replaced another PV in existing volume group

2017-04-19 Thread Neutron Sharc
I'm seeing a strange problem (iscsi LUNs + dm-multipath + lvm) that I will walk through an example to explain. I have an iscsi target machine that exposes many iscsi LUNs. Iscsi initiator logs in 4 iscsi LUNs (vol1_[0-3]), creates a multipath device for each LUN (/dev/mapper/vol1_[0-3]), and

Re: [dm-devel] [PATCH 23/23] block: remove the errors field from struct request

2017-04-19 Thread Bart Van Assche
On Wed, 2017-04-19 at 21:27 +0200, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > Acked-by: Roger Pau Monné > Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Bart Van Assche -- dm-devel

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

2017-04-19 Thread Bart Van Assche
On Wed, 2017-04-19 at 21:26 +0200, Christoph Hellwig wrote: > --- a/drivers/scsi/osd/osd_initiator.c > +++ b/drivers/scsi/osd/osd_initiator.c > @@ -489,7 +489,10 @@ static void _set_error_resid(struct osd_request *or, > struct request *req, > > int osd_execute_request(struct osd_request *or) >

Re: [dm-devel] [PATCH 01/23] pd: don't check blk_execute_rq return value.

2017-04-19 Thread Bart Van Assche
On Wed, 2017-04-19 at 21:26 +0200, Christoph Hellwig wrote: > The driver never sets req->errors, so blk_execute_rq will always return 0. Reviewed-by: Bart Van Assche -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

[dm-devel] [PATCH 18/23] block: add a error_count field to struct request

2017-04-19 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.

[dm-devel] [PATCH 03/23] nvme-fc: fix status code handling in nvme_fc_fcpio_done

2017-04-19 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:

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

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

[dm-devel] [PATCH 16/23] blk-mq: remove the error argument to blk_mq_complete_request

2017-04-19 Thread Christoph Hellwig
Now that all drivers that call blk_mq_complete_requests 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] [PATCH 17/23] blk-mq: simplify __blk_mq_complete_request

2017-04-19 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 | 25 - 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index

[dm-devel] [PATCH 12/23] dm mpath: don't check for req->errors

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

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

2017-04-19 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 Reviewed-by: Johannes Thumshirn

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

2017-04-19 Thread 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 +-- block/blk-mq.c | 10 +++---

[dm-devel] [PATCH 01/23] pd: don't check blk_execute_rq return value.

2017-04-19 Thread Christoph Hellwig
The driver never sets req->errors, so blk_execute_rq will always return 0. Signed-off-by: Christoph Hellwig --- drivers/block/paride/pd.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c index

[dm-devel] [PATCH 20/23] ataflop: switch from req->errors to req->error_count

2017-04-19 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 +++

[dm-devel] kill req->errors V3

2017-04-19 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] [PATCH 06/23] virtio: fix spelling of virtblk_scsi_request_done

2017-04-19 Thread 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 --git a/drivers/block/virtio_blk.c

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

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

[dm-devel] [PATCH 13/23] nbd: don't use req->errors

2017-04-19 Thread 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 a/drivers/block/nbd.c b/drivers/block/nbd.c index

[dm-devel] [PATCH 09/23] loop: zero-fill bio on the submitting cpu

2017-04-19 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 Reviewed-by: Ming Lei --- drivers/block/loop.c | 30

[dm-devel] [PATCH 15/23] xen-blkfront: don't use req->errors

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

[dm-devel] [PATCH 07/23] virtio_blk: don't use req->errors

2017-04-19 Thread 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] [PATCH 21/23] swim3: remove (commented out) printing of req->errors

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

[dm-devel] [PATCH 14/23] mtip32xx: add a status field to struct mtip_cmd

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

[dm-devel] [PATCH 19/23] floppy: switch from req->errors to req->error_count

2017-04-19 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 @@

[dm-devel] [PATCH 22/23] blktrace: remove the unused block_rq_abort tracepoint

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

[dm-devel] [PATCH 08/23] scsi: introduce a result field in struct scsi_request

2017-04-19 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.

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

2017-04-19 Thread h...@lst.de
On Tue, Apr 18, 2017 at 10:50:18PM +, Bart Van Assche wrote: > 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. >

Re: [dm-devel] dm-era: metadata reuse after reboot possible?

2017-04-19 Thread Somasundaram Krishnasamy
I have sent a patch recently for review. https://www.redhat.com/archives/dm-devel/2017-April/msg00138.html It should fix this issue. Regards, Somu. On 4/19/2017 6:32 AM, Markus Hentsch wrote: Hello, it's been a while. I've also been busy with other stuff in the last months but now I'm back

Re: [dm-devel] [resend PATCH v2 08/33] dcssblk: add dax_operations support

2017-04-19 Thread Dan Williams
On Wed, Apr 19, 2017 at 8:31 AM, Gerald Schaefer wrote: > On Mon, 17 Apr 2017 12:09:32 -0700 > Dan Williams wrote: > >> Setup a dax_dev to have the same lifetime as the dcssblk block device >> and add a ->direct_access() method that is

Re: [dm-devel] [PATCH 26/27] scsi: sd: Separate zeroout and discard command choices

2017-04-19 Thread Paolo Bonzini
On 05/04/2017 19:21, Christoph Hellwig wrote: > +static ssize_t > +zeroing_mode_store(struct device *dev, struct device_attribute *attr, > +const char *buf, size_t count) > +{ > + struct scsi_disk *sdkp = to_scsi_disk(dev); > + > + if (!capable(CAP_SYS_ADMIN)) > +

Re: [dm-devel] dm-era: metadata reuse after reboot possible?

2017-04-19 Thread Markus Hentsch
Hello, it's been a while. I've also been busy with other stuff in the last months but now I'm back stuck at this issue. Has there been any progress on this? On Mo, Oct 31, 2016 at 12:37, Edward Thornber wrote: > On Fri, Oct 21, 2016 at 11:29:26AM +0200, Markus Hentsch wrote: >> Hello, >> >> is it

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

2017-04-19 Thread Roger Pau Monné
On Thu, Apr 06, 2017 at 05:39:36PM +0200, 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. > > Signed-off-by: Christoph Hellwig For blkfront:

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

2017-04-19 Thread Roger Pau Monné
On Thu, Apr 06, 2017 at 05:39:35PM +0200, Christoph Hellwig wrote: > 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

Re: [dm-devel] kill req->errors

2017-04-19 Thread Konrad Rzeszutek Wilk
On Fri, Apr 07, 2017 at 09:11:24AM +0200, Christoph Hellwig wrote: > On Thu, Apr 06, 2017 at 04:00:24PM -0400, Konrad Rzeszutek Wilk wrote: > > You wouldn't have a git tree to easily test it? Thanks. > > git://git.infradead.org/users/hch/block.git request-errors > > Gitweb: > >

[dm-devel] [PATCH] block: get rid of blk_integrity_revalidate()

2017-04-19 Thread Ilya Dryomov
Commit 25520d55cdb6 ("block: Inline blk_integrity in struct gendisk") introduced blk_integrity_revalidate(), which seems to assume ownership of the stable pages flag and unilaterally clears it if no blk_integrity profile is registered: if (bi->profile)

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

2017-04-19 Thread Konrad Rzeszutek Wilk
On Tue, Apr 18, 2017 at 04:00:51PM +0100, Roger Pau Monné wrote: > On Thu, Apr 06, 2017 at 05:39:35PM +0200, Christoph Hellwig wrote: > > 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

[dm-devel] nvme: make nvme_error_status private

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

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

2017-04-19 Thread Konrad Rzeszutek Wilk
On Tue, Apr 18, 2017 at 04:03:21PM +0100, Roger Pau Monné wrote: > On Thu, Apr 06, 2017 at 05:39:36PM +0200, 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 > >

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

2017-04-19 Thread h...@lst.de
On Tue, Apr 18, 2017 at 10:57:11PM +, Bart Van Assche wrote: > Both blk-mq and the traditional block layer support a .cmd_size field to > make the block layer core allocate driver-specific data at the end of struct > request. Could that mechanism have been used for the error_count field? It

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

2017-04-19 Thread h...@lst.de
On Tue, Apr 18, 2017 at 10:34:20PM +, Bart Van Assche wrote: > Did you perhaps intend "req->result" instead of "rq->result"? Yes. > Did you intend "war" or is that perhaps a typo? I'll fix the comment. > > trace_scsi_dispatch_cmd_done(cmd); > > - blk_mq_complete_request(cmd->request,

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

2017-04-19 Thread h...@lst.de
On Tue, Apr 18, 2017 at 10:24:15PM +, Bart Van Assche wrote: > 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 > > +++