[GIT PULL] nvme fixes for 4.19

2018-09-28 Thread Christoph Hellwig
The following changes since commit b228ba1cb95afbaeeb86cf06cd9fd6f6369c3b14: null_blk: fix zoned support for non-rq based operation (2018-09-12 18:21:11 -0600) are available in the Git repository at: git://git.infradead.org/nvme.git nvme-4.19 for you to fetch changes up to bb830add192e9d83

[GIT PULL] nvme updates for 4.20

2018-10-05 Thread Christoph Hellwig
changes up to 2acf70ade79d26b97611a8df52eb22aa33814cd4: nvmet-rdma: use a private workqueue for delete (2018-10-05 09:25:18 +0200) Chaitanya Kulkarni (2): nvmet: remove redundant module prefix nvme-core: add async event trace helper Christo

[no subject]

2018-10-05 Thread Christoph Hellwig
module prefix nvme-core: add async event trace helper Christoph Hellwig (1): nvme: take node locality into account when selecting a path James Smart (3): nvmet_fc: support target port removal with nvmet layer nvme_fc: add 'nvme_discovery' sysfs attribute to fc transport

Re: [PATCH 12/17] blk-mq-sched: export way for drivers to insert request

2018-10-14 Thread Christoph Hellwig
On Thu, Oct 11, 2018 at 10:59:04AM -0600, Jens Axboe wrote: > We'll need this for the IDE conversion, which queues sense requests. Why can't the ide code use blk_execute_rq_nowait?

[PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-14 Thread Christoph Hellwig
There is no good reason to create a scatterlist in the ubd driver, it can just iterate the request directly. Signed-off-by: Christoph Hellwig --- Now that we have the blk-mq conversion something like the patch below should help to simplify the driver even further. arch/um/drivers/ubd_kern.c

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-15 Thread Christoph Hellwig
On Mon, Oct 15, 2018 at 10:40:06AM +0200, Richard Weinberger wrote: > hm, this breaks UML. > Every filesystem fails to mount. > > I did some very rough tests, it seems that the driver fails to read > data correctly as soon the upper layer tries to get more than 4096 bytes > at once out of the bloc

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-15 Thread Christoph Hellwig
onfused all tests. > But the removal of blk_rq_map_sg() still has issues. > Now the device blocks endless upon flush. I suspect we still need to special case flush. Updated patch below including your other suggestion: -- >From ddde6697dca1034f8c6e9b6a96305ba417123362 Mon Sep 17 00:00:00 20

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-16 Thread Christoph Hellwig
On Wed, Oct 17, 2018 at 12:43:14AM +0200, Richard Weinberger wrote: > On Mon, Oct 15, 2018 at 8:56 AM Christoph Hellwig wrote: > > > > There is no good reason to create a scatterlist in the ubd driver, > > it can just iterate the request directly. > > BTW:

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-16 Thread Christoph Hellwig
On Tue, Oct 16, 2018 at 08:26:31AM -0600, Jens Axboe wrote: > > Yes. Shall I send a patch with your suggestion or will you? > > Christoph should just fold it in, the bug only exists after his > change to it. Sorry, I missed what suggestion we had. Is that the patch form Jens earlier? > > > I h

[GIT PULL] nvme fix for 4.19

2018-10-16 Thread Christoph Hellwig
The following changes since commit 133424a207774d3d32a38d560c6469ed31c0472f: Merge branch 'nvme-4.19' of git://git.infradead.org/nvme into for-linus (2018-09-28 09:41:40 -0600) are available in the Git repository at: git://git.infradead.org/nvme.git nvme-4.19 for you to fetch changes up to

Re: [PATCH v2] block: fix rdma queue mapping

2018-10-17 Thread Christoph Hellwig
On Wed, Oct 03, 2018 at 02:05:16PM -0500, Steve Wise wrote: > Christoph, Sagi: it seems you think /proc/irq/$IRP/smp_affinity > shouldn't be allowed if drivers support managed affinity. Is that correct? Not just shouldn't, but simply can't. > But as it stands, things are just plain borked if an

Re: [PATCH v2] block: fix rdma queue mapping

2018-10-17 Thread Christoph Hellwig
On Mon, Oct 15, 2018 at 06:04:46PM -0700, Sagi Grimberg wrote: > Would you prefer we fallback to the naive mapping if the device is not > using manged affinity? Yes.

convert drivers/block to the generic DMA API

2018-10-18 Thread Christoph Hellwig
Switch all remaining users of the legacy PCI DMA API to the generic DMA API.

[PATCH 2/6] sx8: remove dead IF_64BIT_DMA_IS_POSSIBLE code

2018-10-18 Thread Christoph Hellwig
This code has effectively been commented out since the first commit, so remove it. Signed-off-by: Christoph Hellwig --- drivers/block/sx8.c | 29 + 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c index

[PATCH 6/6] mtip32xx: fully switch to the generic DMA API

2018-10-18 Thread Christoph Hellwig
The mtip32xx used an odd mix of the old PCI and the generic DMA API, so switch it over to the generic API entirely. Note that this also removes a weird fallback to just a 32-bit coherent dma mask if the 64-bit dma mask doesn't work, as that can't even happen. Signed-off-by: Christo

[PATCH 1/6] skd: switch to the generic DMA API

2018-10-18 Thread Christoph Hellwig
The PCI DMA API is deprecated, switch to the generic DMA API instead. Also make use of the dma_set_mask_and_coherent helper to easily set the streaming an coherent DMA masks together. Signed-off-by: Christoph Hellwig --- drivers/block/skd_main.c | 63 1

[PATCH 4/6] umem: switch to the generic DMA API

2018-10-18 Thread Christoph Hellwig
The PCI DMA API is deprecated, switch to the generic DMA API instead. Signed-off-by: Christoph Hellwig --- drivers/block/umem.c | 38 ++ 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/drivers/block/umem.c b/drivers/block/umem.c index

[PATCH 5/6] rsxx: switch to the generic DMA API

2018-10-18 Thread Christoph Hellwig
The PCI DMA API is deprecated, switch to the generic DMA API instead. Signed-off-by: Christoph Hellwig --- drivers/block/rsxx/core.c | 2 +- drivers/block/rsxx/dma.c | 52 +++ 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/block

[PATCH 3/6] sx8: switch to the generic DMA API

2018-10-18 Thread Christoph Hellwig
The PCI DMA API is deprecated, switch to the generic DMA API instead. Signed-off-by: Christoph Hellwig --- drivers/block/sx8.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c index 377c17e106c3

Re: [PATCH 0/5] block: introduce helpers for allocating io buffer from slab

2018-10-18 Thread Christoph Hellwig
On Thu, Oct 18, 2018 at 07:03:42AM -0700, Matthew Wilcox wrote: > Before we go down this road, could we have a discussion about what > hardware actually requires this? Storage has this weird assumption that > I/Os must be at least 512 byte aligned in memory, and I don't know where > this idea come

Re: [PATCH 1/5] block: warn on un-aligned DMA IO buffer

2018-10-18 Thread Christoph Hellwig
et_max_io_size(q, bio); > > bio_for_each_segment(bv, bio, iter) { > + WARN_ON_ONCE(queue_dma_alignment(q) & bv.bv_offset); I'd write this the other way around, although I have no good argument for that. Otherwise this looks fine: Reviewed-by: Christoph Hellwig

Re: [PATCH 2/5] block: move .dma_alignment into q->limits

2018-10-18 Thread Christoph Hellwig
e > adding to bio. > > So this patch moves .dma_alignment into q->limits and prepares for > making it as one stacked limit. Looks fine: Reviewed-by: Christoph Hellwig

Re: [PATCH 3/5] block: make dma_alignment as stacked limit

2018-10-18 Thread Christoph Hellwig
t; Cc: Linux FS Devel > Cc: Darrick J. Wong > Cc: x...@vger.kernel.org > Cc: Dave Chinner > Cc: Christoph Hellwig > Cc: Bart Van Assche > Cc: Matthew Wilcox > Signed-off-by: Ming Lei > --- > block/blk-settings.c | 89 > +

Re: [PATCH 4/5] block: introduce helpers for allocating IO buffers from slab

2018-10-18 Thread Christoph Hellwig
This all seems quite complicated. I think the interface we'd want is more one that has a little cache of a single page in the queue, and a little bitmap which sub-page size blocks of it are used. Something like (pseudo code minus locking): void *blk_alloc_sector_buffer(struct block_device *bdev,

Re: [PATCH 1/5] block: warn on un-aligned DMA IO buffer

2018-10-18 Thread Christoph Hellwig
On Thu, Oct 18, 2018 at 08:27:28AM -0600, Jens Axboe wrote: > On 10/18/18 7:18 AM, Ming Lei wrote: > > Now we only check if DMA IO buffer is aligned to queue_dma_alignment() > > for pass-through request, and it isn't done for normal IO request. > > > > Given the check has to be done on each bvec,

Re: [PATCH 0/5] block: introduce helpers for allocating io buffer from slab

2018-10-18 Thread Christoph Hellwig
On Thu, Oct 18, 2018 at 08:06:05AM -0700, Matthew Wilcox wrote: > Can you name one that does require 512-byte alignment, preferably still > in use? Or even >4-byte alignment. I just checked AHCI and that requires > only 2-byte alignment. Xen-blkfront, rsxx, various SD/MMC card readers for exampl

Re: [PATCH 4/5] block: introduce helpers for allocating IO buffers from slab

2018-10-18 Thread Christoph Hellwig
On Thu, Oct 18, 2018 at 08:11:23AM -0700, Matthew Wilcox wrote: > On Thu, Oct 18, 2018 at 04:42:07PM +0200, Christoph Hellwig wrote: > > This all seems quite complicated. > > > > I think the interface we'd want is more one that has a little > > cache of a single

[GIT PULL] nvme updates for Linux 4.20

2018-10-19 Thread Christoph Hellwig
The second batch of updates for Linux 4.20: - lot of fixes for issues found by static type checkers from Bart - two small fixes from Keith - fabrics cleanups in preparation of the TCP transport from Sagi - more cleanups from Chaitanya The following changes since commit 0585b75437d335c6580066c1

Submit Proposals to the 2019 Linux Storage and Filesystems Conference!

2018-10-25 Thread Christoph Hellwig
topics of interest, and submission instructions. View the Vault '19 Call for Participation: https://www.usenix.org/conference/vault19/call-for-participation We look forward to receiving your proposals! Christoph Hellwig Erik Riedel Ric Wheeler, Red Hat vault19cha...@usenix.org

Re: [PATCH 1/3] block: make sure discard bio is aligned with logical block size

2018-10-26 Thread Christoph Hellwig
> if (req_sects > UINT_MAX >> 9) > - req_sects = UINT_MAX >> 9; > + req_sects = (UINT_MAX >> 9) & ~bs_mask; Given that we have this same thing duplicated in write zeroes what about a documented helper?

Re: [PATCH 2/3] block: cleanup __blkdev_issue_discard()

2018-10-26 Thread Christoph Hellwig
On Fri, Oct 26, 2018 at 02:24:34PM +0800, Ming Lei wrote: > Cleanup __blkdev_issue_discard(). It would help to explain what you clean up.. > + unsigned int req_sects = min(nr_sects, (UINT_MAX >> 9) & > ~bs_mask); This creates an overly long line.

Re: [PATCH 1/3] block: make sure discard bio is aligned with logical block size

2018-10-28 Thread Christoph Hellwig
On Sun, Oct 28, 2018 at 08:51:31AM +0800, Ming Lei wrote: > On Fri, Oct 26, 2018 at 09:44:15AM +0200, Christoph Hellwig wrote: > > > if (req_sects > UINT_MAX >> 9) > > > - req_sects = UINT_MAX >> 9; > > > +

Re: [PATCH 01/14] blk-mq: kill q->mq_map

2018-10-28 Thread Christoph Hellwig
et; > + > + return q->queue_hw_ctx[set->mq_map[cpu]]; Nitpick: this would be a little more readable without the local set variable: return q->queue_hw_ctx[q->tag_set->mq_map[cpu]]; Otherwise this looks good to me: Reviewed-by: Christoph Hellwig

[GIT PULL] nvme fixes for 4.20

2018-11-01 Thread Christoph Hellwig
The following changes since commit a5185607787e030fcb0009194d3b12f8bcca59d6: block: brd: associate with queue until adding disk (2018-10-31 08:43:09 -0600) are available in the Git repository at: git://git.infradead.org/nvme.git nvme-4.20 for you to fetch changes up to ae172db3b3f389c363ec7

[GIT PULL] nvme fixes for 4.20

2018-11-08 Thread Christoph Hellwig
09:27:22 +0100) ---- Christoph Hellwig (1): Revert "nvmet-rdma: use a private workqueue for delete" Sagi Grimberg (2): nvmet: don't try to add ns to p2p map unless it actually uses it nvme: make sure ns head inherits underlying device lim

Re: [GIT PULL] nvme fixes for 4.20

2018-11-09 Thread Christoph Hellwig
On Fri, Nov 09, 2018 at 06:16:09AM -0700, Jens Axboe wrote: > On 11/8/18 11:56 PM, Christoph Hellwig wrote: > > - revert an RDMA commit that didn't help but caused problems > > - fix another minor P2P fallout > > - make sure the multipath device inherits the de

[PATCH 4/9] mtip32xx: remove __force_bit2int

2018-11-09 Thread Christoph Hellwig
There is no good excuse not to use proper __le16/32 types. Signed-off-by: Christoph Hellwig --- drivers/block/mtip32xx/mtip32xx.c | 33 --- drivers/block/mtip32xx/mtip32xx.h | 28 -- 2 files changed, 26 insertions(+), 35 deletions(-) diff

mtip32xx: fixes and cleanups

2018-11-09 Thread Christoph Hellwig
Various low hanging fruit, kicked of by seeing one of the few remaining req->special users. Compile tested only.

[PATCH 3/9] mtip32xx: return a blk_status_t from mtip_send_trim

2018-11-09 Thread Christoph Hellwig
This allows for better error propagation and simpler code. Signed-off-by: Christoph Hellwig --- drivers/block/mtip32xx/mtip32xx.c | 30 +++--- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx

[PATCH 2/9] mtip32xx: merge mtip_submit_request into mtip_queue_rq

2018-11-09 Thread Christoph Hellwig
blk_mq_start_request closer to the actual issue to hardware. Signed-off-by: Christoph Hellwig --- drivers/block/mtip32xx/mtip32xx.c | 78 +++ 1 file changed, 28 insertions(+), 50 deletions(-) diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c

[PATCH 6/9] mtip32xx: remove mtip_init_cmd_header

2018-11-09 Thread Christoph Hellwig
There isn't much need for this helper - we can just calculate the offset for the command header once late in the submission path and fill out the ctba and ctbau fields there. Signed-off-by: Christoph Hellwig --- drivers/block/mtip32xx/mtip32xx.c | 44 +++ dr

[PATCH 1/9] mtip32xx: move the blk_rq_map_sg call to mtip_hw_submit_io

2018-11-09 Thread Christoph Hellwig
We have all arguments at hand in mtip_hw_submit_io, so keep the rq to sg mapping close to the dma_map_sg call. Signed-off-by: Christoph Hellwig --- drivers/block/mtip32xx/mtip32xx.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/block/mtip32xx/mtip32xx.c

[PATCH 5/9] mtip32xx: add missing endianess annotations on struct smart_attr

2018-11-09 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/block/mtip32xx/mtip32xx.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/mtip32xx/mtip32xx.h b/drivers/block/mtip32xx/mtip32xx.h index 0aa1ea210822..e8b4b3d5365a 100644 --- a/drivers/block/mtip32xx/mtip32xx.h

[PATCH 8/9] mtip32xx: don't use req->special

2018-11-09 Thread Christoph Hellwig
Instead create add to the icmd into struct mtip_cmd which can be unioned with the scatterlist used for the normal I/O path. Signed-off-by: Christoph Hellwig --- drivers/block/mtip32xx/mtip32xx.c | 5 ++--- drivers/block/mtip32xx/mtip32xx.h | 7 ++- 2 files changed, 8 insertions(+), 4

[PATCH 9/9] mtip32xxx: use for_each_sg

2018-11-09 Thread Christoph Hellwig
Use the proper helper instead of manually iterating the scatterlist, which is broken in the presence of chained S/G lists. Signed-off-by: Christoph Hellwig --- drivers/block/mtip32xx/mtip32xx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/block/mtip32xx

[PATCH 7/9] mtip32xx: remove mtip_get_int_command

2018-11-09 Thread Christoph Hellwig
Merging this function into the only callers makes the code flow easier. Signed-off-by: Christoph Hellwig --- drivers/block/mtip32xx/mtip32xx.c | 24 +++- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block

sx8: make full use of blk-mq

2018-11-09 Thread Christoph Hellwig
sx8 uses multiple request_queues per host, with host-wide tags, making it a prime candidate for using the blk-mq tag_set as originally intended. Compile tested only.

[PATCH 2/2] sx8: use a per-host tag_set

2018-11-09 Thread Christoph Hellwig
The current sx8 code spends a lot of effort dealing with the fact that tags are per-host, but there might be multiple queues. Now that the driver has been converted to blk-mq it can take care of the blk-mq tag_set concept that has been designed just for that. Signed-off-by: Christoph Hellwig

[PATCH 1/2] sx8: cleanup queue and disk allocation / freeing

2018-11-09 Thread Christoph Hellwig
Make the disk/queue alloc and free helpers per-port by moving the trivial loops into the callers. Signed-off-by: Christoph Hellwig --- drivers/block/sx8.c | 107 1 file changed, 48 insertions(+), 59 deletions(-) diff --git a/drivers/block/sx8.c b

remove most req->special users

2018-11-09 Thread Christoph Hellwig
Try to get rid of the req->special users so that we can remove this field. With this series we basically only have the osd / scsi BIDI code left, which should go away in another series. Note that the first one is a bug fix for the blk-mq conversion series, I don't think the current fnic code can

[PATCH 1/6] fnic: fix fnic_scsi_host_{start,end}_tag

2018-11-09 Thread Christoph Hellwig
They way these functions abuse ->special to try to store the dummy request looks completely broken, given that it actually stores the original scsi command. Instead switch to ->host_scribble and store the actual dummy command. Signed-off-by: Christoph Hellwig --- drivers/scsi/fnic/fnic_

[PATCH 2/6] nullb: remove leftover legacy request code

2018-11-09 Thread Christoph Hellwig
null_softirq_done_fn is only used for the blk-mq path, so remove the other branch. Also rename the function to better match the method name. Signed-off-by: Christoph Hellwig --- drivers/block/null_blk_main.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers

[PATCH 3/6] skd_main: don't use req->special

2018-11-09 Thread Christoph Hellwig
Add a retries field to the internal request structure instead, which gets set to zero on the first submission. Signed-off-by: Christoph Hellwig --- drivers/block/skd_main.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/block/skd_main.c b/drivers/block

[PATCH 4/6] aoe: replace ->special use with private data in the request

2018-11-09 Thread Christoph Hellwig
Makes the code a whole lot better to read.. Signed-off-by: Christoph Hellwig --- drivers/block/aoe/aoe.h| 4 drivers/block/aoe/aoeblk.c | 1 + drivers/block/aoe/aoecmd.c | 27 +-- drivers/block/aoe/aoedev.c | 11 ++- 4 files changed, 20 insertions

[PATCH 5/6] pd: replace ->special use with private data in the request

2018-11-09 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/block/paride/pd.c | 30 +- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c index ae4971e5d9a8..0ff9b12d0e35 100644 --- a/drivers/block/paride/pd.c +++ b

[PATCH 6/6] ide: don't use req->special

2018-11-09 Thread Christoph Hellwig
Just replace it with a field of the same name in struct ide_req. Signed-off-by: Christoph Hellwig --- drivers/ide/ide-atapi.c| 4 ++-- drivers/ide/ide-cd.c | 4 ++-- drivers/ide/ide-devsets.c | 4 ++-- drivers/ide/ide-disk.c | 6 +++--- drivers/ide/ide-eh.c | 2

[PATCH] block: remove req->timeout_list

2018-11-09 Thread Christoph Hellwig
Unused now that the legacy request path is gone. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 1 - block/blk-mq.c | 1 - block/blk-timeout.c| 12 block/blk.h| 2 -- include/linux/blkdev.h | 2 -- 5 files changed, 18 deletions(-) diff

remove most req->special users v2

2018-11-10 Thread Christoph Hellwig
Try to get rid of the req->special users so that we can remove this field. With this series we basically only have the osd / scsi BIDI code left, which should go away in another series. Note that the first one is a bug fix for the blk-mq conversion series, I don't think the current fnic code can

[PATCH 4/6] aoe: replace ->special use with private data in the request

2018-11-10 Thread Christoph Hellwig
Makes the code a whole lot better to read.. Signed-off-by: Christoph Hellwig --- drivers/block/aoe/aoe.h| 4 drivers/block/aoe/aoeblk.c | 1 + drivers/block/aoe/aoecmd.c | 27 +-- drivers/block/aoe/aoedev.c | 11 ++- 4 files changed, 20 insertions

[PATCH 3/6] skd_main: don't use req->special

2018-11-10 Thread Christoph Hellwig
Add a retries field to the internal request structure instead, which gets set to zero on the first submission. Signed-off-by: Christoph Hellwig --- drivers/block/skd_main.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/block/skd_main.c b/drivers/block

[PATCH 2/6] nullb: remove leftover legacy request code

2018-11-10 Thread Christoph Hellwig
null_softirq_done_fn is only used for the blk-mq path, so remove the other branch. Also rename the function to better match the method name. Signed-off-by: Christoph Hellwig --- drivers/block/null_blk_main.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers

[PATCH 1/6] fnic: fix fnic_scsi_host_{start,end}_tag

2018-11-10 Thread Christoph Hellwig
They way these functions abuse ->special to try to store the dummy request looks completely broken, given that it actually stores the original scsi command. Instead switch to ->host_scribble and store the actual dummy command. Signed-off-by: Christoph Hellwig --- drivers/scsi/fnic/fnic_

[PATCH 6/6] ide: don't use req->special

2018-11-10 Thread Christoph Hellwig
Just replace it with a field of the same name in struct ide_req. Signed-off-by: Christoph Hellwig --- drivers/ide/ide-atapi.c| 4 ++-- drivers/ide/ide-cd.c | 4 ++-- drivers/ide/ide-devsets.c | 4 ++-- drivers/ide/ide-disk.c | 6 +++--- drivers/ide/ide-eh.c | 2

[PATCH 5/6] pd: replace ->special use with private data in the request

2018-11-10 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/block/paride/pd.c | 30 +- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c index ae4971e5d9a8..0ff9b12d0e35 100644 --- a/drivers/block/paride/pd.c +++ b

Re: [PATCH 1/6] nvme: don't disable local ints for polled queue

2018-11-14 Thread Christoph Hellwig
> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c > index 6aa86dfcb32c..a6e3fbddfadf 100644 > --- a/drivers/nvme/host/pci.c > +++ b/drivers/nvme/host/pci.c > @@ -1061,15 +1061,26 @@ static irqreturn_t nvme_irq_check(int irq, void *data) > > static int __nvme_poll(struct nvme_queue

Re: [PATCH 3/6] blk-mq: embed blk_mq_ops directly in the request queue

2018-11-14 Thread Christoph Hellwig
On Sat, Nov 10, 2018 at 08:13:14AM -0700, Jens Axboe wrote: > This saves an indirect function call everytime we have to > call one of the strategy functions. We keep it const, and just > hack around that a bit in blk_mq_init_allocated_queue(), which > is where we copy the ops in. What amount of di

Re: [PATCH 5/6] blk-rq-qos: inline check for q->rq_qos functions

2018-11-14 Thread Christoph Hellwig
On Sat, Nov 10, 2018 at 08:13:16AM -0700, Jens Axboe wrote: > Put the short code in the fast path, where we don't have any > functions attached to the queue. This minimizes the impact on > the hot path in the core code. > > Cleanup duplicated code by having a macro setup both the inline > check an

Re: [PATCH 02/11] block: add queue_is_mq() helper

2018-11-14 Thread Christoph Hellwig
On Tue, Nov 13, 2018 at 08:42:24AM -0700, Jens Axboe wrote: > Various spots check for q->mq_ops being non-NULL, but provide > a helper to do this instead. > > Where the ->mq_ops != NULL check is redundant, remove it. With the legacy request path gone this isn't really any different from queue_is_

Re: [PATCH 3/6] blk-mq: embed blk_mq_ops directly in the request queue

2018-11-14 Thread Christoph Hellwig
On Wed, Nov 14, 2018 at 08:33:06AM -0700, Jens Axboe wrote: > It's measurable. It doesn't defeat the const at all, the mq_ops > is still const and is never modified outside of when the queue > is allocated. The only difference is of course that it is no > longer residing in a read only mapped secti

Re: [PATCH 5/6] blk-rq-qos: inline check for q->rq_qos functions

2018-11-14 Thread Christoph Hellwig
On Wed, Nov 14, 2018 at 08:33:33AM -0700, Jens Axboe wrote: > > The inlining sounds fine, but please do it without the obsfucating > > macros. > > Why? It's a lot of code duplication. Just source code, not binary code. And remember that humans want to understand this code by grepping it, finding

Re: [PATCH 3/6] blk-mq: embed blk_mq_ops directly in the request queue

2018-11-14 Thread Christoph Hellwig
On Wed, Nov 14, 2018 at 08:47:58AM -0700, Jens Axboe wrote: > Are we really worried about this as an attack surface? I get it > for other types of ops, but for mq_ops, I'd be more worried about > callers changing it inadvertently, and they still can't do that. It isn't quite as bad as for thing li

[PATCH 02/16] block: remove deadline __deadline manipulation helpers

2018-11-14 Thread Christoph Hellwig
other threads. Signed-off-by: Christoph Hellwig --- block/blk-mq.c | 4 ++-- block/blk-timeout.c| 8 +--- block/blk.h| 35 --- include/linux/blkdev.h | 4 +--- 4 files changed, 8 insertions(+), 43 deletions(-) diff --git a/block/blk-m

remove more legacy request leftover

2018-11-14 Thread Christoph Hellwig
Hi Jens, this series removes another bunch of legacy request leftovers, including the pointer indirection for the queue_lock. Note that we have very few queue_lock users left, I wonder if we should get rid of it entirely and have separate locks for the cgroup and I/O scheduler code, which are the

[PATCH 01/16] block: remove QUEUE_FLAG_BYPASS and ->bypass

2018-11-14 Thread Christoph Hellwig
Unused since the removal of the legacy request code. Signed-off-by: Christoph Hellwig --- block/blk-cgroup.c | 15 --- block/blk-core.c | 21 - block/blk-mq-debugfs.c | 1 - block/blk-throttle.c | 3 --- include/linux/blk-cgroup.h

[PATCH 03/16] block: don't hold the queue_lock over blk_abort_request

2018-11-14 Thread Christoph Hellwig
There is nothing it could synchronize against, so don't go through the pains of acquiring the lock. Signed-off-by: Christoph Hellwig --- block/blk-timeout.c | 2 +- drivers/ata/libata-eh.c | 4 drivers/block/mtip32xx/mtip32xx.c | 5 + drivers

[PATCH 04/16] block: use atomic bitops for ->queue_flags

2018-11-14 Thread Christoph Hellwig
->queue_flags is generally not set or cleared in the fast path, and also generally set or cleared one flag at a time. Make use of the normal atomic bitops for it so that we don't need to take the queue_lock, which is otherwise mostly unused in the core block layer now. Signed-off-by: C

[PATCH 05/16] block: remove queue_lockdep_assert_held

2018-11-14 Thread Christoph Hellwig
The only remaining user unconditionally drops and reacquires the lock, which means we really don't need any additional (conditional) annotation. Signed-off-by: Christoph Hellwig --- block/blk-throttle.c | 1 - block/blk.h | 13 - 2 files changed, 14 deletions(-)

[PATCH 07/16] block: update a few comments for the legacy request removal

2018-11-14 Thread Christoph Hellwig
Only the mq locking is left in the flush state machine. Signed-off-by: Christoph Hellwig --- block/blk-flush.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/blk-flush.c b/block/blk-flush.c index c53197dcdd70..fcd18b158fd6 100644 --- a/block/blk-flush.c +++ b

[PATCH 06/16] block-iolatency: remove the unused lock argument to rq_qos_throttle

2018-11-14 Thread Christoph Hellwig
Unused now that the legacy request path is gone. Signed-off-by: Christoph Hellwig --- block/blk-iolatency.c | 24 ++-- block/blk-mq.c| 2 +- block/blk-rq-qos.c| 5 ++--- block/blk-rq-qos.h| 4 ++-- block/blk-wbt.c | 16 5 files

[PATCH 08/16] block: remove a few unused exports

2018-11-14 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- block/blk-cgroup.c | 6 -- block/blk-ioc.c | 3 --- block/blk-mq-sysfs.c | 1 - block/blk-softirq.c | 1 - block/blk-stat.c | 4 block/blk-wbt.c | 2 -- 6 files changed, 17 deletions(-) diff --git a/block/blk-cgroup.c b/block/blk

[PATCH 10/16] blk-cgroup: move locking into blkg_destroy_all

2018-11-14 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- block/blk-cgroup.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 717ab38a6c67..3ba23b9bfeb9 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -349,8 +349,7 @@ static void

[PATCH 09/16] blk-cgroup: consolidate error handling in blkcg_init_queue

2018-11-14 Thread Christoph Hellwig
Use a goto label to merge two identical pieces of error handling code. Signed-off-by: Christoph Hellwig --- block/blk-cgroup.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 3296c0b7353a..717ab38a6c67

[PATCH 11/16] drbd: don't override the queue_lock

2018-11-14 Thread Christoph Hellwig
The DRBD req_lock and block layer queue_lock are used for entirely different resources. Stop using the req_lock as the block layer queue_lock. Signed-off-by: Christoph Hellwig --- drivers/block/drbd/drbd_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block

[PATCH 13/16] mmc: simplify queue initialization

2018-11-14 Thread Christoph Hellwig
Merge three functions initializing the queue into a single one, and drop an unused argument for it. Signed-off-by: Christoph Hellwig --- drivers/mmc/core/block.c | 2 +- drivers/mmc/core/queue.c | 86 ++-- drivers/mmc/core/queue.h | 3 +- 3 files changed

[PATCH 12/16] umem: don't override the queue_lock

2018-11-14 Thread Christoph Hellwig
The umem card->lock and the block layer queue_lock are used for entirely different resources. Stop using card->lock as the block layer queue_lock. Signed-off-by: Christoph Hellwig --- drivers/block/umem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers

[PATCH 14/16] mmc: stop abusing the request queue_lock pointer

2018-11-14 Thread Christoph Hellwig
arate from the mmc use. Signed-off-by: Christoph Hellwig --- drivers/mmc/core/block.c | 22 ++ drivers/mmc/core/queue.c | 26 +- drivers/mmc/core/queue.h | 1 + 3 files changed, 24 insertions(+), 25 deletions(-) diff --git a/drivers/mmc/core/bloc

[PATCH 15/16] block: remove the lock argument to blk_alloc_queue_node

2018-11-14 Thread Christoph Hellwig
With the legacy request path gone there is no real need to override the queue_lock. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 16 +++- block/blk-mq.c | 2 +- drivers/block/drbd/drbd_main.c | 2 +- drivers/block/null_blk_main.c | 3

[PATCH 16/16] block: remove the queue_lock indirection

2018-11-14 Thread Christoph Hellwig
With the legacy request path gone there is no good reason to keep queue_lock as a pointer, we can always use the embedded lock now. Signed-off-by: Christoph Hellwig --- block/bfq-cgroup.c | 2 +- block/bfq-iosched.c | 16 +-- block/blk-cgroup.c | 60

Re: [PATCH 13/16] mmc: simplify queue initialization

2018-11-15 Thread Christoph Hellwig
On Wed, Nov 14, 2018 at 06:31:45PM +0100, Ulf Hansson wrote: > > + * @subname: partition subname > > Drop subname :-) Fixed.

Re: [PATCH 14/16] mmc: stop abusing the request queue_lock pointer

2018-11-15 Thread Christoph Hellwig
On Wed, Nov 14, 2018 at 06:56:41PM +0100, Ulf Hansson wrote: > > } else { > > @@ -397,6 +397,7 @@ int mmc_init_queue(struct mmc_queue *mq, struct > > mmc_card *card, > > int ret; > > > > mq->card = card; > > + mq->lock = lock; > > Unless I am mistaken, it seems like

Re: [PATCH 04/16] block: use atomic bitops for ->queue_flags

2018-11-15 Thread Christoph Hellwig
On Thu, Nov 15, 2018 at 07:55:02AM +0100, Hannes Reinecke wrote: >> Signed-off-by: Christoph Hellwig >> --- >> block/blk-core.c | 54 ++-- >> block/blk-mq.c | 2 +- >> block/blk-settings.c | 10 +++- &g

[PATCH] block: remove the rq_alloc_data request_queue field

2018-11-15 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- include/linux/blkdev.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 1d185f1fc333..5c5ef461845f 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -567,7 +567,6 @@ struct

queue_lock fixups

2018-11-16 Thread Christoph Hellwig
Hi Jens, a few fixups for the queue_lock conversion, drop a few more bogus queue_lock uses in drivers, and clean up the mmc use of the queue_lock as suggested by Ulf.

[PATCH 1/6] block: remove the rq_alloc_data request_queue field

2018-11-16 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- include/linux/blkdev.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 1d185f1fc333..5c5ef461845f 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -567,7 +567,6 @@ struct

[PATCH 4/6] ide: don't acquire queue lock in ide_pm_execute_rq

2018-11-16 Thread Christoph Hellwig
There is nothing we can synchronize against over a call to blk_queue_dying. Signed-off-by: Christoph Hellwig --- drivers/ide/ide-pm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/ide/ide-pm.c b/drivers/ide/ide-pm.c index 51fe10ac02fa..56690f523100 100644 --- a/drivers/ide/ide

[PATCH 3/6] pktcdvd: remove queue_lock around blk_queue_max_hw_sectors

2018-11-16 Thread Christoph Hellwig
blk_queue_max_hw_sectors can't do anything with queue_lock protection so don't hold it. Signed-off-by: Christoph Hellwig --- drivers/block/pktcdvd.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 4adf4c8861cd..f5a71023f

[PATCH 5/6] ide: don't acquire queue_lock in ide_complete_pm_rq

2018-11-16 Thread Christoph Hellwig
blk_mq_stop_hw_queues doesn't need any locking, and the ide dev_flags field isn't protected by it either. Signed-off-by: Christoph Hellwig --- drivers/ide/ide-pm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/ide/ide-pm.c b/drivers/ide/ide-pm.c index 56690f523100..19

[PATCH 2/6] floppy: remove queue_lock around floppy_end_request

2018-11-16 Thread Christoph Hellwig
There is nothing the queue_lock could protect inside floppy_end_request, so remove it. Signed-off-by: Christoph Hellwig --- drivers/block/floppy.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index eeb4be8d000b..218099dd8e44 100644

[PATCH 6/6] mmc: stop abusing the request queue_lock pointer

2018-11-16 Thread Christoph Hellwig
Replace the lock in mmc_blk_data that is only used through a pointer in struct mmc_queue and to protect fields in that structure with an actual lock in struct mmc_queue. Suggested-by: Ulf Hansson Signed-off-by: Christoph Hellwig --- drivers/mmc/core/block.c | 24

Re: [PATCH] block: fix 32 bit overflow in __blkdev_issue_discard()

2018-11-16 Thread Christoph Hellwig
On Fri, Nov 16, 2018 at 03:04:57PM +1100, Dave Chinner wrote: > They don't run on my test machines because they require a modular > kernel and I run a monolithic kernel specified externally by the > qemu command line on all my test VMs. > > generic/349 [not run] scsi_debug module not found > g

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