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
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
const char *blk_mq_rq_state_name(enum mq_rq_state rq_state)
> {
> - if (WARN_ON_ONCE((unsigned int)rq_state >
> + if (WARN_ON_ONCE((unsigned int)rq_state >=
>ARRAY_SIZE(blk_mq_rq_state_name_array)))
> return "(?)";
> return blk_mq_rq_state_name_array[rq_state];
Reviewed-by: 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
$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
).
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
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
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
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
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
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
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
-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
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
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"
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
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
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
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
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
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 +
+++ results/nodev/srp/001.o
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
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/
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
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
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
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
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 co-ex
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 not
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 nee
On 06/26/18 08:53, Martin K. Petersen wrote:
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.
Patches 1 and 2 look fine. However, I'm not sure I'm so keen on patch
3.
There is no good reason to use different code paths for different
request operations. Hence remove the switch/case statement from
bio_clone_bioset().
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Ming Lei
---
block/bio.c | 15 ++-
1 file changed, 2 insertions(+), 13
On 06/26/18 18:13, Ming Lei wrote:
On Tue, Jun 26, 2018 at 03:26:24PM -0700, Bart Van Assche wrote:
There is no good reason to use different code paths for different
request operations. Hence remove the switch/case statement from
bio_clone_bioset().
Signed-off-by: Bart Van Assche
Cc
Since both blk_old_get_request() and blk_mq_alloc_request() initialize
rq->__data_len to zero, it is not necessary to initialize that member
in nvme_nvm_alloc_request(). Hence remove the rq->__data_len
initialization from nvme_nvm_alloc_request().
Signed-off-by: Bart Van Assche
---
driver
: f9d03f96b988 ("block: improve handling of the magic discard payload")
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Mike Snitzer
Cc: Ming Lei
Cc: Hannes Reinecke
Cc: Johannes Thumshirn
Cc:
---
block/blk-core.c | 4
1 file changed, 4 insertions(+)
diff --git a
nce check, adding
.dispatch_wait to a wait queue and removing the wait queue entry
must all be protected by both the hctx lock and the wait queue
lock.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Omar Sandoval
Cc: Hannes Reinecke
Cc: Johannes Thumshirn
---
Chan
oth functions ignore
RQF_SPECIAL_PAYLOAD. See also commit f9d03f96b988 ("block: improve
handling of the magic discard payload").
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Ming Lei
---
block/blk-core.c | 4
1 file changed, 4 insertions(+)
diff --git a/block/blk-core.c b/blo
Although __bio_clone_fast() copies bi_io_vec, it does not copy bi_vcnt,
the number of elements in bi_io_vec[] that contains data. Copy bi_vcnt
such that code that needs this member behaves identically for original
and for cloned requests.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc
This patch avoids that the following warning appears when building
with gcc 8 and W=1:
./include/trace/events/wbt.h:36:3: warning: 'strncpy' specified bound 32 equals
destination size [-Wstringop-truncation]
Signed-off-by: Bart Van Assche
---
include/trace/events/wbt.h | 5 +++
This test program is used by one of the srp tests.
Signed-off-by: Bart Van Assche
---
src/.gitignore | 1 +
src/Makefile | 9 +-
src/discontiguous-io.cpp | 340 +++
3 files changed, 349 insertions(+), 1 deletion(-)
create mode
changes in this patch are:
- Document required kernel config options, user space packages and
multipath.conf in README.md.
- Add file tests/srp/functions with shell functions that are used by
multiple SRP tests.
- Add file tests/srp/rc.
Signed-off-by: Bart Van Assche
---
README.md
Additionally, move -Wall from the C compilation rule to the $(CFLAGS)
variable.
Signed-off-by: Bart Van Assche
---
src/Makefile | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/Makefile b/src/Makefile
index 612282d14af8..efbf393f4c58 100644
--- a/src/Makefile
requirements in README.md.
Bart Van Assche (3):
src/Makefile: Rename $(TARGETS) into $(C_TARGETS)
Add the discontiguous-io test program
Add tests for the SRP initiator and target drivers
README.md| 71 +++
src/.gitignore |1 +
src/Makefile | 17 +-
src
On 06/27/18 16:42, Ming Lei wrote:
Reviewed-by: Ming Lei
BTW, if possible, could you please make a block test to catch this issue?
Hello Ming,
Thanks for the review.
I ran into this while testing the blktests port of the SRP tests scripts.
Bart.
On 06/27/18 16:21, Ming Lei wrote:
What we need to do is to only copy the 1st bvec for WRITE_SAME, your patch
changes to copy (bio->bi_iter.bi_size / block size) bvecs, then memory
corruption
may be triggered. So bio_for_each_segment() can't be used here.
Has it been considered to use memcpy()
On 06/27/18 16:50, Ming Lei wrote:
On Wed, Jun 27, 2018 at 01:12:31PM -0700, Bart Van Assche wrote:
Although __bio_clone_fast() copies bi_io_vec, it does not copy bi_vcnt,
the number of elements in bi_io_vec[] that contains data. Copy bi_vcnt
such that code that needs this member behaves
On 06/27/18 16:27, Ming Lei wrote:
On Wed, Jun 27, 2018 at 01:02:12PM -0700, Bart Van Assche wrote:
Because the hctx lock is not held around the only
blk_mq_tag_wakeup_all() call in the block layer, the wait queue
entry removal in blk_mq_dispatch_wake() is protected by the wait
queue lock only
On 06/27/18 17:30, Ming Lei wrote:
One core idea of immutable bvec is to use bio->bi_iter and the original
bvec table to iterate over anywhere in the bio. That is why .bi_io_vec
needs to copy, but not see any reason why .bi_vcnt needs to do.
Do you have use cases on .bi_vcnt for cloned bio?
So
On 06/28/18 16:16, Kent Overstreet wrote:
On Fri, Jun 29, 2018 at 07:10:47AM +0800, Ming Lei wrote:
On Thu, Jun 28, 2018 at 11:21 PM, Bart Van Assche
wrote:
On 06/27/18 17:30, Ming Lei wrote:
One core idea of immutable bvec is to use bio->bi_iter and the original
bvec table to iterate o
If you would like to see the patches I came up with to add
REQ_OP_WRITE_SAME support to LIO, I have attached these to this e-mail.
Thanks,
Bart.
>From 44c0b07191629e4d9b1cefb43cc9f84e5491bb81 Mon Sep 17 00:00:00 2001
From: Bart Van Assche
Date: Thu, 28 Jun 2018 10:44:35 -0700
Subject: [
On 06/28/18 16:43, Omar Sandoval wrote:
On Wed, Jun 27, 2018 at 02:49:08PM -0700, Bart Van Assche wrote:
[ ... ]
srp/002 (File I/O on top of multipath concurrently with logout and login (mq))
[failed]
runtime 6.680s ... 6.640s
--- tests/srp/002.out 2018-06-28 15:18:36.537169282
On 06/28/18 17:04, Kent Overstreet wrote:
On Thu, Jun 28, 2018 at 04:54:44PM -0700, Bart Van Assche wrote:
Thanks for chiming in. The linux-block mailing list is archived by multiple
websites. The entire e-mail thread is available on e.g.
https://www.mail-archive.com/linux-block@vger.kernel.org
On Tue, 2018-07-03 at 14:39 -0700, Omar Sandoval wrote:
> Alright, I installed multipath-tools from source and the segfaults are
> gone, but I still don't get these symlinks. Instead, they show up as
>
> /dev/disk/by-id/scsi-3600140572616d6469736b320
>
> Any ideas?
Hello Omar,
The dm-uu
:" as subject-prefix. Should this patch have the same
subject prefix?
Anyway:
Reviewed-by: Bart Van Assche
On Fri, 2018-07-06 at 16:03 -0700, Omar Sandoval wrote:
> Alright, I'm not getting the udev events at all (even after enabling
> CONFIG_DM_UEVENT in addition to everything mentioned in the README). I
> have no idea where to go from here.
>
> After, e.g., srp/002 fails, this is the state of my syst
This test program will be used by one of the srp tests.
Signed-off-by: Bart Van Assche
---
src/.gitignore | 1 +
src/Makefile | 9 +-
src/discontiguous-io.cpp | 340 +++
3 files changed, 349 insertions(+), 1 deletion(-)
create mode
changes in this patch are:
- Document how to install multipath.conf in README.md.
- Add function _have_kernel_option to common/rc.
- Add file tests/srp/rc with shell functions that are used by multiple SRP
tests.
Signed-off-by: Bart Van Assche
---
README.md| 13 +
common/rc
This makes it safe to use $FULL in shell code that modifies (and
restores) 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 a63553120635..5f4461f8b5b4 100755
--- a/check
+++ b/check
@@ -313,7
This patch does not change any functionality but will make it easier
to add support for building C++ code.
Signed-off-by: Bart Van Assche
---
src/Makefile | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/Makefile b/src/Makefile
index 612282d14af8..7d15d115f6df
Signed-off-by: Bart Van Assche
---
src/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Makefile b/src/Makefile
index 7d15d115f6df..efbf393f4c58 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -8,7 +8,7 @@ C_TARGETS := \
TARGETS := $(C_TARGETS)
-CFLAGS
P tests do not start if LIO was already configured (reported by Ming).
- Documented the SRP test requirements in README.md.
Bart Van Assche (6):
dir-locals.el: Add c-mode settings
check: Make $FULL an absolute path
src/Makefile: Introduce the C_TARGETS variable
src/Makefile: Move -Wall fr
Add c-mode settings for the files in the src directory. Additionally,
make indent-tabs-mode global such that it also applies to the
.dir-locals.el file itself.
Signed-off-by: Bart Van Assche
---
.dir-locals.el | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/.dir
On Mon, 2018-07-09 at 08:06 +0200, Hannes Reinecke wrote:
> You can switch off this behaviour with the option
>
> find_multipaths no
Thanks Hannes!
Bart.
On Tue, 2018-07-10 at 12:57 -0700, Omar Sandoval wrote:
> As a further improvement, is it possible to configure multipathd to read
> from a custom configuration path? That way we could, e.g., dump the
> required multipath.conf in $TMPDIR instead of requiring the system-level
> configuration.
To my
On Tue, 2018-07-10 at 20:40 +, Bart Van Assche wrote:
> On Tue, 2018-07-10 at 12:57 -0700, Omar Sandoval wrote:
> > As a further improvement, is it possible to configure multipathd to read
> > from a custom configuration path? That way we could, e.g., dump the
> > requi
On Mon, 2018-05-21 at 17:11 -0600, Keith Busch wrote:
> /*
> - * We marked @rq->aborted_gstate and waited for RCU. If there were
> - * completions that we lost to, they would have finished and
> - * updated @rq->gstate by now; otherwise, the completion path is
> - * now g
On 07/12/18 13:29, Helge Deller wrote:
Use the existing %pad printk format to print dma_addr_t values.
This avoids the following warnings when compiling on the parisc64 platform:
Reviewed-by: Bart Van Assche
On Thu, 2018-07-12 at 13:24 -0600, Keith Busch wrote:
> On Thu, Jul 12, 2018 at 06:16:12PM +0000, Bart Van Assche wrote:
> > What prevents that a request finishes and gets reused after the
> > blk_mq_req_expired() call has finished and before kref_get_unless_zero() is
> > call
On Fri, 2018-07-13 at 09:43 -0600, Keith Busch wrote:
> On Thu, Jul 12, 2018 at 10:24:42PM +0000, Bart Van Assche wrote:
> > Before commit 12f5b9314545 ("blk-mq: Remove generation seqeunce"), if a
> > request completion was reported after request timeout processing ha
On Fri, 2018-07-13 at 12:47 -0600, Keith Busch wrote:
> On Fri, Jul 13, 2018 at 03:52:38PM +0000, Bart Van Assche wrote:
> > I think that behavior change even can trigger a kernel crash.
>
> I think we are past acknowledging issues exist with timeouts.
Hello Keith,
How do you wan
Now that the blk-mq core processes power management requests
(marked with RQF_PREEMPT) in other states than RPM_ACTIVE, enable
runtime power management for blk-mq.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Alan Stern
Cc: Johannes Thumshirn
---
block/blk-core.c
Hello Jens,
This patch series not only enables runtime power management for blk-mq but also
simplifies power management for the legacy block layer. Please consider this
patch series for kernel v4.19 (I am aware that you are on vacation).
Thanks,
Bart.
Bart Van Assche (3):
block: Fix a
RQF_PM.
This is safe because the power management core serializes system-wide
suspend/resume and runtime power management state changes.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Alan Stern
Cc: Johannes Thumshirn
---
block/blk-core.c
Since the REQ_PREEMPT flag has been renamed into RQF_PREEMPT, update the
comment that refers to that flag.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Alan Stern
Cc: Johannes Thumshirn
---
include/linux/blkdev.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion
On Wed, 2018-07-18 at 20:16 +0800, Ming Lei wrote:
> On Wed, Jul 18, 2018 at 7:49 AM, Bart Van Assche
> wrote:
> > @@ -3801,8 +3778,11 @@ int blk_pre_runtime_suspend(struct request_queue *q)
> > if (!q->dev)
> > return ret;
> >
&
On Wed, 2018-07-18 at 11:00 -0600, Keith Busch wrote:
> void blk_sync_queue(struct request_queue *q)
> {
> - del_timer_sync(&q->timeout);
> - cancel_work_sync(&q->timeout_work);
> -
> if (q->mq_ops) {
> struct blk_mq_hw_ctx *hctx;
> int i;
> @@ -415,6 +41
On Wed, 2018-07-18 at 11:45 -0600, Keith Busch wrote:
> On Wed, Jul 18, 2018 at 05:18:45PM +0000, Bart Van Assche wrote:
> > On Wed, 2018-07-18 at 11:00 -0600, Keith Busch wrote:
> > > - cancel_work_sync(&q->timeout_work);
> > > -
> > > if (q->mq_ops
On Wed, 2018-07-18 at 14:53 -0600, Keith Busch wrote:
> If scsi needs this behavior, why not just put that behavior in scsi? It
> can set the state to complete and then everything can play out as
> before.
> [ ... ]
There may be other drivers that need the same protection the SCSI core needs
so I
On Wed, 2018-07-18 at 22:39 +0200, h...@lst.de wrote:
> On Wed, Jul 18, 2018 at 09:56:50PM +0200, h...@lst.de wrote:
> > The important bit is that we need to fix this issue quickly. We are
> > past -rc5 so I'm rather concerned about anything too complicated.
> >
> > I'm not even sure SCSI has a p
On Wed, 2018-07-18 at 15:17 -0600, Keith Busch wrote:
> There are not that many blk-mq drivers, so we can go through them all.
I'm not sure that's the right approach. I think it is the responsibility of
the block layer to handle races between completion handling and timeout
handling and that this
On Thu, 2018-07-19 at 06:45 +0800, Ming Lei wrote:
> So once blk_freeze_queue_start() returns, percpu_ref_is_zero() won't
> return true only until the rcu confirmation is done. That means this
> approach may not put device down.
Hello Ming,
I agree with your conclusion that it is not guaranteed t
On Thu, 2018-07-19 at 09:56 -0600, Keith Busch wrote:
> Even some scsi drivers are susceptible to losing their requests with the
> reverted behavior: take virtio-scsi for example, which returns RESET_TIMER
> from it's timeout handler. With the behavior everyone seems to want,
> a natural completion
anchao Wang
Cc: Johannes Thumshirn
Cc: Jack Wang
Cc:
Signed-off-by: Bart Van Assche
[ bvanassche: modified patch title, description and Cc-list ]
---
block/blk-mq-sched.c | 10 --
block/blk-mq-tag.c | 1 +
block/blk-mq-tag.h | 1 +
block/blk-mq.c | 4 ++--
inclu
Commit ca4b2a011948 ("null_blk: add zone support") breaks several
blktests scripts because it renamed the null_blk kernel module into
null_blk_mod. Hence rename null_blk_mod back into null_blk.
Fixes: ca4b2a011948 ("null_blk: add zone support")
Signed-off-by: Bart Van Assche
t the blk_eh_timer_return values")
Fixes: 6600593cbd93 ("block: rename BLK_EH_NOT_HANDLED to BLK_EH_DONE")
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Hannes Reinecke
Cc: Johannes Thumshirn
---
Documentation/scsi/scsi_eh.txt| 4
On Tue, 2018-07-24 at 16:10 +0800, jianchao.wang wrote:
> The blk_mq_hw_ctx structure is also per request_queue
> Please refer to blk_mq_init_allocated_queue -> blk_mq_realloc_hw_ctxs
Hello Jianchao,
I think that Ming Lei's patch "blk-mq: remove synchronize_rcu() from
blk_mq_del_queue_tag_set()"
On Mon, 2018-07-23 at 08:37 -0600, Keith Busch wrote:
> diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
> index 8932ae81a15a..2715cdaa669c 100644
> --- a/drivers/scsi/scsi_error.c
> +++ b/drivers/scsi/scsi_error.c
> @@ -296,6 +296,20 @@ enum blk_eh_timer_return scsi_times_out(str
On Fri, 2018-07-13 at 15:29 +0200, Patrick Steinhardt wrote:
> When power management for SCSI is enabled and if a device uses blk-mq,
> it is possible to trigger a `NULL` pointer exception when resuming that
> device. The NPE is triggered when trying to dereference the `request_fn`
> function point
Since the REQ_PREEMPT flag has been renamed into RQF_PREEMPT, update the
comment that refers to that flag.
Signed-off-by: Bart Van Assche
Reviewed-by: Johannes Thumshirn
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Alan Stern
---
include/linux/blkdev.h | 2 +-
1 file changed, 1 insertion(+), 1
Serialize these operations because the next patch will add code into
blk_pre_runtime_suspend() that should not run concurrently with queue
freezing nor unfreezing.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Johannes Thumshirn
Cc: Alan Stern
---
block/blk-core.c
Now that the blk-mq core processes power management requests
(marked with RQF_PREEMPT) in other states than RPM_ACTIVE, enable
runtime power management for blk-mq.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Alan Stern
Cc: Johannes Thumshirn
---
block/blk-pm.c | 4
RQF_PM.
This is safe because the power management core serializes system-wide
suspend/resume and runtime power management state changes.
Signed-off-by: Bart Van Assche
Cc: Martin K. Petersen
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Alan Stern
Cc: Johannes Thumshirn
---
block/blk-core.c
separate file.
- Addressed Ming's feedback.
Bart Van Assche (5):
block: Fix a comment in a header file
block: Move power management functions into new source files
block: Serialize queue freezing and blk_pre_runtime_suspend()
block, scsi: Rework runtime power management
blk-mq: Enable su
the block layer
core code but also reduces the size of header file
and hence should help to reduce the build time of the Linux kernel
if CONFIG_PM is not defined.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Johannes Thumshirn
Cc: Alan Stern
---
block/Makefile
On Thu, 2018-07-26 at 10:45 +0800, jianchao.wang wrote:
> On 07/26/2018 06:26 AM, Bart Van Assche wrote:
> > +
> > +void blk_pm_runtime_lock(struct request_queue *q)
> > +{
> > + spin_lock(&q->rpm_lock);
> > + wait_event_interruptible_locked(q->rpm
On Thu, 2018-07-26 at 10:45 +0800, jianchao.wang wrote:
> On 07/26/2018 06:26 AM, Bart Van Assche wrote:
> > @@ -102,9 +109,11 @@ int blk_pre_runtime_suspend(struct request_queue *q)
> > return ret;
> >
> > blk_pm_runtime_lock(q);
> > + blk_
On Fri, 2018-07-27 at 09:57 +0800, jianchao.wang wrote:
> If q_usage_counter is not zero here, we will leave the request_queue in
> preempt only mode.
That's on purpose. If q_usage_counter is not zero then blk_pre_runtime_suspend()
will return -EBUSY. That error code will be passed to blk_post_ru
On Fri, 2018-07-27 at 09:57 +0800, jianchao.wang wrote:
> Something like:
>
> percpu_ref_switch_to_atomic_sync(&q->q_usage_counter);
> if (!percpu_ref_is_zero(&q->q_usage_counter)) {
> ret = -EBUSY;
> pm_runtime_mark_last_busy(q->dev);
> } else {
>
Commit 12f5b9314545 ("blk-mq: Remove generation seqeunce") removed the
only u64_stats_sync instance from but did not remove
the corresponding #include directive. Since the #include directive is
no longer needed, remove it.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: K
t timed out out mq requests to complete")
Signed-off-by: Bart Van Assche
Cc: Martin K. Petersen
Cc: Christoph Hellwig
Cc: Keith Busch
Cc: Jianchao Wang
Cc: Ming Lei
---
block/blk-core.c | 3 +
block/blk-mq-debugfs.c| 3 +-
block/blk-m
101 - 200 of 2721 matches
Mail list logo