[PATCH 2/5] nvme-pci: merge init_request methods

2017-04-27 Thread Christoph Hellwig
Now that we get the tagset passed we can have a single implementation for the I/O and admin queues. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/nvme/host/pci.c | 18 +++--- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/drivers/nvme/host/pci.c b/d

[PATCH 3/5] nvme-rdma: merge init_request and exit_request methods

2017-04-27 Thread Christoph Hellwig
Now that we get the tagset passed we can have a single implementation for the I/O and admin queues. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/nvme/host/rdma.c | 43 +++ 1 file changed, 11 insertions(+), 32 deletions(-) diff

[PATCH 4/5] nvme-fc: merge init_request methods

2017-04-27 Thread Christoph Hellwig
Now that we get the tagset passed we can have a single implementation for the I/O and admin queues. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/nvme/host/fc.c | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/drivers/nvme/host/fc.c b/d

Re: [RFC xfstests PATCH] xfstests: add a writeback error handling test

2017-04-24 Thread Christoph Hellwig
On Mon, Apr 24, 2017 at 09:45:51AM -0400, Jeff Layton wrote: > With the patch series above, ext4 now passes. xfs and btrfs end up in > r/o mode after the test. xfs returns -EIO at that point though, and > btrfs returns -EROFS. What behavior we actually want there, I'm not > certain. We might be

Re: [PATCH 02/11] blk: make the bioset rescue_workqueue optional.

2017-04-24 Thread Christoph Hellwig
On Mon, Apr 24, 2017 at 11:51:01AM +1000, NeilBrown wrote: > > I was following the existing practice exemplified by > bioset_create_nobvec(). Which is pretty ugly to start with.. > By not changing the signature of the function, I can avoid touching > quite a few places where it is called.

Re: [PATCH v3 02/20] mm: fix mapping_set_error call in me_pagecache_dirty

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

Re: [PATCH 1/5] blk-mq: update ->init_request and ->exit_request prototypes

2017-04-28 Thread Christoph Hellwig
On Fri, Apr 28, 2017 at 08:20:26AM -0600, Jens Axboe wrote: > Actually, I'll leave it as-is, just base things on top of for-next for > now. Ok. I'll resend the init_request changes then, as having request_idx around in a blk-mq iosched world is actively harmful.

Re: [PATCH 1/5] blk-mq: update ->init_request and ->exit_request prototypes

2017-04-28 Thread Christoph Hellwig
On Thu, Apr 27, 2017 at 02:20:21PM -0400, Jeff Moyer wrote: > Hi, Christoph, > > Christoph Hellwig <h...@lst.de> writes: > > > Remove the request_idx parameter, which can't be used safely now that we > > support I/O schedulers with blk-mq. Except for a su

Re: [PATCH v2 0/6] Fixup mtip32xx for scheduling

2017-04-28 Thread Christoph Hellwig
On Fri, Apr 28, 2017 at 08:01:49AM -0600, Jens Axboe wrote: > Round two of this patchset to cleanup. Changes since the first > posting: I got two mixed series in my inbox, one with two patches and one with 6. The two patch one doesn't seem to have a cover letter. > > - Mark internal commands

Re: [PATCH v2 0/6] Fixup mtip32xx for scheduling

2017-04-28 Thread Christoph Hellwig
On Fri, Apr 28, 2017 at 08:13:56AM -0600, Jens Axboe wrote: > On 04/28/2017 08:10 AM, Christoph Hellwig wrote: > > On Fri, Apr 28, 2017 at 08:01:49AM -0600, Jens Axboe wrote: > >> Round two of this patchset to cleanup. Changes since the first > >> posting: > >

Re: [PATCH 1/6] mtip32xx: get rid of 'atomic' argument to mtip_exec_internal_command()

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

Re: [PATCH 2/6] mtip32xx: kill atomic argument to mtip_quiesce_io()

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

Re: [PATCH 6/6] Revert "mtip32xx: pass BLK_MQ_F_NO_SCHED"

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

Re: update ->init_request and ->exit_request prototypes

2017-04-28 Thread Christoph Hellwig
On Thu, Apr 27, 2017 at 07:44:56PM +0200, Christoph Hellwig wrote: > Hi Jens, > > this series (against for-4.12/post-merge) updates the blk-mq > ->init_request and ->exit request methods to drop a now harmful > parameter, and update one to pass a little more information.

Re: [PATCH 5/6] mtip32xx: convert internal command issue to block IO path

2017-04-28 Thread Christoph Hellwig
> @@ -1088,6 +1088,13 @@ static int mtip_quiesce_io(struct mtip_port *port, > unsigned long timeout) > return -EFAULT; > } > > +struct mtip_int_cmd { > + int fis_len; > + dma_addr_t buffer; > + int buf_len; > + u32 opts; > +}; I know passing the dma_addr is probably the

Re: [RFC PATCH] bio-integrity: Fix regression if profile verify_fn is NULL

2017-08-02 Thread Christoph Hellwig
On Wed, Aug 02, 2017 at 02:27:50PM +0200, Milan Broz wrote: > In dm-integrity target we register integrity profile that have > both generate_fn and verify_fn callbacks set to NULL. > > This is used if dm-integrity is stacked under a dm-crypt device > for authenticated encryption (integrity

[PATCH 1/2] bio-integrity: move the bio integrity profile check earlier in bio_integrity_prep

2017-08-09 Thread Christoph Hellwig
This makes the code more obvious, and moves the most likely branch first in the function. Signed-off-by: Christoph Hellwig <h...@lst.de> --- block/bio-integrity.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block/bio-integrity.c b/block/bio-integrity.c

two small integrity cleanups

2017-08-09 Thread Christoph Hellwig
Found these while coming up with the fixes just sent.

[PATCH 2/2] bio-integrity: only verify integrity on the lowest stacked driver

2017-08-09 Thread Christoph Hellwig
This gets us back to the behavior in 4.12 and earlier. Signed-off-by: Christoph Hellwig <h...@lst.de> Fixes: 7c20f116 ("bio-integrity: stop abusing bi_end_io") --- block/bio-integrity.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/block/bio-integri

integrity regression fixes for 4.13-rc

2017-08-09 Thread Christoph Hellwig
Hi Jens, this series fixes regressions in the integrity handling update in 4.13-rc. The first one was sent earlier by Milan and while both Martin and I aren't exactly happy about the way dm uses the integrity code to cause this regression this minimal fix gets us back to the status quo. The

[PATCH 1/2] bio-integrity: Fix regression if profile verify_fn is NULL

2017-08-09 Thread Christoph Hellwig
Author: Christoph Hellwig <h...@lst.de> Date: Mon Jul 3 16:58:43 2017 -0600 bio-integrity: stop abusing bi_end_io we get this crash: : BUG: unable to handle kernel NULL pointer dereference at (null) : IP: (null) : *pde = ... : : Workqueue: kintegrityd bio_integrity_veri

[PATCH 2/2] dm-crypt: don't mess with BIP_BLOCK_INTEGRITY

2017-08-09 Thread Christoph Hellwig
This flag is never set right after calling bio_integrity_alloc, so don't clear it and confuse the reader. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/md/dm-crypt.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c

Re: [PATCH 0/4] mylex: Replace DAC960 block driver

2017-08-09 Thread Christoph Hellwig
On Wed, Aug 02, 2017 at 04:13:24PM +0200, Hannes Reinecke wrote: > Hi all, > > as we're trying to get rid of the remaining request_fn drivers here's > a patchset to move the DAC960 driver to the SCSI stack. > The new driver is called 'mylex'. > > The Mylex/DAC960 HBA comes in two flavours; the

Re: [PATCH] bio-integrity: revert "stop abusing bi_end_io"

2017-08-05 Thread Christoph Hellwig
On Thu, Aug 03, 2017 at 10:10:55AM -0400, Mikulas Patocka wrote: > That dm-crypt commit that uses bio integrity payload came 3 months before > 7c20f11680a441df09de7235206f70115fbf6290 and it was already present in > 4.12. And on it's own that isn't an argument if your usage is indeed wrong,

[PATCH 1/4] fs: pass iocb to do_generic_file_read

2017-08-22 Thread Christoph Hellwig
And rename it to the more descriptive generic_file_buffered_read while at it. Signed-off-by: Christoph Hellwig <h...@lst.de> --- mm/filemap.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index a49702445ce0..4bcfa74ad802

non-blocking buffered reads V4

2017-08-22 Thread Christoph Hellwig
This series resurrects the old patches from Milosz to implement non-blocking buffered reads. Thanks to the non-blocking AIO code from Goldwyn the implementation becomes pretty much trivial. I've also forward ported the test Milosz sent for recent xfsprogs to verify that this series works

[PATCH 3/4] fs: support RWF_NOWAIT for buffered reads

2017-08-22 Thread Christoph Hellwig
This is based on the old idea and code from Milosz Tanski. With the aio nowait code it becomes mostly trivial now. Buffered writes continue to return -EOPNOTSUPP if RWF_NOWAIT is passed. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/aio.c | 6 -- fs/btrfs/file.c

[PATCH 2/4] fs: support IOCB_NOWAIT in generic_file_buffered_read

2017-08-22 Thread Christoph Hellwig
From: Milosz Tanski <mil...@adfin.com> Allow generic_file_buffered_read to bail out early instead of waiting for the page lock or reading a page if IOCB_NOWAIT is specified. Signed-off-by: Milosz Tanski <mil...@adfin.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-b

[PATCH 4/4] block_dev: support RFW_NOWAIT on block device nodes

2017-08-22 Thread Christoph Hellwig
All support is already there in the generic code, we just need to wire it up. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/block_dev.c | 5 + 1 file changed, 5 insertions(+) diff --git a/fs/block_dev.c b/fs/block_dev.c index 9941dc8342df..ea21d18d8e79 100644 --- a/fs/block

Re: [RFC PATCH] nvme: always return IRQ_HANDLED

2017-08-18 Thread Christoph Hellwig
On Thu, Aug 17, 2017 at 02:25:27PM -0600, Jens Axboe wrote: > Yes, that will work. We need to get this into 4.13. I'll pick it up for the pull request I'm going to send you today.

Re: [PATCH 2/8] nowait aio: Introduce RWF_NOWAIT

2017-05-11 Thread Christoph Hellwig
n.ki_flags & IOCB_DIRECT)) { or using two tabs: if ((req->common.ki_flags & IOCB_NOWAIT) && !(req->common.ki_flags & IOCB_DIRECT)) { if the first version looks confusing, but never using the same indentation level as the following code. Except for that the patch looks fine to me: Reviewed-by: Christoph Hellwig <h...@lst.de>

Re: [PATCH 3/8] nowait aio: return if direct write will trigger writeback

2017-05-11 Thread Christoph Hellwig
It might make sense to move filemap_range_has_page into a separate prep patch. Otherwise this looks fine: Reviewed-by: Christoph Hellwig <h...@lst.de>

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

2017-05-11 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig <h...@lst.de> Although lifting the make_request limit is something a lot of users would appreciate in the near future..

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

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

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

2017-05-11 Thread Christoph Hellwig
ret = kiocb_set_rw_flags(, flags); > + if (ret) > + return ret; And please split factoring out kiocb_set_rw_flags into a separate prep patch. Otherwise these changes look fine: Reviewed-by: Christoph Hellwig <h...@lst.de>

[PATCH] block: handle partial completions for special payload requests

2017-05-11 Thread Christoph Hellwig
SCSI devices can return short writes on Write Same just like for normal writes, so we need to handle this case for our special payload requests as well. Signed-off-by: Christoph Hellwig <h...@lst.de> Reported-by: Abdul Haleem <abdha...@linux.vnet.ibm.com> Tested-by: Abdul H

Re: [linux-next][bock] WARNING: CPU: 22 PID: 0 at block/blk-core.c:2655 .blk_update_request+0x4f8/0x500

2017-05-09 Thread Christoph Hellwig
On Mon, May 08, 2017 at 08:00:41AM -0600, Jens Axboe wrote: > Christoph, Martin - any ideas? Trace from Abdul below. Btw, what page size does the system have? > > WARNING: CPU: 12 PID: 0 at block/blk-core.c:2651 > .blk_update_request+0x4cc/0x4e0 Any knowledge from tracing or printk on what

Re: [linux-next][bock] [bisected c20cfc27a] WARNING: CPU: 22 PID: 0 at block/blk-core.c:2655 .blk_update_request+0x4f8/0x500

2017-05-10 Thread Christoph Hellwig
Hi Abdul, can you test the patch below? I'll try to create a way to inject short WRITE SAME commands using qemu next, but I thought I'd give you a chance to try it as well. --- diff --git a/block/blk-core.c b/block/blk-core.c index c580b0138a7f..c7068520794b 100644 --- a/block/blk-core.c +++

Re: [PATCH 2/6 v2] mmc: core: Allocate per-request data using the block layer core

2017-05-18 Thread Christoph Hellwig
Btw, you can also remove the struct request backpointer in struct mmc_queue_req now - blk_mq_rq_from_pdu will do it for you without the need for a pointer.

Re: [PATCH 4/6 v2] mmc: block: move single ioctl() commands to block requests

2017-05-18 Thread Christoph Hellwig
On Thu, May 18, 2017 at 11:29:34AM +0200, Linus Walleij wrote: > We are storing the ioctl() in/out argument as a pointer in > the per-request struct mmc_blk_request container. Btw, for the main ioctl data (not the little reponse field) it might make sense to use blk_rq_map_user, which will do a

Re: Outstanding MQ questions from MMC

2017-05-18 Thread Christoph Hellwig
On Wed, Mar 29, 2017 at 05:09:37AM +0200, Linus Walleij wrote: > 2. When MMC cards are ejected a serious error condition occurs. So for this > reason we spool out the queue with > > req->rq_flags |= RQF_QUIET; > blk_end_request_all(req, -EIO); > > This will shut up a huge amount of console

[PATCH 4/4] dm: fix REQ_RAHEAD handling

2017-05-15 Thread Christoph Hellwig
remove this special casing and ignore all additional error handling for REQ_RAHEAD - if this was a real underlying error we'd get a normal read once the real read comes in. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/md/dm-raid1.c | 4 ++-- drivers/md/dm-stripe.c | 2 +- 2

[PATCH 3/4] dm mpath: multipath_clone_and_map must not return -EIO

2017-05-15 Thread Christoph Hellwig
Since 412445ac ("dm: introduce a new DM_MAPIO_KILL return value"), the clone_and_map_rq methods must not return errno values, so fix it up to properly return DM_MAPIO_KILL instead, instead of the -EIO value that sneaked in due to a conflict between two patches. Signed-off-by: Christo

[PATCH 2/4] dm mpath: don't return -EIO from dm_report_EIO

2017-05-15 Thread Christoph Hellwig
Instead just turn the macro into a helper for the warning message. This removes an unessecary assignment in this patch, and will allow to fix a place where -EIO is the wrong error value in th next. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/md/dm-mpath.

Re: Announcing blktests

2017-05-15 Thread Christoph Hellwig
On Mon, May 15, 2017 at 03:13:52PM +0300, Dmitry Monakhov wrote: > Observation #2 > It is appeared that git tree was corrupted after crash :) Defenitely fsync > is missed > somewhere in git-core, I've straced it and found 'git clone' does only > two fsync for tmp-pack-xxx files. It seems git's

Re: [PATCH 7/8] blk-mq: create hctx for each present CPU

2017-06-08 Thread Christoph Hellwig
On Wed, Jun 07, 2017 at 03:04:11PM -0700, Omar Sandoval wrote: > On Sat, Jun 03, 2017 at 04:04:02PM +0200, Christoph Hellwig wrote: > > Currently we only create hctx for online CPUs, which can lead to a lot > > of churn due to frequent soft offline / online operations. Instead &

Re: [PATCH 0/10 v11] No wait AIO

2017-06-08 Thread Christoph Hellwig
As already indicated this whole series looks fine to me. Al: are you going to pick this up? Or Andrew? On Tue, Jun 06, 2017 at 06:19:29AM -0500, Goldwyn Rodrigues wrote: > This series adds nonblocking feature to asynchronous I/O writes. > io_submit() can be delayed because of a number of

Re: [PATCH] Fix loop device flush before configure

2017-06-08 Thread Christoph Hellwig
On Thu, Jun 08, 2017 at 08:45:31AM +0800, James Wang wrote: > Ok I got it blktests is a suite. I'd like to contribute something. If you > need, we adapt you,;-)! > But I have to learn some how to do that, need time. I haven't added test myself to blktests yet either, so I'd have to learn it as

Re: [PATCH v6 12/20] fs: add a new fstype flag to indicate how writeback errors are tracked

2017-06-12 Thread Christoph Hellwig
On Mon, Jun 12, 2017 at 08:23:06AM -0400, Jeff Layton wrote: > Add a new FS_WB_ERRSEQ flag to the fstype. Later patches will set and > key off of that to decide what behavior should be used. Please invert this so that only file systems that keep the old semantics need a flag.

Re: [PATCH v6 14/20] dax: set errors in mapping when writeback fails

2017-06-12 Thread Christoph Hellwig
On Mon, Jun 12, 2017 at 08:23:10AM -0400, Jeff Layton wrote: > For now, only do this when the FS_WB_ERRSEQ flag is set. The > AS_EIO/AS_ENOSPC flags are not currently cleared in the older code when > writeback initiation fails, only when we discover an error after waiting > on writeback to

Re: [PATCH v6 15/20] fs: have call_fsync call filemap_report_wb_err if FS_WB_ERRSEQ is set

2017-06-12 Thread Christoph Hellwig
On Mon, Jun 12, 2017 at 08:23:11AM -0400, Jeff Layton wrote: > Allow filesystems to opt-in to a final check of wb_err if FS_WB_ERRSEQ > is set. Technically, we could just plumb these calls into all of the > fsync operations, but I think this means less code, changes and churn. Please add it to

Re: [lkp-robot] [scsi] ebc76736f2: fio.write_bw_MBps -4% regression

2017-06-20 Thread Christoph Hellwig
On Tue, Jun 20, 2017 at 10:16:36AM +0800, Ye Xiaolong wrote: > Hi, Christoph > > On 06/19, Christoph Hellwig wrote: > >On Mon, Jun 19, 2017 at 04:52:36PM +0800, Ye Xiaolong wrote: > >> >I've not seen a compile-time option for the MQ I/O scheduler (unlike > &

Re: [PATCH 09/10] blk-mq-sched: unify request prepare methods

2017-06-20 Thread Christoph Hellwig
On Mon, Jun 19, 2017 at 03:32:09PM +0200, Paolo Valente wrote: > > static void bfq_finish_request(struct request *rq) > > { > > - struct bfq_queue *bfqq = RQ_BFQQ(rq); > > - struct bfq_data *bfqd = bfqq->bfqd; > > + struct bfq_queue *bfqq; > > + struct bfq_data *bfqd; > > + > > + if

Re: [PATCH] btrfs: use new block error code

2017-06-20 Thread Christoph Hellwig
<dan.carpen...@oracle.com> Looks fine, Acked-by: Christoph Hellwig <h...@lst.de>

Re: [PATCH v4 06/12] blk-mq: Initialize .rq_flags in blk_mq_rq_ctx_init()

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

Re: [PATCH 0/10 v13] merge request: No wait AIO

2017-06-20 Thread Christoph Hellwig
On Tue, Jun 20, 2017 at 01:24:28AM +0100, Al Viro wrote: > On Mon, Jun 19, 2017 at 05:36:05PM -0600, Jens Axboe wrote: > > On 06/19/2017 05:34 PM, Al Viro wrote: > > > On Mon, Jun 19, 2017 at 05:15:16PM -0600, Jens Axboe wrote: > > >> On 06/19/2017 10:33 AM, Goldwyn Rodrigues wrote: > > >>> Jens,

Re: [PATCH 04/11] fs: add support for allowing applications to pass in write life time hints

2017-06-20 Thread Christoph Hellwig
On Mon, Jun 19, 2017 at 02:33:41PM -0600, Jens Axboe wrote: > That doesn't work, in case it's cleared, or for checking whether it has > been set or not. Oh well, I added a NOT_SET variant for this. See below > for an incremental that adds support for file write hints as well. Use > the file write

Re: [PATCH 04/11] fs: add support for allowing applications to pass in write life time hints

2017-06-20 Thread Christoph Hellwig
On Tue, Jun 20, 2017 at 06:43:10AM -0600, Jens Axboe wrote: > > Question: IFF we can get the per-file hints to propagate to the > > writeback code (which I think is pretty easy for ext4/xfs/bdev, not > > sure about btrfs) do we even need the per-inode ones at all? > > How is that possible, the

Re: [PATCH v7 16/22] block: convert to errseq_t based writeback error tracking

2017-06-20 Thread Christoph Hellwig
> error = filemap_write_and_wait_range(filp->f_mapping, start, end); > if (error) > - return error; > + goto out; > > /* >* There is no need to serialise calls to blkdev_issue_flush with > @@ -640,6 +640,10 @@ int blkdev_fsync(struct file *filp,

Re: [PATCH v7 01/22] fs: remove call_fsync helper function

2017-06-20 Thread Christoph Hellwig
On Fri, Jun 16, 2017 at 03:34:06PM -0400, Jeff Layton wrote: > Requested-by: Christoph Hellwig <h...@infradead.org> > Signed-off-by: Jeff Layton <jlay...@redhat.com> Looks good, Reviewed-by: Christoph Hellwig <h...@lst.de>

Re: [PATCH 04/11] fs: add support for allowing applications to pass in write life time hints

2017-06-20 Thread Christoph Hellwig
On Tue, Jun 20, 2017 at 06:51:34AM -0600, Jens Axboe wrote: > That sounds fragile... Is it really worth it to avoid stealing three > bits in the inode? Do we have buffer_heads attached everywhere, that > sounds surprising to me. I'm not concerned about saving a few bits - we'll use those

Re: [PATCH v7 11/22] fs: new infrastructure for writeback error handling and reporting

2017-06-20 Thread Christoph Hellwig
> @@ -393,6 +394,7 @@ struct address_space { > gfp_t gfp_mask; /* implicit gfp mask for > allocations */ > struct list_headprivate_list; /* ditto */ > void*private_data; /* ditto */ > + errseq_twb_err; >

Re: [PATCH 01/10] pktcdvd: remove the call to blk_queue_bounce

2017-06-19 Thread Christoph Hellwig
On Mon, Jun 19, 2017 at 11:13:46PM +0800, Ming Lei wrote: > On Mon, Jun 19, 2017 at 11:00 PM, Christoph Hellwig <h...@lst.de> wrote: > > On Mon, Jun 19, 2017 at 10:34:36PM +0800, Ming Lei wrote: > >> blk_queue_make_request() sets bounce for any highmem page for long

Re: [PATCH 3/9] blk-mq: expose stream write hints through debugfs

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

block: spread MSI(-X) vectors to all possible CPUs

2017-06-26 Thread Christoph Hellwig
Hi all, this series contains the left-over block bits to spread the MSI-X vectors over all CPU. Thomas already rewrote and then merged the irq bits into the tip irq/core branch, and this is the remainder. As there are no dependencies on other block changes adding them to the tip tree might be

Re: [PATCH 2/9] block: add support for write hints in a bio

2017-06-26 Thread Christoph Hellwig
Looks fine for now: Reviewed-by: Christoph Hellwig <h...@lst.de> (although I suspect we'll eventually move to a hints field separate from the REQ_* flags).

Re: [PATCH 1/9] fs: add fcntl() interface for setting/getting write life time hints

2017-06-26 Thread Christoph Hellwig
Please document the userspace API (added linux-api and linux-man to CC for sugestions), especially including the odd effects of the per-inode settings. Also I would highly recommend to use different fcntl commands for the file vs inode hints to avoid any strange behavior.

Re: [PATCH 4/9] fs: add O_DIRECT support for sending down write life time hints

2017-06-26 Thread Christoph Hellwig
> @@ -385,6 +385,8 @@ dio_bio_alloc(struct dio *dio, struct dio_submit *sdio, > else > bio->bi_end_io = dio_bio_end_io; > > + bio->bi_opf |= write_hint_to_opf(iocb_write_hint(dio->iocb)); > + > sdio->bio = bio; > sdio->logical_offset_in_bio =

Re: [PATCH 7/9] xfs: add support for passing in write hints for buffered writes

2017-06-26 Thread Christoph Hellwig
> + ioend->io_bio->bi_opf |= > write_hint_to_opf(inode_write_hint(ioend->io_inode)); Too long line again. I think simply adding an inode_hint_to_opf() flag would make the various opencoded versions of the above call a little easier to read.

Re: move bounce limits settings into the drivers

2017-06-26 Thread Christoph Hellwig
ping? On Mon, Jun 19, 2017 at 09:26:18AM +0200, Christoph Hellwig wrote: > Currently we still default to a bounce all highmem setting for block > drivers. This series defaults to no bouncing and instead adds call > to blk_queue_bounce_limit to those drivers that need it. It also &g

[PATCH 1/3] blk-mq: include all present CPUs in the default queue mapping

2017-06-26 Thread Christoph Hellwig
This way we get a nice distribution independent of the current cpu online / offline state. Signed-off-by: Christoph Hellwig <h...@lst.de> --- block/blk-mq-cpumap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/block/blk-mq-cpumap.c b/block/blk-mq-cpumap.c

Re: [PATCH v7 16/22] block: convert to errseq_t based writeback error tracking

2017-06-24 Thread Christoph Hellwig
On Tue, Jun 20, 2017 at 01:44:44PM -0400, Jeff Layton wrote: > In order to query for errors with errseq_t, you need a previously- > sampled point from which to check. When you call > filemap_write_and_wait_range though you don't have a struct file and so > no previously-sampled value. So can we

Re: [PATCH] sd: add support for TCG OPAL self encrypting disks

2017-06-26 Thread Christoph Hellwig
ping? On Mon, Jun 19, 2017 at 02:26:46PM +0200, Christoph Hellwig wrote: > Just wire up the generic TCG OPAL infrastructure to the SCSI disk driver > and the Security In/Out commands. > > Note that I don't know of any actual SCSI disks that do support TCG OPAL, > but this is requ

Re: [PATCH 04/11] fs: add support for allowing applications to pass in write life time hints

2017-06-19 Thread Christoph Hellwig
On Mon, Jun 19, 2017 at 10:02:09AM -0600, Jens Axboe wrote: > Actually, one good use case is O_DIRECT on a block device. Since I'm > not a huge fan of having per-call hints that is only useful for a > single case, how about we add the hints to the struct file as well? > For buffered IO, just grab

Re: [PATCH 11/11] nvme: add support for streams and directives

2017-06-19 Thread Christoph Hellwig
On Mon, Jun 19, 2017 at 08:53:08AM -0600, Jens Axboe wrote: > Looking at it a bit more closely - there's a difference between > assigning X number of streams (allocating) for use by the subsystem or > per-ns, and having to manually open them. So I don't necessarily think > there's a problem here,

Re: [PATCH v7 16/22] block: convert to errseq_t based writeback error tracking

2017-06-27 Thread Christoph Hellwig
On Mon, Jun 26, 2017 at 10:34:18AM -0400, Jeff Layton wrote: > The bigger question is -- what about more complex filesystems like > ext4? There are a couple of cases where we can return -EIO or -EROFS on > fsync before filemap_write_and_wait_range is ever called. Like this one > for instance: >

Re: [PATCH 1/9] fs: add fcntl() interface for setting/getting write life time hints

2017-06-27 Thread Christoph Hellwig
On Tue, Jun 27, 2017 at 09:09:48AM -0600, Jens Axboe wrote: > On 06/27/2017 08:42 AM, Christoph Hellwig wrote: > > The API looks ok, but the code could use some cleanups. What do > > you think about the incremental patch below: > > > > It refactors various manipula

Re: [PATCH 3/9] blk-mq: expose write hints through debugfs

2017-06-27 Thread Christoph Hellwig
On Mon, Jun 26, 2017 at 09:37:54AM -0600, Jens Axboe wrote: > Useful to verify that things are working the way they should. > Reading the file will return number of kb written with each > write hint. Writing the file will reset the statistics. No care > is taken to ensure that we don't race on

[PATCH 2/7] genirq/affinity: assign vectors to all present CPUs

2017-05-19 Thread Christoph Hellwig
-by: Christoph Hellwig <h...@lst.de> --- kernel/irq/affinity.c | 43 --- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c index e2d356dd7581..414b0be64bfc 100644 --- a/kernel/irq/affinity.c

[PATCH 1/7] genirq: allow assigning affinity to present but not online CPUs

2017-05-19 Thread Christoph Hellwig
This will allow us to spread MSI/MSI-X affinity over all present CPUs and thus better deal with systems where cpus are take on and offline all the time. Signed-off-by: Christoph Hellwig <h...@lst.de> --- kernel/irq/manage.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

Re: dedicated error codes for the block layer

2017-05-19 Thread Christoph Hellwig
On Thu, May 18, 2017 at 04:55:08PM +0200, David Sterba wrote: > JFYI, the patches 13 and 15 are missing, not in linux-btrfs mailbox and > patchwork web. Does not look like a delay, maybe vger refused them > completely. They still haven't made it to linux-block and linux-btrfs, but they did make

[PATCH 6/7] blk-mq: create hctx for each present CPU

2017-05-19 Thread Christoph Hellwig
Currently we only create hctx for online CPUs, which can lead to a lot of churn due to frequent soft offline / online operations. Instead allocate one for each present CPU to avoid this and dramatically simplify the code. Signed-off-by: Christoph Hellwig <h...@lst.de> --- block/bl

[PATCH 7/7] nvme: allocate queues for all possible CPUs

2017-05-19 Thread Christoph Hellwig
Unlike most drіvers that simply pass the maximum possible vectors to pci_alloc_irq_vectors NVMe needs to configure the device before allocting the vectors, so it needs a manual update for the new scheme of using all present CPUs. Signed-off-by: Christoph Hellwig <h...@lst.de> --- driver

[PATCH 4/7] genirq/affinity: update CPU affinity for CPU hotplug events

2017-05-19 Thread Christoph Hellwig
Remove a CPU from the affinity mask when it goes offline and add it back when it returns. In case the vetor was assigned only to the CPU going offline it will be shutdown and re-started when the CPU reappears. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/x86/kernel/irq.c

[PATCH 5/7] blk-mq: include all present CPUs in the default queue mapping

2017-05-19 Thread Christoph Hellwig
This way we get a nice distribution independent of the current cpu online / offline state. Signed-off-by: Christoph Hellwig <h...@lst.de> --- block/blk-mq-cpumap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/block/blk-mq-cpumap.c b/block/blk-mq-cpumap.c

spread MSI(-X) vectors to all possible CPUs V2

2017-05-19 Thread Christoph Hellwig
Hi all, this series changes our automatic MSI-X vector assignment so that it takes all present CPUs into account instead of all online ones. This allows to better deal with cpu hotplug events, which could happen frequently due to power management for example. Changes since V1: - rebase to

[GIT PULL] nvme fixes for 4.12-rc2

2017-05-20 Thread Christoph Hellwig
Hi Jens, a few fixes for 4.12-rc2. There are a few more that we need to get into 4.12, but I'd rather get the current queue to you ASAP. The following changes since commit 56868a460b83c0f93d339256a81064d89aadae8e: Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide (2017-05-09

Re: [PATCH v3 0/3] nvme: fix hang in path of removing disk

2017-05-22 Thread Christoph Hellwig
Thanks Ming, I'll add the three patches to the nvme-4.12 queue, assuming Jens is okay with us queueing up the block path to remove blk_mq_abort_requeue_list.

[PATCH 07/15] block_dev: propagate bio_iov_iter_get_pages error in __blkdev_direct_IO

2017-05-18 Thread Christoph Hellwig
Once we move the block layer to its own status code we'll still want to propagate the bio_iov_iter_get_pages, so restructure __blkdev_direct_IO to take ret into account when returning the errno. --- fs/block_dev.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git

[PATCH 08/15] dm mpath: merge do_end_io_bio into multipath_end_io_bio

2017-05-18 Thread Christoph Hellwig
This simplifies the code and especially the error passing a bit and will help with the next patch. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/md/dm-mpath.c | 42 -- 1 file changed, 16 insertions(+), 26 deletions(-) diff --git a/driv

[PATCH 10/15] dm: change ->end_io calling convention

2017-05-18 Thread Christoph Hellwig
Turn the error paramter into a pointer so that target drivers can change the value, and make sure only DM_ENDIO_* values are returned from the methods. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/md/dm-cache-target.c | 4 ++-- drivers/md/dm-flakey.c| 8 d

[PATCH 06/15] fs: simplify dio_bio_complete

2017-05-18 Thread Christoph Hellwig
Only read bio->bi_error once in the common path. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/direct-io.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/direct-io.c b/fs/direct-io.c index 04247a6c3f73..bb711e4b86c2 100644 --- a/fs/direct-io.c

[PATCH 03/15] gfs2: remove the unused sd_log_error field

2017-05-18 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/gfs2/incore.h | 1 - fs/gfs2/lops.c | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index b7cf65d13561..aa3d44527fa2 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h @@

[PATCH 04/15] dm: fix REQ_RAHEAD handling

2017-05-18 Thread Christoph Hellwig
remove this special casing and ignore all additional error handling for REQ_RAHEAD - if this was a real underlying error we'd get a normal read once the real read comes in. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/md/dm-raid1.c | 4 ++-- drivers/md/dm-stripe.c | 2 +- 2

[PATCH 01/15] nvme-lightnvm: use blk_execute_rq in nvme_nvm_submit_user_cmd

2017-05-18 Thread Christoph Hellwig
Instead of reinventing it poorly. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Javier González <jav...@cnexlabs.com> --- drivers/nvme/host/lightnvm.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/nvme/host/lightnvm.c b/drive

dedicated error codes for the block layer

2017-05-18 Thread Christoph Hellwig
This series introduces a new blk_status_t error code type for the block layer so that we can have tigher control and explicit semantics for block layer errors. All but the last three patches are cleanups that lead to the new type. The series it mostly limited to the block layer and drivers, and

[PATCH 05/15] fs: remove the unused error argument to dio_end_io()

2017-05-18 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/btrfs/inode.c | 6 +++--- fs/direct-io.c | 3 +-- include/linux/fs.h | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 17cbe9306faf..758b2666885e 100644 --- a/fs

[PATCH 11/15] fs-writeback: move wbc_to_write_flags out of line

2017-05-18 Thread Christoph Hellwig
This way writeback.h doesn't need to pull in blk_types.h. Signed-off-by: Christoph Hellwig <h...@lst.de> --- fs/fs-writeback.c | 13 + include/linux/writeback.h | 11 +-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/fs/fs-writeback.c b

[PATCH 02/15] scsi/osd: don't save block errors into req_results

2017-05-18 Thread Christoph Hellwig
We will only have sense data if the command exectured and got a SCSI result, so this is pointless. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/scsi/osd/osd_initiator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/osd/osd_initiator.c b/d

[PATCH 12/15] block: merge blk_types.h into bio.h

2017-05-18 Thread Christoph Hellwig
We've cleaned up our headers sufficiently that we don't need this split anymore. Signed-off-by: Christoph Hellwig <h...@lst.de> --- block/blk-wbt.c| 2 +- drivers/target/target_core_pscsi.c | 2 +- include/linux/bio.h

<    6   7   8   9   10   11   12   13   14   15   >