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] "echo

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: Yue

Re: [PATCH 6/7] scsi: return blk_status_t from device handler ->prep_fn

2018-11-09 Thread Bart Van Assche
On Fri, 2018-11-09 at 14:42 +0100, Christoph Hellwig wrote: > Remove the last use of the old BLKPREP_* values, which get converted > to BLK_STS_* later anyway. Reviewed-by: Bart Van Assche

Re: [PATCH 7/7] block: remove the BLKPREP_* values.

2018-11-09 Thread Bart Van Assche
On Fri, 2018-11-09 at 14:42 +0100, Christoph Hellwig wrote: > Unused now. > > Signed-off-by: Christoph Hellwig > --- > include/linux/blkdev.h | 10 -- > 1 file changed, 10 deletions(-) > > diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h > index 9b1f470cc784..55597948868b 10

Re: [PATCH 5/7] scsi: return blk_status_t from scsi_init_io and ->init_command

2018-11-09 Thread Bart Van Assche
On Fri, 2018-11-09 at 14:42 +0100, Christoph Hellwig wrote: > Replace the old BLKRREP_* values with the BLK_STS_ ones that they are > converted to later anyway. Just noticed a typo: I think BLKRREP_ should be changed into BLKPREP_.

Re: [PATCH 5/7] scsi: return blk_status_t from scsi_init_io and ->init_command

2018-11-09 Thread Bart Van Assche
On Fri, 2018-11-09 at 14:42 +0100, Christoph Hellwig wrote: > Replace the old BLKRREP_* values with the BLK_STS_ ones that they are > converted to later anyway. Reviewed-by: Bart Van Assche

Re: [PATCH 4/7] scsi: clean up error handling in scsi_init_io

2018-11-09 Thread Bart Van Assche
On Fri, 2018-11-09 at 14:42 +0100, Christoph Hellwig wrote: > There is no need to call scsi_mq_free_sgtables until we have actually > allocated sgtables. Reviewed-by: Bart Van Assche

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

2018-11-09 Thread Bart Van Assche
On Fri, 2018-11-09 at 14:42 +0100, Christoph Hellwig wrote: > This just moves the prep_to_mq calls up in preparation of further removal > of BLKPREP_* usage. Reviewed-by: Bart Van Assche

Re: [PATCH 1/7] ide: cleanup ->prep_rq calling convention

2018-11-09 Thread Bart Van Assche
On Fri, 2018-11-09 at 14:42 +0100, Christoph Hellwig wrote: > The return value is just used as a binary yes/no decicsion, so switch > it to a bool instead of the old BLKPREP_* values returned as an int. Reviewed-by: Bart Van Assche

Re: [PATCH 2/7] scsi: simplify scsi_prep_state_check

2018-11-09 Thread Bart Van Assche
On Fri, 2018-11-09 at 14:42 +0100, Christoph Hellwig wrote: > Return a blk_status_t directly, and make the code a little more compact > by handling the fast path in the caller. Reviewed-by: Bart Van Assche

Re: [LKP] a9f38e1dec [ 245.678853] INFO: task mount:580 blocked for more than 120 seconds.

2018-11-09 Thread Jens Axboe
On 11/6/18 8:16 PM, kernel test robot wrote: > Greetings, > > 0day kernel testing robot got the below dmesg and the first bad commit is > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > > commit a9f38e1dec107af70d81338332494bf0a1e76597 > Author: Omar Sandoval >

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

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

kobject lifetime issues in blk-mq

2018-11-09 Thread Guenter Roeck
Hi, Images with CONFIG_DEBUG_KOBJECT=y, CONFIG_DEBUG_KOBJECT_RELEASE=y enabled report kobject lifetime issues when booting an image in qemu using virtio-scsi-pci. Bisect points to two different commits, depending on the kernel configuration. 1st configuration: defconfig plus: CONFIG_VIRTIO_BLK=

WARNING: locking bug in loop_control_ioctl

2018-11-09 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:442b8cea2477 Add linux-next specific files for 20181109 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=14790f7b40 kernel config: https://syzkaller.appspot.com/x/.config?x=66046c6bfaf1f24d

Re: [PATCH V8 00/18] block: support multi-page bvec

2018-11-09 Thread Jens Axboe
On 11/9/18 9:25 AM, Ming Lei wrote: > Hi, > > This patchset brings multi-page bvec into block layer: > > 1) what is multi-page bvec? > > Multipage bvecs means that one 'struct bio_bvec' can hold multiple pages > which are physically contiguous instead of one single page used in linux > kernel fo

[GIT PULL] Block fixes for 4.20-rc2

2018-11-09 Thread Jens Axboe
annes) - 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 mi

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: [Xen-devel] [PATCH v2] xen-blkfront: fix kernel panic with blkfront_remove()

2018-11-09 Thread Manjunath Patil
oops! sorry for not noticing this. -Manjunath On 11/8/2018 10:16 PM, Juergen Gross wrote: On 09/11/2018 02:10, Manjunath Patil wrote: When we try to detach the device, blkfront_remove() tries to access blkfront_info leading to kernel panic. Typical call stack involving panic - #10 page_faul

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

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

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

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

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

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

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 Date

[PATCH V8 17/18] block: kill QUEUE_FLAG_NO_SG_MERGE

2018-11-09 Thread Ming Lei
Since bdced438acd83ad83a6c ("block: setup bi_phys_segments after splitting"), physical segment number is mainly figured out in blk_queue_split() for fast path, and the flag of BIO_SEG_VALID is set there too. Now only blk_recount_segments() and blk_recalc_rq_segments() use this flag. Basically blk

[PATCH V8 18/18] block: kill BLK_MQ_F_SG_MERGE

2018-11-09 Thread Ming Lei
QUEUE_FLAG_NO_SG_MERGE has been killed, so kill BLK_MQ_F_SG_MERGE too. Cc: Christoph Hellwig Cc: Mike Snitzer Cc: Kent Overstreet Signed-off-by: Ming Lei --- block/blk-mq-debugfs.c | 1 - drivers/block/loop.c | 2 +- drivers/block/nbd.c | 2 +- drivers/block/rbd.c

[PATCH V8 01/18] block: introduce multi-page page bvec helpers

2018-11-09 Thread Ming Lei
This patch introduces helpers of 'mp_bvec_iter_*' for multipage bvec support. The introduced helpers treate one bvec as real multi-page segment, which may include more than one pages. The existed helpers of bvec_iter_* are interfaces for supporting current bvec iterator which is thought as single

[PATCH V8 05/18] block: introduce bvec_last_segment()

2018-11-09 Thread Ming Lei
BTRFS and guard_bio_eod() need to get the last singlepage segment from one multipage bvec, so introduce this helper to make them happy. Cc: Christoph Hellwig Signed-off-by: Ming Lei --- include/linux/bvec.h | 25 + 1 file changed, 25 insertions(+) diff --git a/include/l

[PATCH V8 15/18] block: document usage of bio iterator helpers

2018-11-09 Thread Ming Lei
Now multi-page bvec is supported, some helpers may return page by page, meantime some may return segment by segment, this patch documents the usage. Cc: Christoph Hellwig Signed-off-by: Ming Lei --- Documentation/block/biovecs.txt | 26 ++ 1 file changed, 26 insertions(+

[PATCH V8 06/18] fs/buffer.c: use bvec iterator to truncate the bio

2018-11-09 Thread Ming Lei
Once multi-page bvec is enabled, the last bvec may include more than one page, this patch use bvec_last_segment() to truncate the bio. Cc: Christoph Hellwig Cc: linux-fsde...@vger.kernel.org Signed-off-by: Ming Lei --- fs/buffer.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff

[PATCH V8 04/18] block: use bio_for_each_bvec() to map sg

2018-11-09 Thread Ming Lei
It is more efficient to use bio_for_each_bvec() to map sg, meantime we have to consider splitting multipage bvec as done in blk_bio_segment_split(). Cc: Christoph Hellwig Signed-off-by: Ming Lei --- block/blk-merge.c | 72 +++ 1 file changed,

[PATCH V8 16/18] block: don't use bio->bi_vcnt to figure out segment number

2018-11-09 Thread Ming Lei
It is wrong to use bio->bi_vcnt to figure out how many segments there are in the bio even though CLONED flag isn't set on this bio, because this bio may be splitted or advanced. So always use bio_segments() in blk_recount_segments(), and it shouldn't cause any performance loss now because the phys

[PATCH V8 07/18] btrfs: use bvec_last_segment to get bio's last page

2018-11-09 Thread Ming Lei
Preparing for supporting multi-page bvec. Cc: Christoph Hellwig Cc: David Sterba Cc: linux-bt...@vger.kernel.org Signed-off-by: Ming Lei --- fs/btrfs/compression.c | 5 - fs/btrfs/extent_io.c | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/compression.c

[PATCH V8 12/18] block: allow bio_for_each_segment_all() to iterate over multi-page bvec

2018-11-09 Thread Ming Lei
This patch introduces one extra iterator variable to bio_for_each_segment_all(), then we can allow bio_for_each_segment_all() to iterate over multi-page bvec. Given it is just one mechannical & simple change on all bio_for_each_segment_all() users, this patch does tree-wide change in one single p

[PATCH V8 09/18] block: introduce bio_bvecs()

2018-11-09 Thread Ming Lei
There are still cases in which we need to use bio_bvecs() for get the number of multi-page segment, so introduce it. Cc: Christoph Hellwig Signed-off-by: Ming Lei --- include/linux/bio.h | 30 +- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/include/

[PATCH V8 13/18] block: enable multipage bvecs

2018-11-09 Thread Ming Lei
This patch pulls the trigger for multi-page bvecs. Now any request queue which supports queue cluster will see multi-page bvecs. Cc: Christoph Hellwig Signed-off-by: Ming Lei --- block/bio.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/block/bio.

[PATCH V8 14/18] block: always define BIO_MAX_PAGES as 256

2018-11-09 Thread Ming Lei
Now multi-page bvec can cover CONFIG_THP_SWAP, so we don't need to increase BIO_MAX_PAGES for it. Cc: Christoph Hellwig Signed-off-by: Ming Lei --- include/linux/bio.h | 8 1 file changed, 8 deletions(-) diff --git a/include/linux/bio.h b/include/linux/bio.h index 1a2430a8b89d..5a86f0

[PATCH V8 11/18] bcache: avoid to use bio_for_each_segment_all() in bch_bio_alloc_pages()

2018-11-09 Thread Ming Lei
bch_bio_alloc_pages() is always called on one new bio, so it is safe to access the bvec table directly. Given it is the only kind of this case, open code the bvec table access since bio_for_each_segment_all() will be changed to support for iterating over multipage bvec. Acked-by: Coly Li Cc: Coly

[PATCH V8 10/18] block: loop: pass multi-page bvec to iov_iter

2018-11-09 Thread Ming Lei
iov_iter is implemented with bvec itererator, so it is safe to pass multipage bvec to it, and this way is much more efficient than passing one page in each bvec. Cc: Christoph Hellwig Signed-off-by: Ming Lei --- drivers/block/loop.c | 23 --- 1 file changed, 12 insertions(+)

[PATCH V8 08/18] btrfs: move bio_pages_all() to btrfs

2018-11-09 Thread Ming Lei
BTRFS is the only user of this helper, so move this helper into BTRFS, and implement it via bio_for_each_segment_all(), since bio->bi_vcnt may not equal to number of pages after multipage bvec is enabled. Cc: Christoph Hellwig Cc: David Sterba Cc: linux-bt...@vger.kernel.org Signed-off-by: Ming

[PATCH V8 03/18] block: use bio_for_each_bvec() to compute multi-page bvec count

2018-11-09 Thread Ming Lei
First it is more efficient to use bio_for_each_bvec() in both blk_bio_segment_split() and __blk_recalc_rq_segments() to compute how many multi-page bvecs there are in the bio. Secondly once bio_for_each_bvec() is used, the bvec may need to be splitted because its length can be very longer than max

[PATCH V8 02/18] block: introduce bio_for_each_bvec()

2018-11-09 Thread Ming Lei
This helper is used for iterating over multi-page bvec for bio split & merge code. Cc: Christoph Hellwig Signed-off-by: Ming Lei --- include/linux/bio.h | 34 +++--- include/linux/bvec.h | 36 2 files changed, 63 insertions(+), 7

[PATCH V8 00/18] block: support multi-page bvec

2018-11-09 Thread Ming Lei
Hi, This patchset brings multi-page bvec into block layer: 1) what is multi-page bvec? Multipage bvecs means that one 'struct bio_bvec' can hold multiple pages which are physically contiguous instead of one single page used in linux kernel for long time. 2) why is multi-page bvec introduced? K

Re: remove the legacy BLKPREP_* values

2018-11-09 Thread Jens Axboe
On 11/9/18 6:42 AM, Christoph Hellwig wrote: > Hi Jens, > > this series gets rid of the old BLKPREP_* values from the legacy block > layer in favor of always using a blk_status_t (or a bool in one case). Series looks good to me, tested the IDE bits too. I'm assuming we'll take this through the bl

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 7/7] block: remove the BLKPREP_* values.

2018-11-09 Thread Johannes Thumshirn
So long and thanks for all the fish, 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, Gra

Re: [PATCH 6/7] scsi: return blk_status_t from device handler ->prep_fn

2018-11-09 Thread Johannes Thumshirn
Looks 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 N

Re: [PATCH 5/7] scsi: return blk_status_t from scsi_init_io and ->init_command

2018-11-09 Thread Johannes Thumshirn
Looks 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 N

Re: [PATCH 4/7] scsi: clean up error handling in scsi_init_io

2018-11-09 Thread Johannes Thumshirn
Looks 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 N

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 Nü

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/dri

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

[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 +++ drivers/bloc

[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 a/drivers/block/mtip32xx/mtip32

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

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

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/mtip3

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

[PATCH 7/7] block: remove the BLKPREP_* values.

2018-11-09 Thread Christoph Hellwig
Unused now. Signed-off-by: Christoph Hellwig --- include/linux/blkdev.h | 10 -- 1 file changed, 10 deletions(-) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 9b1f470cc784..55597948868b 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -778,16 +778

[PATCH 6/7] scsi: return blk_status_t from device handler ->prep_fn

2018-11-09 Thread Christoph Hellwig
Remove the last use of the old BLKPREP_* values, which get converted to BLK_STS_* later anyway. Signed-off-by: Christoph Hellwig --- drivers/scsi/device_handler/scsi_dh_alua.c | 21 +++-- drivers/scsi/device_handler/scsi_dh_emc.c | 8 drivers/scsi/device_handler/scsi

[PATCH 5/7] scsi: return blk_status_t from scsi_init_io and ->init_command

2018-11-09 Thread Christoph Hellwig
Replace the old BLKRREP_* values with the BLK_STS_ ones that they are converted to later anyway. Signed-off-by: Christoph Hellwig --- drivers/scsi/scsi_lib.c| 45 ++-- drivers/scsi/sd.c | 85 +- drivers/scsi/sd.h | 6 +--

remove the legacy BLKPREP_* values

2018-11-09 Thread Christoph Hellwig
Hi Jens, this series gets rid of the old BLKPREP_* values from the legacy block layer in favor of always using a blk_status_t (or a bool in one case).

[PATCH 4/7] scsi: clean up error handling in scsi_init_io

2018-11-09 Thread Christoph Hellwig
There is no need to call scsi_mq_free_sgtables until we have actually allocated sgtables. Signed-off-by: Christoph Hellwig --- drivers/scsi/scsi_lib.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index e665c

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

2018-11-09 Thread Christoph Hellwig
This just moves the prep_to_mq calls up in preparation of further removal of BLKPREP_* usage. Signed-off-by: Christoph Hellwig --- drivers/scsi/scsi_lib.c | 45 ++--- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/drivers/scsi/scsi_lib.c b/dri

[PATCH 1/7] ide: cleanup ->prep_rq calling convention

2018-11-09 Thread Christoph Hellwig
The return value is just used as a binary yes/no decicsion, so switch it to a bool instead of the old BLKPREP_* values returned as an int. Also clean up a few related comments. Signed-off-by: Christoph Hellwig --- drivers/ide/ide-cd.c | 22 +++--- drivers/ide/ide-disk.c | 8 +

[PATCH 2/7] scsi: simplify scsi_prep_state_check

2018-11-09 Thread Christoph Hellwig
Return a blk_status_t directly, and make the code a little more compact by handling the fast path in the caller. Signed-off-by: Christoph Hellwig --- drivers/scsi/scsi_lib.c | 102 +++- 1 file changed, 48 insertions(+), 54 deletions(-) diff --git a/drivers/sc

Re: [PATCH 09/30] scsi: kill off the legacy IO path

2018-11-09 Thread Jens Axboe
On 11/8/18 7:28 PM, Martin K. Petersen wrote: > > Jens, > >> Thanks for reviewing both of these. Since the series is hard to break >> apart, are you fine with me carrying this for 4.21 in the block tree? >> I can stage it very soon, which would make it trivial for you to base >> the 4.21 SCSI bra

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 in

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, >> >> So

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 controll

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 651022382c7f8da46cb4

Re: [PATCH] xen-blkfront: fix kernel panic with blkfront_remove()

2018-11-09 Thread Greg KH
On Thu, Nov 08, 2018 at 04:58:28PM -0800, Manjunath Patil wrote: > If a hot-attaching device fails inside domU[ex:negotiate_mq() returns > with ENOMEM] we clear the blkfront_info struct in talk_to_blkback() > > When we try to detach the device, blkfront_remove() tries to access > blkfront_info lea

Re: [PATCH V7 10/24] block: introduce multipage page bvec helpers

2018-11-09 Thread Ming Lei
On Wed, Jun 27, 2018 at 11:59:37PM +0800, kbuild test robot wrote: > Hi Ming, > > Thank you for the patch! Perhaps something to improve: > > [auto build test WARNING on linus/master] > [also build test WARNING on v4.18-rc2] > [cannot apply to next-20180627] > [if your patch is applied to the wron

Re: [PATCH v3 0/7] PBLK Bugfixes and cleanups

2018-11-09 Thread Matias Bjørling
On 11/06/2018 02:33 PM, Hans Holmberg wrote: From: Hans Holmberg This series is a slew of bugfixes and cleanups for PBLK, mostly fixing issues found during corner-case testing in QEMU. Changes since v1: Messed up from:, now the patches apply with the correct author Pardon the m