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

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

2018-06-25 Thread Ming Lei
On Mon, Jun 25, 2018 at 10:05:41AM -0700, Bart Van Assche wrote: > 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 > >

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

2018-06-25 Thread Bart Van Assche
Most REQ_OP_WRITE_SAME requests have a data buffer size that differs from the number of bytes affected on the storage medium. Since blk_update_request() expects that its third argument is the number of bytes that have been completed from the data out buffer, pass that number fo

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

2018-06-25 Thread Bart Van Assche
The SCSI sd driver converts a block layer request into a SCSI WRITE SAME command in the following cases: 1. REQ_OP_DISCARD if the sd driver has been configured to translate this request type into WRITE SAME. 2. REQ_OP_WRITE_SAME. The SCSI sd driver sets RQF_SPECIAL_PAYLOAD in case (1) but not

[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
Now that blk_rq_payload_bytes() has been fixed, remove the __data_len hack again from sd_setup_write_same_cmnd(), the function that handles REQ_OP_WRITE_SAME. See also commit 08965c2eba13 ("Revert "sd: remove __data_len hack for WRITE SAME""). See also commit f80de881d8df ("sd: remove __data_len

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

2018-06-25 Thread Omar Sandoval
On Fri, Jun 22, 2018 at 03:19:44PM -0700, Bart Van Assche wrote: > According to the GNU make documentation, the syntax for pattern rules > is as follows: > > +: > That's because this is a static pattern rule: https://www.gnu.org/software/make/manual/html_node/Static-Usage.html So

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

[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

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

2018-06-25 Thread Omar Sandoval
On Tue, Jun 19, 2018 at 01:23:44PM -0700, Bart Van Assche wrote: > Hello Omar, > > Since I noticed that several useful shellcheck warnings are suppressed in the > blktests project, I came up with this patch series that reenables all > shellcheck warnings and also suppresses false positive

[PATCH BUGFIX 4/4] block, bfq: fix service being wrongly set to zero in case of preemption

2018-06-25 Thread Paolo Valente
If - a bfq_queue Q preempts another queue, because one request of Q arrives in time, - but, after this preemption, Q is not the queue that is set in service, then Q->entity.service is set to 0 when Q is eventually set in service. But Q should have continued receiving service with its old budget

Re: [PATCH blktests] check: add command line switch to test device drivers only

2018-06-25 Thread Omar Sandoval
On Tue, Jun 12, 2018 at 11:57:06AM +0200, Johannes Thumshirn wrote: > Sometimes it's useful to only run tests which exercise a device > special driver to verify a patch for the driver doesn't introduce a > regression. > > Running the whole test-suite is just a waste of time in this case, so >

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

Re: [PATCH blktests] check: add command line switch to test device drivers only

2018-06-25 Thread Johannes Thumshirn
Ping? -- Johannes Thumshirn Storage 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ürnberg) Key fingerprint = EC38 9CAB

[PATCH 4/5] blk-mq: remove synchronize_rcu() from blk_mq_del_queue_tag_set()

2018-06-25 Thread Ming Lei
We have to remove synchronize_rcu() from blk_queue_cleanup(), otherwise long delay can be caused during lun probe. For removing it, we have to avoid to iterate the set->tag_list in IO path, eg, blk_mq_sched_restart(). This patch reverts 5b79413946d (Revert "blk-mq: don't handle TAG_SHARED in

[PATCH 5/5] blk-mq: avoid to synchronize rcu inside blk_cleanup_queue()

2018-06-25 Thread Ming Lei
SCSI probing may synchronously create and destroy a lot of request_queues for non-existent devices. Any synchronize_rcu() in queue creation or destroy path may introduce long latency during booting, see detailed description in comment of blk_register_queue(). This patch removes one

[PATCH 3/5] blk-mq: introduce new lock for protecting hctx->dispatch_wait

2018-06-25 Thread Ming Lei
Now hctx->lock is only acquired when adding hctx->dispatch_wait to one wait queue, but not held when removing it from the wait queue. IO hang can be observed easily if SCHED RESTART is disabled, that means now RESTART exits just for fixing the issue in blk_mq_mark_tag_wait(). This patch fixes

[PATCH 2/5] blk-mq: don't pass **hctx to blk_mq_mark_tag_wait()

2018-06-25 Thread Ming Lei
'hctx' won't be changed at all, so not necessary to pass '**hctx' to blk_mq_mark_tag_wait(). Cc: Andrew Jones Cc: Christoph Hellwig Cc: Omar Sandoval Cc: Bart Van Assche Signed-off-by: Ming Lei --- block/blk-mq.c | 23 +++ 1 file changed, 11 insertions(+), 12

[PATCH 1/5] blk-mq: cleanup blk_mq_get_driver_tag()

2018-06-25 Thread Ming Lei
We never pass 'wait' as true to blk_mq_get_driver_tag(), then won't get new hctx passed out. So cleanup the usage and remove the two extra parameters. Cc: Omar Sandoval Cc: Andrew Jones Cc: Bart Van Assche Cc: Christoph Hellwig Signed-off-by: Ming Lei --- block/blk-mq.c | 19

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

2018-06-25 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage 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

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

2018-06-25 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage 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

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

2018-06-25 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage 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

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

2018-06-25 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage 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

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

2018-06-25 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage 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

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

2018-06-25 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage 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

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

2018-06-25 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage 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

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

2018-06-25 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage 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

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

2018-06-25 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage 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