[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 +++

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

[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

[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_scsi.c

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

2018-11-10 Thread Hannes Reinecke
On 11/9/18 7:32 PM, Christoph Hellwig wrote: > 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

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

2018-11-10 Thread Hannes Reinecke
On 11/9/18 7:32 PM, Christoph Hellwig wrote: > 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. > >

"kyber: add tracepoints" causes write beyond size of object

2018-11-10 Thread Jordan Glover
Hello, Commit 6c3b7af1c975b87b86dcb2af233d1ae21eb05107 ("kyber: add tracepoints")[1] causes write beyond size of object. This was detected by "FORTIFY_SOURCE intra-object overflow checking"[2] feature which is part of linux-hardened out-of-tree patchset designed to catch such errors. The

[PATCH 6/6] block: add polled wakeup task helper

2018-11-10 Thread Jens Axboe
If we're polling for IO on a device that doesn't use interrupts, then IO completion loop (and wake of task) is done by submitting task itself. If that is the case, then we don't need to enter the wake_up_process() function, we can simply mark ourselves as TASK_RUNNING. Signed-off-by: Jens Axboe

Re: remove most req->special users v2

2018-11-10 Thread Jens Axboe
On 11/10/18 1:30 AM, Christoph Hellwig wrote: > 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

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

2018-11-10 Thread Hannes Reinecke
On 11/9/18 7:32 PM, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > --- > drivers/block/paride/pd.c | 30 +- > 1 file changed, 25 insertions(+), 5 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke

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

2018-11-10 Thread Hannes Reinecke
On 11/9/18 7:32 PM, Christoph Hellwig wrote: > 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(-) >

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

2018-11-10 Thread Hannes Reinecke
On 11/9/18 7:32 PM, Christoph Hellwig wrote: > 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 +-- >

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

2018-11-10 Thread Hannes Reinecke
On 11/9/18 7:32 PM, Christoph Hellwig wrote: > 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 ++-- >

[PATCH 2/6] block: add queue_is_mq() helper

2018-11-10 Thread Jens Axboe
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. Signed-off-by: Jens Axboe --- block/blk-cgroup.c | 8 block/blk-core.c | 10 +- block/blk-flush.c | 3 +--

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

2018-11-10 Thread Jens Axboe
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. Signed-off-by: Jens Axboe --- block/blk-core.c | 8 +--

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

2018-11-10 Thread Jens Axboe
A polled queued doesn't trigger interrupts, so it's always safe to grab the queue lock without disabling interrupts. Cc: Keith Busch Cc: linux-n...@lists.infradead.org Signed-off-by: Jens Axboe --- drivers/nvme/host/pci.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-)

[PATCHSET 0/6] Various block optimizations

2018-11-10 Thread Jens Axboe
A mixed bag of optimizations that are now possible, on top of my for-4.21/block branch. block/blk-cgroup.c | 8 ++-- block/blk-core.c | 16 block/blk-flush.c | 3 +- block/blk-mq-debugfs.c | 2 +- block/blk-mq.c | 24 +--

[PATCH 4/6] block: avoid ordered task state change for polled IO

2018-11-10 Thread Jens Axboe
We only really need the barrier if we're going to be sleeping, if we're just polling we're fine with the __set_current_state() variant. Signed-off-by: Jens Axboe --- fs/block_dev.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/fs/block_dev.c

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

2018-11-10 Thread Jens Axboe
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 and the actual functions. Cc: Josef Bacik Signed-off-by: Jens Axboe