Re: [PATCH] floppy: fix race condition in __floppy_read_block_0()

2018-11-09 Thread Omar Sandoval
On Fri, Nov 09, 2018 at 03:58:40PM -0700, Jens Axboe wrote: > LKP recently reported a hang at bootup in the floppy code: > > [ 245.678853] INFO: task mount:580 blocked for more than 120 seconds. > [ 245.679906] Tainted: GT 4.19.0-rc6-00172-ga9f38e1 #1 > [ 245.680959]

Re: [PATCH -next] block: remove set but not used variable 'et'

2018-11-09 Thread Jens Axboe
On 11/9/18 7:41 PM, YueHaibing wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > block/blk-ioc.c: In function 'put_io_context_active': > block/blk-ioc.c:174:24: warning: > variable 'et' set but not used [-Wunused-but-set-variable] > > It not used any more after commit > a1ce35fa4985

[PATCH -next] block: remove set but not used variable 'et'

2018-11-09 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: block/blk-ioc.c: In function 'put_io_context_active': block/blk-ioc.c:174:24: warning: variable 'et' set but not used [-Wunused-but-set-variable] It not used any more after commit a1ce35fa4985 ("block: remove dead elevator code") Signed-off-by:

[PATCH] floppy: fix race condition in __floppy_read_block_0()

2018-11-09 Thread Jens Axboe
LKP recently reported a hang at bootup in the floppy code: [ 245.678853] INFO: task mount:580 blocked for more than 120 seconds. [ 245.679906] Tainted: GT 4.19.0-rc6-00172-ga9f38e1 #1 [ 245.680959] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.

Re: remove most req->special users

2018-11-09 Thread Jens Axboe
On 11/9/18 11:32 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. Outside of the typo in skd_main that Bart pointed out, the

Re: [GIT PULL] Block fixes for 4.20-rc2

2018-11-09 Thread Jens Axboe
On 11/9/18 3:35 PM, Linus Torvalds wrote: > On Fri, Nov 9, 2018 at 1:29 PM Jens Axboe wrote: >> >> A select set of fixes that should go into this release. This pull >> request contains: > > This is part of a final few "ack" emails, pointing out that there is > now automation in place if you cc

Re: [GIT PULL] Block fixes for 4.20-rc2

2018-11-09 Thread Linus Torvalds
On Fri, Nov 9, 2018 at 1:29 PM Jens Axboe wrote: > > A select set of fixes that should go into this release. This pull > request contains: This is part of a final few "ack" emails, pointing out that there is now automation in place if you cc lkml in your pull request. That automation will parse

[GIT PULL] Block fixes for 4.20-rc2

2018-11-09 Thread Jens Axboe
) - Preemptively clear memory we are going to pass to userspace, in case the driver does a short read (Keith) Please pull! git://git.kernel.dk/linux-block.git tags/for-linus-20181109 Anton Ivanov (1): ubd: fix missing

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

2018-11-09 Thread Bart Van Assche
On 11/9/18 10:32 AM, 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(-) diff --git

Re: [PATCH] block: remove req->timeout_list

2018-11-09 Thread Jens Axboe
On 11/9/18 11:37 AM, Christoph Hellwig wrote: > Unused now that the legacy request path is gone. Great, missed that. Applied, thanks. -- Jens Axboe

[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

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

[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

[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

[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(+),

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

Re: [GIT PULL] nvme fixes for 4.20

2018-11-09 Thread Jens Axboe
On 11/9/18 10:10 AM, Sagi Grimberg wrote: > >>> That is because your for-linus was still 4.20-rc based when >>> I created it. >> >> It's never been 4.20-rc based. After the initial merge, it got based >> on a random commit in the merge window: >> >> commit 3acbd2de6bc3af215c6ed7732dfc097d1e238503

Re: [GIT PULL] nvme fixes for 4.20

2018-11-09 Thread Sagi Grimberg
That is because your for-linus was still 4.20-rc based when I created it. It's never been 4.20-rc based. After the initial merge, it got based on a random commit in the merge window: commit 3acbd2de6bc3af215c6ed7732dfc097d1e238503 Merge: d49f8a52b15b de7d83da84bd Author: Linus Torvalds

Re: mtip32xx: fixes and cleanups

2018-11-09 Thread Jens Axboe
On 11/9/18 6:48 AM, Christoph Hellwig wrote: > Various low hanging fruit, kicked of by seeing one of the few remaining > req->special users. > > Compile tested only. Looks good to me - as it so happens, I do have a few of these cards. Tested working fine after the patches. -- Jens Axboe

[PATCH blktests] makefile: Add install rule

2018-11-09 Thread Gwendal Grignou
Add rule to install to a target directory, /usr/local/blktests by default. Signed-off-by: Gwendal Grignou --- Makefile | 9 + src/Makefile | 3 +++ 2 files changed, 12 insertions(+) diff --git a/Makefile b/Makefile index 38b8ad1..d7c2b74 100644 --- a/Makefile +++ b/Makefile @@ -1,9

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

2018-11-09 Thread Jens Axboe
On 11/9/18 6:51 AM, Christoph Hellwig wrote: > 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

Re: [PATCH 3/7] scsi: push blk_status_t up into scsi_setup_{fs,scsi}_cmnd

2018-11-09 Thread Johannes Thumshirn
Look good, Reviewed-by: Johannes Thumshirn -- Johannes ThumshirnSUSE Labs jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG

[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

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

2018-11-09 Thread Christoph Hellwig
Factor out a new is_stopped helper that matches the existing is_se_active helper, and merge the trivial amount of remaining code into the only caller. This also allows better error handling by returning a BLK_STS_* directly instead of explicitly calling blk_mq_end_request, and moving

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

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

[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

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

Re: [GIT PULL] nvme fixes for 4.20

2018-11-09 Thread Jens Axboe
On 11/9/18 6:20 AM, Christoph Hellwig wrote: > 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

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

2018-11-09 Thread Jens Axboe
On 11/6/18 5:55 PM, Ming Lei wrote: > On Tue, Nov 06, 2018 at 04:48:13PM +, Rui Salvaterra wrote: >> On Mon, 5 Nov 2018 at 03:41, Ming Lei wrote: >>> >>> V2 addresses Christoph's comment by introducing bio_allowed_max_sectors(). >>> >>> Ping... >>> >>> Thanks, >>> Ming >> >> Hi, Ming, >> >>

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 devices limits of > >the

Re: [GIT PULL] nvme fixes for 4.20

2018-11-09 Thread Jens Axboe
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 devices limits of >the controllers below > > The following changes since commit