Re: [PATCH 1/2] scsi: convert unrecovered read error to -EILSEQ

2017-04-04 Thread Christoph Hellwig
I'm planning to introduce new block-layer specific status code ASAP, so I'd prefer not to add new errno special cases. I'll port your patches to the new code and will send them out with my series in a few days, though.

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

2017-04-04 Thread Christoph Hellwig
On Mon, Apr 03, 2017 at 11:23:29AM +0400, Dmitry Monakhov wrote: > bio_integrity_trim inherent it's interface from bio_trim and accept > offset and size, but this API is error prone because data offset > must always be insync with bio's data offset. That is why we have > integrity update hook in

Re: [PATCH 6/8] nowait aio: ext4

2017-04-04 Thread Christoph Hellwig
On Tue, Apr 04, 2017 at 09:58:53AM +0200, Jan Kara wrote: > FS_NOWAIT looks a bit too generic given these are filesystem feature flags. > Can we call it FS_NOWAIT_IO? It's way to generic as it's a feature of the particular file_operations instance. But once we switch to using RWF_* we can just

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

2017-04-04 Thread Christoph Hellwig
> - if ((src->ref_tag == 0x) || > - (src->app_tag == 0x)) { > + if ((src->ref_tag == T10_REF_ESCAPE) || > + (src->app_tag == T10_APP_ESCAPE)) { Please remove the

Re: [PATCH 22/23] drbd: implement REQ_OP_WRITE_ZEROES

2017-03-31 Thread Christoph Hellwig
On Thu, Mar 30, 2017 at 07:15:50PM -0400, Mike Snitzer wrote: > I got pretty far along with implementing the DM thinp support for > WRITE_ZEROES in terms of thinp's DISCARD support (more of an > implementation detail.. or so I thought). > > But while discussing this effort with Jeff Moyer he

Re: [PATCH 04/25] fs: Provide infrastructure for dynamic BDIs in filesystems

2017-04-12 Thread Christoph Hellwig
> + if (sb->s_iflags & SB_I_DYNBDI) { > + bdi_put(sb->s_bdi); > + sb->s_bdi = _backing_dev_info; At some point I'd really like to get rid of noop_backing_dev_info and have a NULL here.. Otherwise this looks fine.. Reviewed-by: Christoph Hellwig <h...@lst.de>

Re: [PATCH 05/25] fs: Get proper reference for s_bdi

2017-04-12 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig <h...@lst.de>

Re: [PATCH 06/25] lustre: Convert to separately allocated bdi

2017-04-12 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig <h...@lst.de>

Re: [PATCH 03/25] bdi: Export bdi_alloc_node() and bdi_put()

2017-04-12 Thread Christoph Hellwig
On Wed, Mar 29, 2017 at 12:56:01PM +0200, Jan Kara wrote: > MTD will want to call bdi_alloc_node() and bdi_put() directly. Export > these functions. > > Signed-off-by: Jan Kara <j...@suse.cz> Looks fine, Reviewed-by: Christoph Hellwig <h...@lst.de>

Re: [PATCH 18/25] gfs2: Convert to properly refcounting bdi

2017-04-12 Thread Christoph Hellwig
ply using the generic mount_bdev code? Otherwise looks fine: Reviewed-by: Christoph Hellwig <h...@lst.de>

Re: [PATCH rfc 0/6] Automatic affinity settings for nvme over rdma

2017-04-12 Thread Christoph Hellwig
On Mon, Apr 10, 2017 at 01:05:50PM -0500, Steve Wise wrote: > I'll test cxgb4 if you convert it. :) That will take a lot of work. The problem with cxgb4 is that it allocatesd all the interrupts at device enable time, but then only allocates them to ULDs when they attached, while this scheme

Re: [PATCH 11/25] ecryptfs: Convert to separately allocated bdi

2017-04-12 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig <h...@lst.de>

Re: [PATCH 12/25] afs: Convert to separately allocated bdi

2017-04-12 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig <h...@lst.de>

Re: [PATCH 16/25] fuse: Convert to separately allocated bdi

2017-04-12 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig <h...@lst.de>

Re: [PATCH 25/25] bdi: Drop 'parent' argument from bdi_register[_va]()

2017-04-12 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig <h...@lst.de>

Re: [PATCH 22/25] ubifs: Convert to separately allocated bdi

2017-04-12 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig <h...@lst.de>

Re: [PATCH 21/25] nfs: Convert to separately allocated bdi

2017-04-12 Thread Christoph Hellwig
> /* > * Finish setting up an NFS2/3 superblock > */ I was just looking why you didn't update the v4 variant, but it seems like the comment above is simply incorrect.. Thus the patch looks fine: Reviewed-by: Christoph Hellwig <h...@lst.de>

Re: [PATCH 23/25] fs: Remove SB_I_DYNBDI flag

2017-04-12 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig <h...@lst.de>

Re: [PATCH 24/25] block: Remove unused functions

2017-04-12 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig <h...@lst.de>

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

2017-04-11 Thread Christoph Hellwig
Hi Nic, this patch looks fine, and I'll include it for the next post. I'll move some of the explanation in this mail into the patch, though.

Re: [PATCH] remove the mg_disk driver

2017-04-11 Thread Christoph Hellwig
Any comments? Getting rid of this driver which was never wired up at all would help with some of the pending block work.. On Thu, Apr 06, 2017 at 01:28:46PM +0200, Christoph Hellwig wrote: > This drivers was added in 2008, but as far as a I can tell we never had a > single platform that ac

Re: [PATCH 13/25] mtd: Convert to dynamically allocated bdi infrastructure

2017-04-12 Thread Christoph Hellwig
> + sb->s_bdi = bdi_get(mtd_bdi); > + sb->s_iflags |= SB_I_DYNBDI; FTI, while I think this is a faithful conversion of the existing code, the single bdi for all MTD devices looks rather bogus to me.. Otherwise this looks good: Reviewed-by: Christoph Hellwig <h...@lst.de>

Re: [PATCH 14/25] coda: Convert to separately allocated bdi

2017-04-12 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig <h...@lst.de>

Re: [PATCH 15/25] exofs: Convert to separately allocated bdi

2017-04-12 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig <h...@lst.de>

Re: [PATCH 19/25] nilfs2: Convert to properly refcounting bdi

2017-04-12 Thread Christoph Hellwig
d get rid of this open coding in block based file systems.. Otherwise looks fine: Reviewed-by: Christoph Hellwig <h...@lst.de>

Re: [PATCH 20/25] ncpfs: Convert to separately allocated bdi

2017-04-12 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig <h...@lst.de>

Re: [PATCH 1/9] Use RWF_* flags for AIO operations

2017-04-12 Thread Christoph Hellwig
> > + if (unlikely(iocb->aio_rw_flags & ~(RWF_HIPRI | RWF_DSYNC | RWF_SYNC))) > { > + pr_debug("EINVAL: aio_rw_flags set with incompatible flags\n"); > + return -EINVAL; > + } > + if (iocb->aio_rw_flags & RWF_HIPRI) > + req->common.ki_flags |=

clean up a few end_request variants

2017-04-12 Thread Christoph Hellwig
Just some trivial cleanup patches that I'd like to offload from a big series in the pipe..

[PATCH 2/3] block: remove blk_end_request_cur

2017-04-12 Thread Christoph Hellwig
This function is not used anywhere in the kernel. Signed-off-by: Christoph Hellwig <h...@lst.de> --- block/blk-core.c | 18 -- include/linux/blkdev.h | 1 - 2 files changed, 19 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 8aee417c1e4f..a01af9

[PATCH 3/3] block: make __blk_end_bidi_request private

2017-04-12 Thread Christoph Hellwig
blk_insert_flush should be using __blk_end_request to start with. Signed-off-by: Christoph Hellwig <h...@lst.de> --- block/blk-core.c | 2 +- block/blk-flush.c | 2 +- block/blk.h | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/block/blk-core.c b/block/blk-

[PATCH 1/3] block: remove blk_end_request_err and __blk_end_request_err

2017-04-12 Thread Christoph Hellwig
Both functions are entirely unused. Signed-off-by: Christoph Hellwig <h...@lst.de> --- block/blk-core.c | 39 --- include/linux/blkdev.h | 2 -- 2 files changed, 41 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 4f95bd

[PATCH 7/8] block: remove bio_no_advance_iter

2017-04-12 Thread Christoph Hellwig
Now that we don't have to support the odd Write Same special case we can simply increment the iter if the bio has data, else just manipulate bi_size directly. Signed-off-by: Christoph Hellwig <h...@lst.de> --- include/linux/bio.h | 13 +++-- 1 file changed, 3 insertions(+), 10 del

[PATCH 2/8] target/iblock: convert WRITE_SAME to blkdev_issue_zeroout

2017-04-12 Thread Christoph Hellwig
E_SAME for anything other than VAAI BlockZero, so just using blkdev_issue_zeroout() when available, and falling back to iblock_execute_write_same() if the WRITE_SAME buffer contains anything other than zeros should be OK. Signed-off-by: Christoph Hellwig <h...@lst.de> --- dr

[PATCH 3/8] sd: remove write same support

2017-04-12 Thread Christoph Hellwig
There are no more end-users of REQ_OP_WRITE_SAME left, so we can start deleting it. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/scsi/sd.c | 70 --- drivers/scsi/sd_zbc.c | 1 - 2 files changed, 71 deletions(-) diff

[PATCH 5/8] dm: remove write same support

2017-04-12 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/md/dm-core.h | 1 - drivers/md/dm-io.c| 21 + drivers/md/dm-linear.c| 1 - drivers/md/dm-mpath.c | 1 - drivers/md/dm-rq.c| 3 --- drivers/md/dm-stripe.c

[PATCH 1/8] drbd: drop REQ_OP_WRITE_SAME support

2017-04-12 Thread Christoph Hellwig
Linux only used it for zeroing, for which we have better methods now. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/block/drbd/drbd_main.c | 28 ++ drivers/block/drbd/drbd_nl.c | 60 -- drivers/block/drbd/drbd_rece

[PATCH 4/8] md: drop WRITE_SAME support

2017-04-12 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/md/linear.c| 1 - drivers/md/md.h| 7 --- drivers/md/multipath.c | 1 - drivers/md/raid0.c | 2 -- drivers/md/raid1.c | 4 +--- drivers/md/raid10.c| 1 - drivers/md/raid5.c | 1 - 7 files chan

[PATCH 6/8] block: remove REQ_OP_WRITE_SAME support

2017-04-12 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- block/bio.c | 3 -- block/blk-core.c| 11 +- block/blk-lib.c | 90 - block/blk-merge.c | 32 block/blk-settings.c

[PATCH 8/8] block: use bio_has_data to check if a bio has bvecs

2017-04-12 Thread Christoph Hellwig
Now that Write Same is gone and discard bios never have a payload we can simply use bio_has_data as an indicator that the bio has bvecs that need to be handled. Signed-off-by: Christoph Hellwig <h...@lst.de> --- block/bio.c | 8 +--- block/blk-merge.c | 9 + include

remove REQ_OP_WRITE_SAME

2017-04-12 Thread Christoph Hellwig
Now that we are using REQ_OP_WRITE_ZEROES for all zeroing needs in the kernel there is very little use left for REQ_OP_WRITE_SAME. We only have two callers left, and both just export optional protocol features to remote systems: DRBD and the target code. For the target code the only real use

Re: [PATCH 5/9] nowait aio: return on congested block device

2017-04-12 Thread Christoph Hellwig
As mentioned last time around, this should be a REQ_NOWAIT flag so that it can be easily passed down to the request layer. > +static inline void bio_wouldblock_error(struct bio *bio) > +{ > + bio->bi_error = -EAGAIN; > + bio_endio(bio); > +} Please skip this helper.. > +#define

Re: [PATCH 9/9] nowait aio: Return -EOPNOTSUPP if filesystem does not support

2017-04-12 Thread Christoph Hellwig
This should go into the patch that introduces IOCB_NOWAIT.

Re: kill req->errors

2017-04-12 Thread Christoph Hellwig
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. Did you manage to give it a spin now that I pointed you to the git tree?

Re: kill req->errors

2017-04-12 Thread Christoph Hellwig
Any more comments on these patches? I'd like to make some progress on this work.

Re: [PATCH 08/25] btrfs: Convert to separately allocated bdi

2017-04-12 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig <h...@lst.de>

Re: [PATCH 10/25] cifs: Convert to separately allocated bdi

2017-04-12 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig <h...@lst.de>

Re: [PATCH 09/25] ceph: Convert to separately allocated bdi

2017-04-12 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig <h...@lst.de>

Re: [PATCH 07/25] 9p: Convert to separately allocated bdi

2017-04-12 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig <h...@lst.de>

RFC: drop the T10 OSD code and its users

2017-04-12 Thread Christoph Hellwig
The only real user of the T10 OSD protocol, the pNFS object layout driver never went to the point of having shipping products, and the other two users (osdblk and exofs) were simple example of it's usage. The code has been mostly unmaintained for years and is getting in the way of block / SCSI

[PATCH 3/4] nfs: remove the objlayout driver

2017-04-12 Thread Christoph Hellwig
The objlayout code has been in the tree, but it's been unmaintained and no server product for it actually ever shipped. Signed-off-by: Christoph Hellwig <h...@lst.de> --- Documentation/admin-guide/kernel-parameters.txt | 6 - Documentation/filesystems/nfs/pnfs.txt | 37 --

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 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 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 <h...@lst.de> --- block/blk-exec.c

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

2017-04-06 Thread Christoph Hellwig
value. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/scsi/scsi_lib.c | 28 +++- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 11972d1075f1..89b4d9e69866 100644 --- a/driver

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

2017-04-06 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- 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 +++ b/d

[PATCH 05/25] nvme: make nvme_error_status private

2017-04-06 Thread Christoph Hellwig
the lightnvm folks, though. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/nvme/host/core.c | 3 +-- drivers/nvme/host/lightnvm.c | 8 drivers/nvme/host/nvme.h | 1 - 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/nvme/host/core.c b/d

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

2017-04-06 Thread Christoph Hellwig
ues in it. I didn't dare to touch this magic, so the abuses are brought forward 1:1. Signed-off-by: Christoph Hellwig <h...@lst.de> --- block/bsg-lib.c| 8 block/bsg.c| 12 +-- block/scsi_ioctl.c | 14 ++--- driv

[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 <h...@lst.de> --- 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 688

[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 <h...@lst.de> --- drivers/block/virtio_blk.c | 10 +++--- 1 file changed, 3 i

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

2017-04-06 Thread Christoph Hellwig
-by: Christoph Hellwig <h...@lst.de> --- drivers/nvme/host/fc.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c index fc42172c796a..aad7f9c0be32 100644 --- a/drivers/nvme/host/fc.c +++ b/drivers/nvme/host/fc.c @@ -

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 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 <h...@lst.de> --- drivers/block/loop.c | 30 ++ drivers/block/loop.h | 1 + 2

[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 <h...@lst.de> --- 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

[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 <h...@lst.de> --- 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 01/25] remove the mg_disk driver

2017-04-06 Thread Christoph Hellwig
-by: Christoph Hellwig <h...@lst.de> --- Documentation/blockdev/mflash.txt | 84 --- drivers/block/Kconfig | 17 - drivers/block/Makefile|1 - drivers/block/mg_disk.c | 1110 - include/linux/mg_disk.h | 45 -- 5

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

2017-04-06 Thread Christoph Hellwig
for the block layer only when we actually need it. Because we can't overload the status value with a negative error code for cancelled command we now have a flags filed in struct nvme_request that contains a bit for this condition. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/nvm

[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 25/25] block: remove the errors field from struct request

2017-04-06 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- 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.

[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: Christ

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

2017-04-06 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- 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 b/include/trace/

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

2017-04-06 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- 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 +++ b/drivers

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

2017-04-06 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- 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/fl

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

2017-04-06 Thread Christoph Hellwig
off-by: Christoph Hellwig <h...@lst.de> --- include/linux/blkdev.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index a03acd92ae74..fa75401ea5cc 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -175,6 +175,7 @@ struc

[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 <h...@lst.de> --- block/blk-mq.c| 14 +++--- drivers/blo

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

2017-04-06 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- 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 @@

[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 <h...@lst.de> --- drivers/block/mtip32xx/mtip32xx.c | 16 +--- drivers/block/mtip32xx/mtip32xx.h | 1 + 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/block

[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 <h...@lst.de> --- 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 393f35

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

[PATCH 5/5] block, scsi: move the retries field to struct scsi_request

2017-04-05 Thread Christoph Hellwig
Instead of bloating the generic struct request with it. Signed-off-by: Christoph Hellwig <h...@lst.de> --- block/scsi_ioctl.c | 8 drivers/scsi/osd/osd_initiator.c | 2 +- drivers/scsi/osst.c| 2 +- drivers/scsi/scsi_error.c | 2 +- d

[PATCH 2/5] nvme: cleanup nvme_req_needs_retry

2017-04-05 Thread Christoph Hellwig
Don't pass the status explicitly but derive it from the requeust, and unwind the complex condition to be more readable. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/nvme/host/core.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/driver

->retries fixups

2017-04-05 Thread Christoph Hellwig
This series fixes a few lose bits in terms of how nvme uses ->retries, including fixing it for non-PCIe transports. While at it I noticed that nvme and scsi use the field in entirely different ways, and no other driver uses it at all. So I decided to move it into the nvme_request and

[PATCH 1/5] nvme: move ->retries setup to nvme_setup_cmd

2017-04-05 Thread Christoph Hellwig
This way we get the behavior right for the non-PCIe transports. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/nvme/host/core.c | 5 + drivers/nvme/host/pci.c | 4 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvm

[PATCH 12/27] block: add a new BLKDEV_ZERO_NOFALLBACK flag

2017-04-05 Thread Christoph Hellwig
This avoids fallbacks to explicit zeroing in (__)blkdev_issue_zeroout if the caller doesn't want them. Also clean up the convoluted check for the return condition that this new flag is added to. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Martin K. Petersen <mar

[PATCH 13/27] block_dev: use blkdev_issue_zerout for hole punches

2017-04-05 Thread Christoph Hellwig
This gets us support for non-discard efficient write of zeroes (e.g. NVMe) and prepares for removing the discard_zeroes_data flag. Also remove a pointless discard support check, which is done in blkdev_issue_discard already. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Ma

[PATCH 15/27] nvme: implement REQ_OP_WRITE_ZEROES

2017-04-05 Thread Christoph Hellwig
But now for the real NVMe Write Zeroes yet, just to get rid of the discard abuse for zeroing. Also rename the quirk flag to be a bit more self-explanatory. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> Reviewed-by: Hannes

[PATCH] remove the obsolete hd driver

2017-04-05 Thread Christoph Hellwig
This driver is for pre-IDE hardisk that are only found in PC from the stoneage of personal computing, and which we don't support elsewhere in the kernel these days. It's also been marked broken forever. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/block/Kconfig | 12 - d

[PATCH 03/27] block: implement splitting of REQ_OP_WRITE_ZEROES bios

2017-04-05 Thread Christoph Hellwig
Copy and past the REQ_OP_WRITE_SAME code to prepare to implementations that limit the write zeroes size. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> Reviewed-by: Hannes Reinecke <h...@suse.com> --- bloc

[PATCH 06/27] dm io: discards don't take a payload

2017-04-05 Thread Christoph Hellwig
Fix up do_region to not allocate a bio_vec for discards. We've got rid of the discard payload allocated by the caller years ago. Obviously this wasn't actually harmful given how long it's been there, but it's still good to avoid the pointless allocation. Signed-off-by: Christoph Hellwig &l

[PATCH 07/27] dm: support REQ_OP_WRITE_ZEROES

2017-04-05 Thread Christoph Hellwig
Copy & paste from the REQ_OP_WRITE_SAME code. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Hannes Reinecke <h...@suse.com> --- drivers/md/dm-core.h | 1 + drivers/md/dm-io.c| 8 ++-- drivers/md/dm-linear.c| 1 + drive

[PATCH 02/27] block: renumber REQ_OP_WRITE_ZEROES

2017-04-05 Thread Christoph Hellwig
Make life easy for implementations that needs to send a data buffer to the device (e.g. SCSI) by numbering it as a data out command. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> Reviewed-by: Hannes Reinecke &l

[PATCH 10/27] block: add a flags argument to (__)blkdev_issue_zeroout

2017-04-05 Thread Christoph Hellwig
Turn the existing discard flag into a new BLKDEV_ZERO_UNMAP flag with similar semantics, but without referring to diѕcard. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> Reviewed-by: Hannes Reinecke <h...@suse.com> --

[PATCH 01/27] sd: split sd_setup_discard_cmnd

2017-04-05 Thread Christoph Hellwig
Zeroes operation. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> Reviewed-by: Hannes Reinecke <h...@suse.com> --- drivers/scsi/sd.c | 153 ++ 1 file changed, 84

[PATCH 04/27] sd: implement REQ_OP_WRITE_ZEROES

2017-04-05 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> Reviewed-by: Hannes Reinecke <h...@suse.com> --- drivers/scsi/sd.c | 31 ++- drivers/scsi/sd_zbc.c | 1 + 2 files changed, 27 insertio

[PATCH 08/27] dm kcopyd: switch to use REQ_OP_WRITE_ZEROES

2017-04-05 Thread Christoph Hellwig
It seems like the code currently passes whatever it was using for writes to WRITE SAME. Just switch it to WRITE ZEROES, although that doesn't need any payload. Untested, and confused by the code, maybe someone who understands it better than me can help.. Signed-off-by: Christoph Hellwig &l

always use REQ_OP_WRITE_ZEROES for zeroing offload V2

2017-04-05 Thread Christoph Hellwig
This series makes REQ_OP_WRITE_ZEROES the only zeroing offload supported by the block layer, and switches existing implementations of REQ_OP_DISCARD that correctly set discard_zeroes_data to it, removes incorrect discard_zeroes_data, and also switches WRITE SAME based zeroing in SCSI to this new

[PATCH 17/27] loop: implement REQ_OP_WRITE_ZEROES

2017-04-05 Thread Christoph Hellwig
It's identical to discard as hole punches will always leave us with zeroes on reads. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Hannes Reinecke <h...@suse.com> --- drivers/block/loop.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/block/loop.c b/d

[PATCH 14/27] sd: implement unmapping Write Zeroes

2017-04-05 Thread Christoph Hellwig
Try to use a write same with unmap bit variant if the device supports it and the caller allows for it. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> Reviewed-by: Hannes Reinecke <h...@suse.com> --- drivers/scsi/sd.

[PATCH 16/27] zram: implement REQ_OP_WRITE_ZEROES

2017-04-05 Thread Christoph Hellwig
Just the same as discard if the block size equals the system page size. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Hannes Reinecke <h...@suse.com> --- drivers/block/zram/zram_drv.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/d

[PATCH 11/27] block: add a REQ_NOUNMAP flag for REQ_OP_WRITE_ZEROES

2017-04-05 Thread Christoph Hellwig
with this change. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> Reviewed-by: Hannes Reinecke <h...@suse.com> --- block/blk-lib.c | 19 +-- include/linux/blk_types.h | 6 ++ 2 files changed, 11 insertion

[PATCH 09/27] block: stop using blkdev_issue_write_same for zeroing

2017-04-05 Thread Christoph Hellwig
We'll always use the WRITE ZEROES code for zeroing now. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> Reviewed-by: Hannes Reinecke <h...@suse.com> --- block/blk-lib.c | 4 1 file changed, 4 deletions(-) diff

<    2   3   4   5   6   7   8   9   10   11   >