Re: [PATCH blktests 15/15] Add tests for the SRP initiator and target drivers

2018-06-26 Thread Bart Van Assche
On 06/26/18 01:58, Johannes Thumshirn wrote: On Fri, Jun 22, 2018 at 03:19:46PM -0700, Bart Van Assche wrote: tests/srp/functions | 1288 +++ Can you please move these into common/srp? Let's do that once other tests than those in tests/srp need one

Re: [PATCH blktests 00/15] Add SRP initiator driver tests

2018-06-26 Thread Bart Van Assche
On 06/26/18 00:27, Johannes Thumshirn wrote: On Tue, Jun 26, 2018 at 02:16:26AM +, Bart Van Assche wrote: On Tue, 2018-06-26 at 09:37 +0800, Ming Lei wrote: I run SRP test on Fedora 27, and not run any LIO specific commands to load it, seems it is done automatically. So looks it might

Re: [PATCH blktests 00/15] Add SRP initiator driver tests

2018-06-25 Thread Bart Van Assche
On Tue, 2018-06-26 at 09:37 +0800, Ming Lei wrote: > I run SRP test on Fedora 27, and not run any LIO specific commands > to load it, seems it is done automatically. > > So looks it might not a good idea to fail SRP test if LIO is loaded, > just wondering why your SRP test can't make the two

[PATCH 3/3] block: Fix blk_end_request_all() for WRITE SAME requests

2018-06-25 Thread Bart Van Assche
smp_call_function_single_interrupt+0x90/0x330 call_function_single_interrupt+0xf/0x20 Signed-off-by: Bart Van Assche Cc: Mike Snitzer Cc: Christoph Hellwig Cc: Ming Lei --- block/blk-core.c | 31 --- block/blk-mq.c | 2 +- block/blk.h | 2 ++ 3 files changed, 27

[PATCH 1/3] block: Fix blk_rq_payload_bytes()

2018-06-25 Thread Bart Van Assche
) but not in case (2). Make sure that blk_rq_payload_bytes() handles both cases correctly. Fixes: 2e3258ecfaeb ("block: add blk_rq_payload_bytes") Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Ming Lei --- include/linux/blkdev.h | 14 +- 1 file changed, 9 insertions(+), 5

[PATCH 0/3] Fix blk_mq_end_request() and blk_end_request() for WRITE SAME

2018-06-25 Thread Bart Van Assche
Hello Jens, This series of three patches fixes a crash in the block layer core that I encountered while retesting the SRP tests in blktests. Please consider these patches for kernel v4.19. Thanks, Bart. Bart Van Assche (3): block: Fix blk_rq_payload_bytes() sd: Remove the __data_len hack

[PATCH 2/3] sd: Remove the __data_len hack for WRITE SAME again

2018-06-25 Thread Bart Van Assche
uot;sd: remove __data_len hack for WRITE SAME"). Signed-off-by: Bart Van Assche Cc: Martin K. Petersen Cc: Christoph Hellwig Cc: Ming Lei --- drivers/scsi/sd.c | 18 +- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c in

[PATCH] drbd: Fix drbd_request_prepare() discard handling

2018-06-25 Thread Bart Van Assche
Fix the test that verifies whether bio_op(bio) represents a discard or write zeroes operation. Compile-tested only. Fixes: 7435e9018f91 ("drbd: zero-out partial unaligned discards on local backend") Signed-off-by: Bart Van Assche Cc: Philipp Reisner Cc: Lars Ellenberg --- drivers/

[PATCH] drbd: Do not redefine __must_hold()

2018-06-25 Thread Bart Van Assche
Since __must_hold() is defined in , do not redefine it in DRBD. Compile-tested only. Signed-off-by: Bart Van Assche Cc: Philipp Reisner Cc: Lars Ellenberg --- drivers/block/drbd/drbd_int.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd

Re: [PATCH blktests 00/15] Add SRP initiator driver tests

2018-06-25 Thread Bart Van Assche
On 06/22/18 20:15, Ming Lei wrote: Just tried srp/001 [root@ktest-04 blktests]# ./check srp/001 srp/001 (Create and remove LUNs) [failed] runtime 0.912s ... 18.358s --- tests/srp/001.out 2018-06-23 02:41:33.267925950 + +++

[PATCH blktests 12/15] check: Make TMPDIR absolute

2018-06-22 Thread Bart Van Assche
This avoids that ${TMPDIR} gets misinterpreted if a test script modifies the working directory. Signed-off-by: Bart Van Assche --- check | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check b/check index cf2090f546a5..a7dd825ad03a 100755 --- a/check +++ b/check @@ -323,7

[PATCH blktests 14/15] Add the discontiguous-io test program

2018-06-22 Thread Bart Van Assche
This test program is used by one of the srp tests. Signed-off-by: Bart Van Assche --- src/.gitignore | 1 + src/Makefile | 4 + src/discontiguous-io.cpp | 340 +++ 3 files changed, 345 insertions(+) create mode 100644 src

[PATCH blktests 13/15] src/Makefile: Fix pattern rule

2018-06-22 Thread Bart Van Assche
According to the GNU make documentation, the syntax for pattern rules is as follows: +: Signed-off-by: Bart Van Assche --- src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index 612282d14af8..d7ae832fc4fd 100644 --- a/src

[PATCH blktests 08/15] check: Suppress a shellcheck warning about the DMESG_FILTER initialization

2018-06-22 Thread Bart Van Assche
Avoid that shellcheck reports the following: check:396:2: warning: Use var=$(command) to assign output (or quote to assign string). [SC2209] Signed-off-by: Bart Van Assche --- check | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check b/check index d9ffea6ec1f6

[PATCH blktests 00/15] Add SRP initiator driver tests

2018-06-22 Thread Bart Van Assche
available as a github pull request, namely https://github.com/osandov/blktests/pull/24. Thanks, Bart. Bart Van Assche (15): common/rc: Fix _have_tracepoint() Annotate include statements in shell scripts where the source file is a variable check, tests/meta/012: Use array["index"

[PATCH blktests 09/15] Makefile: Do not suppress useful shellcheck warnings

2018-06-22 Thread Bart Van Assche
). Signed-off-by: Bart Van Assche --- Makefile | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 14ba8341dae5..c4bffa2d3f32 100644 --- a/Makefile +++ b/Makefile @@ -4,21 +4,8 @@ all: clean: $(MAKE) -C src clean -# SC1090: &qu

[PATCH blktests 10/15] tests/meta/group: Fix shellcheck complaints

2018-06-22 Thread Bart Van Assche
Avoid that shellcheck complains about unused global variables. Avoid that shellcheck complains about using cat instead of redirection. Signed-off-by: Bart Van Assche --- tests/meta/group | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/meta/group b/tests/meta

[PATCH blktests 03/15] check, tests/meta/012: Use array["index"] instead of array[index]

2018-06-22 Thread Bart Van Assche
This causes shellcheck to stop complaining about these array element accesses. Signed-off-by: Bart Van Assche --- check | 44 ++-- tests/meta/012 | 4 ++-- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/check b/check index

[PATCH blktests 06/15] Multiple tests: remove unused and undefined variables

2018-06-22 Thread Bart Van Assche
Signed-off-by: Bart Van Assche Acked-by: Chaitanya Kulkarni --- tests/loop/003 | 3 --- tests/nvme/010 | 3 +-- tests/nvme/011 | 3 +-- tests/nvme/012 | 1 - tests/nvme/013 | 1 - 5 files changed, 2 insertions(+), 9 deletions(-) diff --git a/tests/loop/003 b/tests/loop/003 index 353d4fcfa33c

[PATCH blktests 11/15] make check: Also check tests/*/group files

2018-06-22 Thread Bart Van Assche
Signed-off-by: Bart Van Assche --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c4bffa2d3f32..8031d2ed0eca 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,8 @@ clean: $(MAKE) -C src clean check: - shellcheck -x -f gcc

[PATCH blktests 01/15] common/rc: Fix _have_tracepoint()

2018-06-22 Thread Bart Van Assche
Make sure that _have_tracepoint() uses the argument passed to that function instead of using an undefined variable. Signed-off-by: Bart Van Assche --- common/rc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/rc b/common/rc index 7f1728025364..7592400dda82 100644 --- a/common/rc

[PATCH blktests 04/15] Suppress shellcheck complaints about global variables

2018-06-22 Thread Bart Van Assche
IELDS $FIO_PERF_PREFIX $RESTORE_CPUS_ONLINE $QUICK $SKIP_REASON ${TEST_RUN[*]} $TIMED" >/dev/null Signed-off-by: Bart Van Assche --- common/cpuhotplug | 2 ++ common/fio| 2 ++ common/iopoll | 2 ++ common/loop | 1 + common/nbd| 2 ++ common/nvme | 2 ++ common/s

[PATCH blktests 15/15] Add tests for the SRP initiator and target drivers

2018-06-22 Thread Bart Van Assche
-off-by: Bart Van Assche --- tests/srp/001 | 72 +++ tests/srp/001.out |8 + tests/srp/002 | 50 ++ tests/srp/002.out |7 + tests/srp/003 | 51 ++ tests/srp/003.out |7 + tests/srp/004 | 51 ++ tests/srp/004.out |7 + tests/srp/005 | 41

[PATCH blktests 02/15] Annotate include statements in shell scripts where the source file is a variable

2018-06-22 Thread Bart Van Assche
This causes shellcheck to stop complaining about these include statements. Signed-off-by: Bart Van Assche --- check | 3 +++ 1 file changed, 3 insertions(+) diff --git a/check b/check index 4baa8dde2436..5e1ba7bc8401 100755 --- a/check +++ b/check @@ -23,6 +23,7 @@ _found_test

[PATCH blktests 05/15] check: Avoid that shellcheck complains that $FULL appears unused

2018-06-22 Thread Bart Van Assche
$FULL is a global variable. Avoid that shellcheck complains about it. Signed-off-by: Bart Van Assche --- check | 2 ++ 1 file changed, 2 insertions(+) diff --git a/check b/check index 1774be4fe1a7..d9ffea6ec1f6 100755 --- a/check +++ b/check @@ -301,6 +301,8 @@ _call_test() { local

[PATCH blktests 07/15] Avoid passing tests/block/002 arguments to _init_scsi_debug

2018-06-22 Thread Bart Van Assche
This patch avoids that shellcheck reports the following: tests/block/002:34:7: note: Use _init_scsi_debug "$@" if function's $1 should mean script's $1. [SC2119] Signed-off-by: Bart Van Assche --- common/scsi_debug | 3 +++ tests/block/002 | 2 +- 2 files changed, 4 insert

[PATCH] blk-mq: Fix timeout handling in case the timeout handler returns BLK_EH_DONE

2018-06-22 Thread Bart Van Assche
Make sure that RQF_TIMED_OUT is cleared when a request is reused after a block driver timeout handler has returned BLK_EH_DONE. Fixes: da6612673988 ("blk-mq: don't time out requests again that are in the timeout handler") Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Jia

[PATCH 8/9] check: Suppress a shellcheck warning about the DMESG_FILTER initialization

2018-06-19 Thread Bart Van Assche
Avoid that shellcheck reports the following: check:396:2: warning: Use var=$(command) to assign output (or quote to assign string). [SC2209] Signed-off-by: Bart Van Assche --- check | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check b/check index f1feb96b293e

[PATCH 4/9] Suppress shellcheck complaints about global variables

2018-06-19 Thread Bart Van Assche
IELDS $FIO_PERF_PREFIX $RESTORE_CPUS_ONLINE $QUICK $SKIP_REASON ${TEST_RUN[*]} $TIMED" >/dev/null Signed-off-by: Bart Van Assche --- common/cpuhotplug | 2 ++ common/fio| 2 ++ common/iopoll | 2 ++ common/loop | 1 + common/nbd| 2 ++ common/nvme | 2 ++ common/s

[PATCH 1/9] common/rc: Fix _have_tracepoint()

2018-06-19 Thread Bart Van Assche
Make sure that _have_tracepoint() uses the argument passed to that function instead of using an undefined variable. Signed-off-by: Bart Van Assche --- common/rc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/rc b/common/rc index 7f1728025364..7592400dda82 100644 --- a/common/rc

[PATCH 6/9] Multiple tests: remove unused and undefined variables

2018-06-19 Thread Bart Van Assche
Signed-off-by: Bart Van Assche Cc: Chaitanya Kulkarni --- tests/loop/003 | 3 --- tests/nvme/010 | 3 +-- tests/nvme/011 | 3 +-- tests/nvme/012 | 1 - tests/nvme/013 | 1 - 5 files changed, 2 insertions(+), 9 deletions(-) diff --git a/tests/loop/003 b/tests/loop/003 index 353d4fcfa33c

[PATCH 5/9] check: Avoid that shellcheck complains that $FULL appears unused

2018-06-19 Thread Bart Van Assche
$FULL is a global variable. Avoid that shellcheck complains about it. Signed-off-by: Bart Van Assche --- check | 2 ++ 1 file changed, 2 insertions(+) diff --git a/check b/check index 5f53fa105f72..f1feb96b293e 100755 --- a/check +++ b/check @@ -301,6 +301,8 @@ _call_test() { local

[PATCH 9/9] Makefile: Do not suppress useful shellcheck warnings

2018-06-19 Thread Bart Van Assche
). Signed-off-by: Bart Van Assche --- Makefile | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 14ba8341dae5..c4bffa2d3f32 100644 --- a/Makefile +++ b/Makefile @@ -4,21 +4,8 @@ all: clean: $(MAKE) -C src clean -# SC1090: &qu

[PATCH 3/9] check, tests/meta/012: Use array["index"] instead of array[index]

2018-06-19 Thread Bart Van Assche
This causes shellcheck to stop complaining about these array element accesses. Signed-off-by: Bart Van Assche --- check | 46 +++--- tests/meta/012 | 4 ++-- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/check b/check index

[PATCH 7/9] Avoid passing tests/block/002 arguments to _init_scsi_debug

2018-06-19 Thread Bart Van Assche
This patch avoids that shellcheck reports the following: tests/block/002:34:7: note: Use _init_scsi_debug "$@" if function's $1 should mean script's $1. [SC2119] Signed-off-by: Bart Van Assche --- common/scsi_debug | 3 +++ tests/block/002 | 2 +- 2 files changed, 4 insert

[PATCH 0/9] blktests: Re-enable shellcheck warnings

2018-06-19 Thread Bart Van Assche
series. Thanks, Bart. Bart Van Assche (9): common/rc: Fix _have_tracepoint() Annotate include statements in shell scripts where the source file is a variable check, tests/meta/012: Use array["index"] instead of array[index] Suppress shellcheck complaints about global

[PATCH 2/9] Annotate include statements in shell scripts where the source file is a variable

2018-06-19 Thread Bart Van Assche
This causes shellcheck to stop complaining about these include statements. Signed-off-by: Bart Van Assche --- check | 3 +++ 1 file changed, 3 insertions(+) diff --git a/check b/check index 4baa8dde2436..5e1ba7bc8401 100755 --- a/check +++ b/check @@ -23,6 +23,7 @@ _found_test

Re: [PATCH v2] Revert "block: Add warning for bi_next not NULL in bio_endio()"

2018-06-19 Thread Bart Van Assche
On Tue, 2018-06-19 at 14:16 -0400, Kent Overstreet wrote: > I take it if we had a test for request based dm in blktests or somewhere that > probably would have caught this much easier :/ I'm working on porting the srp-test software to the blktests framework. Bart.

[PATCH v2] Revert "block: Add warning for bi_next not NULL in bio_endio()"

2018-06-19 Thread Bart Van Assche
r bi_next not NULL in bio_endio()") Signed-off-by: Bart Van Assche Cc: Kent Overstreet Cc: Mike Snitzer --- Changes in v2 compared to v1: improved patch description. block/bio.c | 3 --- block/blk-core.c | 8 +--- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/block/bi

Re: [PATCH 0/5] Five small zoned block device patches

2018-06-16 Thread Bart Van Assche
On Sat, 2018-06-16 at 12:27 -0600, Jens Axboe wrote: > On 6/15/18 3:55 PM, Bart Van Assche wrote: > > Hello Jens, > > > > In this patch series there are five patches with small improvements for the > > zoned block device code. Please consider these patches for the upstr

[PATCH 3/5] block: Remove bdev_nr_zones()

2018-06-15 Thread Bart Van Assche
Remove this function since it has no callers. This function was introduced in commit 6cc77e9cb080 ("block: introduce zoned block devices zone write locking"). Signed-off-by: Bart Van Assche Reviewed-by: Damien Le Moal Cc: Christoph Hellwig Cc: Matias Bjorling --- include/linux/bl

[PATCH 4/5] block: Inline blk_queue_nr_zones()

2018-06-15 Thread Bart Van Assche
Since the implementation of blk_queue_nr_zones() is trivial and since it only has a single caller, inline this function. Signed-off-by: Bart Van Assche Reviewed-by: Damien Le Moal Cc: Matias Bjorling Cc: Christoph Hellwig --- block/blk-mq-debugfs.c | 2 +- include/linux/blkdev.h | 5 - 2

[PATCH 2/5] include/uapi/linux/blkzoned.h: Remove a superfluous __packed directive

2018-06-15 Thread Bart Van Assche
-shouldnt-use-__attribute__packed/. Signed-off-by: Bart Van Assche Reviewed-by: Damien Le Moal Cc: Matias Bjorling Cc: Christoph Hellwig --- include/uapi/linux/blkzoned.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/blkzoned.h b/include/uapi/linux

[PATCH 5/5] block: Make struct request_queue smaller for CONFIG_BLK_DEV_ZONED=n

2018-06-15 Thread Bart Van Assche
Exclude zoned block device members from struct request_queue for CONFIG_BLK_DEV_ZONED == n. Avoid breaking the build by only building the code that uses these struct request_queue members if CONFIG_BLK_DEV_ZONED != n. Signed-off-by: Bart Van Assche Reviewed-by: Damien Le Moal Cc: Matias

[PATCH 1/5] block: Remove a superfluous cast from blkdev_report_zones()

2018-06-15 Thread Bart Van Assche
No cast is necessary when assigning a non-void pointer to a void pointer. Signed-off-by: Bart Van Assche Reviewed-by: Damien Le Moal Cc: Matias Bjorling Cc: Christoph Hellwig --- block/blk-zoned.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-zoned.c b/block

[PATCH 0/5] Five small zoned block device patches

2018-06-15 Thread Bart Van Assche
Hello Jens, In this patch series there are five patches with small improvements for the zoned block device code. Please consider these patches for the upstream kernel. Thanks, Bart. Bart Van Assche (5): block: Remove a superfluous cast from blkdev_report_zones() include/uapi/linux

[PATCH 0/5] Five small zoned block device patches

2018-06-15 Thread Bart Van Assche
Hello Jens, In this patch series there are five patches with small improvements for the zoned block device code. Please consider these patches for the upstream kernel. Thanks, Bart. Bart Van Assche (5): block: Remove a superfluous cast from blkdev_report_zones() include/uapi/linux

Re: [PATCH] brd: Allow ramdisk to be allocated on selected NUMA node

2018-06-15 Thread Bart Van Assche
On Fri, 2018-06-15 at 18:55 +0200, Hannes Reinecke wrote: > On 06/15/2018 04:07 PM, Bart Van Assche wrote: > > On Thu, 2018-06-14 at 15:38 +0200, Hannes Reinecke wrote: > > > For performance reasons we should be able to allocate all memory > > > from a given NUMA nod

Re: [PATCH] brd: Allow ramdisk to be allocated on selected NUMA node

2018-06-15 Thread Bart Van Assche
On Thu, 2018-06-14 at 15:38 +0200, Hannes Reinecke wrote: > For performance reasons we should be able to allocate all memory > from a given NUMA node, so this patch adds a new parameter > 'rd_numa_node' to allow the user to specify the NUMA node id. > When restricing fio to use the same NUMA node

Re: dm-zoned-tools: add zoned disk udev rules for scheduler / dmsetup

2018-06-14 Thread Bart Van Assche
On Thu, 2018-06-14 at 08:38 -0400, Mike Snitzer wrote: > On Wed, Jun 13 2018 at 8:11pm -0400, > Luis R. Rodriguez wrote: > > 1) scheduler setup > > This is wrong.. if zoned devices are so dependent on deadline or > mq-deadline then the kernel should allow them to be hardcoded. I know > Jens

Re: [PATCH] dm-zoned-tools: add zoned disk udev rules for scheduler / dmsetup

2018-06-14 Thread Bart Van Assche
On Thu, 2018-06-14 at 10:01 +, Damien Le Moal wrote: > Applied. Thanks Luis ! Hello Damien, Can this still be undone? I agree with Mike that it's wrong to invoke "/sbin/dmsetup create ... zoned ..." from a udev rule. Thanks, Bart.

[Backport request] blkdev_report_zones_ioctl(): Use vmalloc() to allocate large buffers

2018-06-13 Thread Bart Van Assche
nks, Bart. commit cf0110698846fc5a93df89eb20ac7cc70a860c17 Author: Bart Van Assche Date: Tue May 22 08:27:22 2018 -0700 blkdev_report_zones_ioctl(): Use vmalloc() to allocate large buffers Avoid that complaints similar to the following appear in the kernel log if the numbe

Re: [PATCH] blkdev_report_zones_ioctl(): Use vmalloc() to allocate large buffers

2018-06-13 Thread Bart Van Assche
On 05/22/18 10:58, Jens Axboe wrote: On 5/22/18 9:27 AM, Bart Van Assche wrote: Avoid that complaints similar to the following appear in the kernel log if the number of zones is sufficiently large: fio: page allocation failure: order:9, mode:0x140c0c0(GFP_KERNEL|__GFP_COMP|__GFP_ZERO

Re: [PATCH 1/1] blk-mq: reinit q->tag_set_list entry only after grace period

2018-06-11 Thread Bart Van Assche
quot;blk-mq: Make it safe to use RCU to iterate over blk_mq_tag_set.tag_list") Cc: sta...@vger.kernel.org Anyway: Reviewed-by: Bart Van Assche

Re: [PATCH] Revert "block: Add warning for bi_next not NULL in bio_endio()"

2018-06-05 Thread Bart Van Assche
On Mon, 2018-06-04 at 18:41 -0400, Kent Overstreet wrote: > On Mon, Jun 04, 2018 at 08:59:39AM +0000, Bart Van Assche wrote: > > Please comment out the getuid_callout line from /etc/multipath.conf and try > > again. > > Changing the "/..." part into the path of th

Re: [PATCH] Revert "block: Add warning for bi_next not NULL in bio_endio()"

2018-06-04 Thread Bart Van Assche
On Tue, 2018-05-22 at 22:16 -0400, Kent Overstreet wrote: > May 22 22:13:46 moria-kvm-kvm-kvm-kvm multipathd[387]: sda: fail to get serial > May 22 22:13:46 moria-kvm-kvm-kvm-kvm multipathd[387]: sda: using deprecated > getuid callout > May 22 22:13:46 moria-kvm-kvm-kvm-kvm multipathd[387]: >

Re: [PATCH] Revert "block: Add warning for bi_next not NULL in bio_endio()"

2018-05-22 Thread Bart Van Assche
On Tue, 2018-05-22 at 21:30 -0400, Kent Overstreet wrote: > On Tue, May 22, 2018 at 04:55:05PM -0700, Bart Van Assche wrote: > > This patch avoids that KASAN reports the following complaint when > > running the srp-test software: > > I made a real attempt to get your test s

[PATCH] Revert "block: Add warning for bi_next not NULL in bio_endio()"

2018-05-22 Thread Bart Van Assche
f-by: Bart Van Assche <bart.vanass...@wdc.com> Cc: Kent Overstreet <kent.overstr...@gmail.com> --- block/bio.c | 3 --- block/blk-core.c | 8 +--- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/block/bio.c b/block/bio.c index 0a4df92cd689..e22ebab450f8 100644 -

Re: [PATCH 00/10] Misc block layer patches for bcachefs

2018-05-22 Thread Bart Van Assche
On Sun, 2018-05-20 at 18:17 -0400, Kent Overstreet wrote: > On Fri, May 18, 2018 at 03:12:27PM +0000, Bart Van Assche wrote: > > On Fri, 2018-05-18 at 05:06 -0400, Kent Overstreet wrote: > > > On Thu, May 17, 2018 at 08:54:57PM +0000, Bart Van Assche wrote: > > > &

Re: [PATCH v13] blk-mq: Rework blk-mq timeout handling again

2018-05-22 Thread Bart Van Assche
On Tue, 2018-05-22 at 14:44 -0600, Keith Busch wrote: > On Tue, May 22, 2018 at 08:36:27PM +0000, Bart Van Assche wrote: > > > > Have you noticed that if blk_mq_complete_request() encounters a request with > > state MQ_RQ_TIMED_OUT that it doesn't call __blk_mq_complete_re

Re: [PATCH v13] blk-mq: Rework blk-mq timeout handling again

2018-05-22 Thread Bart Van Assche
On Tue, 2018-05-22 at 14:38 -0600, Jens Axboe wrote: > On 5/22/18 2:33 PM, Bart Van Assche wrote: > > Thanks for having reported this. How about using the following change to > > suppress > > that warning: > > > > diff --git a/block/blk-mq.c b/block/blk-mq.c >

Re: [PATCH v13] blk-mq: Rework blk-mq timeout handling again

2018-05-22 Thread Bart Van Assche
On Tue, 2018-05-22 at 14:33 -0600, Keith Busch wrote: > On Tue, May 22, 2018 at 09:25:15AM -0700, Bart Van Assche wrote: > > @@ -848,13 +843,22 @@ static void blk_mq_rq_timed_out(struct request *req, > > bool reserved) > > case BLK_EH_RESET_TIMER: > > +

Re: [PATCH v13] blk-mq: Rework blk-mq timeout handling again

2018-05-22 Thread Bart Van Assche
On Tue, 2018-05-22 at 13:38 -0600, Jens Axboe wrote: > On 5/22/18 1:03 PM, Jens Axboe wrote: > > On 5/22/18 12:47 PM, Jens Axboe wrote: > > > Ran into this, running block/014 from blktests: > > > > > > [ 5744.949839] run blktests block/014 at 2018-05-22 12:41:25 > > > [ 5750.723000] null: rq

Re: [RFC PATCH 3/3] blk-mq: Remove generation seqeunce

2018-05-22 Thread Bart Van Assche
On Tue, 2018-05-22 at 10:34 -0600, Keith Busch wrote: > On Tue, May 22, 2018 at 04:29:07PM +0000, Bart Van Assche wrote: > > Please have another look at the current code that handles request timeouts > > and completions. The current implementation guarantees that no double >

Re: [RFC PATCH 0/3] blk-mq: Timeout rework

2018-05-22 Thread Bart Van Assche
On Tue, 2018-05-22 at 08:06 -0600, Keith Busch wrote: > On Mon, May 21, 2018 at 11:29:21PM +0000, Bart Van Assche wrote: > > Can you explain why the NVMe driver needs reference counting of requests but > > no other block driver needs this? Additionally, why is it that for all bl

Re: [RFC PATCH 3/3] blk-mq: Remove generation seqeunce

2018-05-22 Thread Bart Van Assche
On Tue, 2018-05-22 at 08:15 -0600, Keith Busch wrote: > This shouldn't be introducing any new concorrent calls to > __blk_mq_complete_request if they don't already exist. The timeout work > calls it only if the driver's timeout returns BLK_EH_HANDLED, which means > the driver is claiming the

Re: [RFC PATCH 2/3] blk-mq: Fix timeout and state order

2018-05-22 Thread Bart Van Assche
On Tue, 2018-05-22 at 17:24 +0200, Christoph Hellwig wrote: > On Mon, May 21, 2018 at 05:11:30PM -0600, Keith Busch wrote: > > The block layer had been setting the state to in-flight prior to updating > > the timer. This is the wrong order since the timeout handler could observe > > the in-flight

[PATCH v13] blk-mq: Rework blk-mq timeout handling again

2018-05-22 Thread Bart Van Assche
: - Atomic instructions are only used to update the request state if a concurrent request state change could be in progress. - blk_add_timer() has been split into two functions - one for the legacy block layer and one for blk-mq. Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Cc: Tejun Heo

[PATCH] blkdev_report_zones_ioctl(): Use vmalloc() to allocate large buffers

2018-05-22 Thread Bart Van Assche
SyS_ioctl+0x79/0x90 do_syscall_64+0x79/0x1b0 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 Fixes: 3ed05a987e0f ("blk-zoned: implement ioctls") Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Cc: Shaun Tancheff <shaun.tanch...@seagate.com> Cc: Damien Le Moal <damien.lem..

Re: [RFC PATCH 0/3] blk-mq: Timeout rework

2018-05-21 Thread Bart Van Assche
On Mon, 2018-05-21 at 17:11 -0600, Keith Busch wrote: > The current blk-mq code potentially locks requests out of completion by > the thousands, making drivers jump through hoops to handle them. This > patch set allows drivers to complete their requests whenever they're > completed without

Re: [RFC PATCH 3/3] blk-mq: Remove generation seqeunce

2018-05-21 Thread Bart Van Assche
On Mon, 2018-05-21 at 17:11 -0600, Keith Busch wrote: > @@ -650,27 +600,10 @@ static u64 blk_mq_rq_aborted_gstate(struct request *rq) > void blk_mq_complete_request(struct request *rq) > { > struct request_queue *q = rq->q; > - struct blk_mq_hw_ctx *hctx = blk_mq_map_queue(q,

Re: [PATCH 00/10] Misc block layer patches for bcachefs

2018-05-21 Thread Bart Van Assche
On Mon, 2018-05-21 at 11:37 -0700, Omar Sandoval wrote: > Have you made any progress in porting srp-test to blktests so we don't > have to have this conversation again? Hello Omar, Porting the srp-test software to the blktests framework is still high on my to-do list. I will start working on

[PATCH] block: Verify whether blk_queue_enter() is used when necessary

2018-05-21 Thread Bart Van Assche
: Bart Van Assche <bart.vanass...@wdc.com> Cc: Tejun Heo <t...@kernel.org> --- block/blk-cgroup.c | 2 ++ block/blk-core.c| 24 include/linux/blk-cgroup.h | 2 ++ include/linux/blkdev.h | 11 +++ include/linux

[PATCH v12 2/2] blk-mq: Rework blk-mq timeout handling again

2018-05-21 Thread Bart Van Assche
ion. - Atomic instructions are only used to update the request state if a concurrent request state change could be in progress. - blk_add_timer() has been split into two functions - one for the legacy block layer and one for blk-mq. Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com&g

[PATCH v12 1/2] ARM: cmpxchg64: Only define cmpxchg64() if not using the Thumb instruction set

2018-05-21 Thread Bart Van Assche
Since the implementation of cmpxchg64() uses instructions that are not Thumb instructions, only define cmpxchg64() if not building in Thumb mode. This patch allows the next patch in this series to check for cmpxchg64() support using #if defined(cmpxchg64). Signed-off-by: Bart Van Assche

[PATCH v12 0/2] blk-mq: Rework blk-mq timeout handling again

2018-05-21 Thread Bart Van Assche
etested on top of kernel v4.16. Changes compared to v1 (https://www.mail-archive.com/linux-block@vger.kernel.org/msg18089.html): - Removed the gstate and aborted_gstate members of struct request and used the __deadline member to encode both the generation and state information. Bart Van Assche (2):

Re: [PATCH v11 1/2] arch/*: Add CONFIG_ARCH_HAVE_CMPXCHG64

2018-05-21 Thread Bart Van Assche
On Fri, 2018-05-18 at 11:32 -0700, h...@zytor.com wrote: > On May 18, 2018 11:00:05 AM PDT, Bart Van Assche <bart.vanass...@wdc.com> > wrote: > > The next patch in this series introduces a call to cmpxchg64() > > in the block layer core for those architectures on whic

Re: [PATCH 00/10] Misc block layer patches for bcachefs

2018-05-21 Thread Bart Van Assche
On Sun, 2018-05-20 at 19:58 -0400, Kent Overstreet wrote: > On Sun, May 20, 2018 at 11:40:45PM +0000, Bart Van Assche wrote: > > On Sun, 2018-05-20 at 19:21 -0400, Kent Overstreet wrote: > > > I really have better things to do than debug someone else's tests... > > >

Re: [PATCH 00/10] Misc block layer patches for bcachefs

2018-05-20 Thread Bart Van Assche
On Sun, 2018-05-20 at 19:21 -0400, Kent Overstreet wrote: > I really have better things to do than debug someone else's tests... > [ ... ] > ../run_tests: line 65: cd: /lib/modules/4.16.0+/kernel/block: No such file or > directory Kernel v4.16 is too old to run these tests. The srp-test script

Re: [PATCH 00/10] Misc block layer patches for bcachefs

2018-05-20 Thread Bart Van Assche
On Sun, 2018-05-20 at 19:00 -0400, Kent Overstreet wrote: > On Sun, May 20, 2018 at 10:35:29PM +0000, Bart Van Assche wrote: > > On Sun, 2018-05-20 at 18:31 -0400, Kent Overstreet wrote: > > > On Sun, May 20, 2018 at 10:19:13PM +0000, Bart Van Assche wrote: > > > &g

Re: [PATCH 00/10] Misc block layer patches for bcachefs

2018-05-20 Thread Bart Van Assche
On Sun, 2018-05-20 at 18:31 -0400, Kent Overstreet wrote: > On Sun, May 20, 2018 at 10:19:13PM +0000, Bart Van Assche wrote: > > On Sun, 2018-05-20 at 18:17 -0400, Kent Overstreet wrote: > > > On Fri, May 18, 2018 at 03:12:27PM +0000, Bart Van Assche wrote: > > > &g

Re: [PATCH 00/10] Misc block layer patches for bcachefs

2018-05-20 Thread Bart Van Assche
On Sun, 2018-05-20 at 18:17 -0400, Kent Overstreet wrote: > On Fri, May 18, 2018 at 03:12:27PM +0000, Bart Van Assche wrote: > > On Fri, 2018-05-18 at 05:06 -0400, Kent Overstreet wrote: > > > On Thu, May 17, 2018 at 08:54:57PM +0000, Bart Van Assche wrote: > > > &

[PATCH v3 0/2] Ensure that a request queue is dissociated from the cgroup controller

2018-05-18 Thread Bart Van Assche
Van Assche (2): block: Introduce blk_exit_queue() block: Ensure that a request queue is dissociated from the cgroup controller block/blk-core.c | 54 ++ block/blk-sysfs.c | 25 + block/blk.h | 1 + 3 files

[PATCH v3 2/2] block: Ensure that a request queue is dissociated from the cgroup controller

2018-05-18 Thread Bart Van Assche
eue removal and the block cgroup controller") Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Tested-by: Alexandru Moise <00moses.alexande...@gmail.com> Cc: Tejun Heo <t...@kernel.org> Cc: Alexandru Moise <00moses.alexande...@gmail.com> Cc: Joseph Qi <joseph..

[PATCH v3 1/2] block: Introduce blk_exit_queue()

2018-05-18 Thread Bart Van Assche
This patch does not change any functionality. Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Cc: Alexandru Moise <00moses.alexande...@gmail.com> Cc: Hannes Reinecke <h...@suse.com> Cc: Ming Lei <ming@redhat.com> Cc: Omar Sandoval <osan...@fb

[PATCH v11 1/2] arch/*: Add CONFIG_ARCH_HAVE_CMPXCHG64

2018-05-18 Thread Bart Van Assche
The next patch in this series introduces a call to cmpxchg64() in the block layer core for those architectures on which this functionality is available. Make it possible to test whether cmpxchg64() is available by introducing CONFIG_ARCH_HAVE_CMPXCHG64. Signed-off-by: Bart Van Assche <bart.van

[PATCH v11 0/2] blk-mq: Rework blk-mq timeout handling again

2018-05-18 Thread Bart Van Assche
state members of struct request and used the __deadline member to encode both the generation and state information. Bart Van Assche (2): arch/*: Add CONFIG_ARCH_HAVE_CMPXCHG64 blk-mq: Rework blk-mq timeout handling again .../features/locking/cmpxchg64/arc

[PATCH v11 2/2] blk-mq: Rework blk-mq timeout handling again

2018-05-18 Thread Bart Van Assche
ion. - Atomic instructions are only used to update the request state if a concurrent request state change could be in progress. - blk_add_timer() has been split into two functions - one for the legacy block layer and one for blk-mq. Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com&g

Re: [PATCH 00/10] Misc block layer patches for bcachefs

2018-05-18 Thread Bart Van Assche
On Fri, 2018-05-18 at 05:06 -0400, Kent Overstreet wrote: > On Thu, May 17, 2018 at 08:54:57PM +0000, Bart Van Assche wrote: > > With Jens' latest for-next branch I hit the kernel warning shown below. Can > > you have a look? > > Any hints on how to reproduce it? Sure. Th

Re: blk-mq: make sure that correct hctx->dispatch_from is set

2018-05-18 Thread Bart Van Assche
On Fri, 2018-05-18 at 22:46 +0800, huhai wrote: > Yes, it is more readable > > Finally, thank you for reminding me. Next time I'll change gmail to submit > patch. Hello Huhai, Please have a look at Documentation/process/email-clients.rst. Thanks, Bart.

Re: [PATCH 00/10] Misc block layer patches for bcachefs

2018-05-17 Thread Bart Van Assche
On Tue, 2018-05-08 at 21:33 -0400, Kent Overstreet wrote: > [ ... ] Hello Kent, With Jens' latest for-next branch I hit the kernel warning shown below. Can you have a look? Thanks, Bart. == BUG: KASAN: use-after-free in

Re: [PATCH 2/2] nbd: don't start req until after the dead connection logic

2018-05-17 Thread Bart Van Assche
On Thu, 2018-05-17 at 14:41 -0400, Josef Bacik wrote: > Yup I can tell you why, on 4.11 where I originally did this work > __blk_mq_requeue_request() did this > > static void __blk_mq_requeue_request(struct request *rq) > { > struct request_queue *q = rq->q; > >

Re: [PATCH 2/2] nbd: don't start req until after the dead connection logic

2018-05-17 Thread Bart Van Assche
On Thu, 2017-10-19 at 16:21 -0400, Josef Bacik wrote: > + blk_mq_start_request(req); > if (unlikely(nsock->pending && nsock->pending != req)) { > blk_mq_requeue_request(req, true); > ret = 0; (replying to an e-mail from seven months ago) Hello Josef, Are

Re: [PATCH v9 2/2] blk-mq: Rework blk-mq timeout handling again

2018-05-16 Thread Bart Van Assche
On Wed, 2018-05-16 at 19:31 +0200, h...@lst.de wrote: > On Wed, May 16, 2018 at 04:47:54PM +0000, Bart Van Assche wrote: > > I think your patch changes the order of changing the request state and > > calling mod_timer(). In my patch the request state and the deadline are &g

Re: [PATCH v9 2/2] blk-mq: Rework blk-mq timeout handling again

2018-05-16 Thread Bart Van Assche
On Wed, 2018-05-16 at 18:24 +0200, h...@lst.de wrote: > On Wed, May 16, 2018 at 04:17:42PM +0000, Bart Van Assche wrote: > > There is another reason the deadline is included in the atomic operation, > > namely to handle races between the BLK_EH_RESET_TIMER case in > >

Re: [PATCH v9 2/2] blk-mq: Rework blk-mq timeout handling again

2018-05-16 Thread Bart Van Assche
On Wed, 2018-05-16 at 14:51 +0200, Christoph Hellwig wrote: > I've been looking at this carefully, and I don't think we need cmpxchg64 > at all, and we don't need anywhere near as many cmpxchg operations either. > > The only reason to include the deadline in the atomic operation is the >

Re: INFO: task hung in blk_queue_enter

2018-05-16 Thread Bart Van Assche
On Wed, 2018-05-16 at 17:16 +0200, Dmitry Vyukov wrote: > On Wed, May 16, 2018 at 4:56 PM, Bart Van Assche <bart.vanass...@wdc.com> > wrote: > > On Wed, 2018-05-16 at 22:05 +0900, Tetsuo Handa wrote: > > > diff --git a/block/blk-core.c b/block/blk-core.c > >

Re: INFO: task hung in blk_queue_enter

2018-05-16 Thread Bart Van Assche
On Wed, 2018-05-16 at 22:05 +0900, Tetsuo Handa wrote: > One ore more threads are waiting for q->mq_freeze_depth to become 0. But the > thread who incremented q->mq_freeze_depth at blk_freeze_queue_start(q) from > blk_freeze_queue() is waiting at blk_mq_freeze_queue_wait(). Therefore, >

[PATCH v10 1/2] arch/*: Add CONFIG_ARCH_HAVE_CMPXCHG64

2018-05-15 Thread Bart Van Assche
The next patch in this series introduces a call to cmpxchg64() in the block layer core for those architectures on which this functionality is available. Make it possible to test whether cmpxchg64() is available by introducing CONFIG_ARCH_HAVE_CMPXCHG64. Signed-off-by: Bart Van Assche <bart.van

[PATCH v10 2/2] blk-mq: Rework blk-mq timeout handling again

2018-05-15 Thread Bart Van Assche
to two functions - one for the legacy block layer and one for blk-mq. Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Cc: Tejun Heo <t...@kernel.org> Cc: Christoph Hellwig <h...@lst.de> Cc: Jianchao Wang <jianchao.w.w...@oracle.com> Cc: Ming Lei <ming@redhat.c

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