Show the SCSI CDB, .eh_eflags and .result for pending SCSI commands
in /sys/kernel/debug/block/*/mq/*/dispatch and */rq_list.
Signed-off-by: Bart Van Assche
Cc: Martin K. Petersen
Cc: James Bottomley
Cc: Omar Sandoval
Cc: Hannes Reinecke
Cc:
---
drivers/scsi/scsi_lib.c | 27
Show the operation name, .cmd_flags and .rq_flags as names instead
of numbers.
Signed-off-by: Bart Van Assche
Cc: Omar Sandoval
Cc: Hannes Reinecke
---
block/blk-mq-debugfs.c | 72 +++---
1 file changed, 69 insertions(+), 3 deletions(-)
diff --git
The blk-mq debugfs attributes are removed after blk_cleanup_queue()
has finished. Since running a queue after a queue has entered the
"dead" state is not allowed, disallow this. This patch avoids that
an attempt to run a dead queue triggers a kernel crash.
Signed-off-by: Bart Van Assche
On Wed, 2017-04-12 at 00:13 +0200, Javier González wrote:
> please point out to any other tools/concerns you may have.
Hello Javier,
Do you already have an account at https://scan.coverity.com/? Any Linux
kernel developer can get an account for free. A full Coverity scan of
Linus' tree is availab
st
onto a dying queue by changing the blk_freeze_queue_start() call
in blk_set_queue_dying() into a blk_freeze_queue() call.
Signed-off-by: Bart Van Assche
Cc: Mike Snitzer
Cc: Ming Lei
Cc:
---
block/blk-core.c | 9 +
block/blk-exec.c | 7 +--
2 files changed, 10 insertions(+), 6 de
On Wed, 2017-04-12 at 08:01 +0200, Paolo Valente wrote:
> Where is my mistake?
I think in the Makefile. How about the patch below? Please note that I'm no
Kbuild expert.
diff --git a/block/Makefile b/block/Makefile
index 546066ee7fa6..b3711af6b637 100644
--- a/block/Makefile
+++ b/block/Makefile
On Wed, 2017-04-12 at 12:55 +0200, Benjamin Block wrote:
> On Fri, Apr 07, 2017 at 11:16:48AM -0700, Bart Van Assche wrote:
> > The six patches in this patch series fix the queue lockup I reported
> > recently on the linux-block mailing list. Please consider these patches
> >
On Wed, 2017-04-12 at 13:01 +0800, Ming Lei wrote:
> On Wed, Apr 12, 2017 at 7:58 AM, Bart Van Assche
> wrote:
> >
> > diff --git a/block/blk-exec.c b/block/blk-exec.c
> > index 8cd0e9bc8dc8..f7d9bed2cb15 100644
> > --- a/block/blk-exec.c
> > +++ b/block/blk
On Wed, 2017-04-12 at 11:42 +0800, Ming Lei wrote:
> On Tue, Apr 11, 2017 at 06:18:36PM +0000, Bart Van Assche wrote:
> > On Tue, 2017-04-11 at 14:03 -0400, Mike Snitzer wrote:
> > > Rather than working so hard to use DM code against me, your argument
> > > should be:
On Fri, 2017-04-14 at 00:06 +0800, Ming Lei wrote:
> But if one rq starts with non-aligned buffer(the 1st bvec's
> bv_offset isn't zero) and if we allow to merge, it is quite
> difficult to respect sg gap limit, especially the segment
> can't be at maximum segment size, otherwise the segment
> ends
On 04/12/17 19:20, Ming Lei wrote:
> On Wed, Apr 12, 2017 at 06:38:07PM +0000, Bart Van Assche wrote:
>> If the blk-mq core would always rerun a hardware queue if a block driver
>> returns BLK_MQ_RQ_QUEUE_BUSY then that would cause 100% of a single CPU core
>
> It won't
On Thu, 2017-04-06 at 17:39 +0200, Christoph Hellwig wrote:
> This drivers was added in 2008, but as far as a I can tell we never had a
> single platform that actually registered resources for the platform driver.
>
> It's also been unmaintained for a long time and apparently has a ATA mode
> that
On Thu, 2017-04-06 at 17:39 +0200, Christoph Hellwig wrote:
> diff --git a/fs/nfsd/blocklayout.c b/fs/nfsd/blocklayout.c
> index 92b4b41d19d2..4b72fdf67548 100644
> --- a/fs/nfsd/blocklayout.c
> +++ b/fs/nfsd/blocklayout.c
> @@ -242,8 +242,8 @@ static int nfsd4_scsi_identify_device(struct block_dev
On Thu, 2017-04-06 at 17:39 +0200, Christoph Hellwig wrote:
> [ ... ]
Reviewed-by: Bart Van Assche
On Thu, 2017-04-06 at 17:39 +0200, Christoph Hellwig wrote:
> Currently error is always 0 for non-passthrough requests when reaching the
> scsi_noretry_cmd check in scsi_io_completion, which effectively disables
> all fastfail logic. Fix this by having a single call to
> __scsi_error_from_host_byt
On Thu, 2017-04-13 at 16:01 -0700, Omar Sandoval wrote:
> On Tue, Apr 11, 2017 at 01:58:37PM -0700, Bart Van Assche wrote:
> > The blk-mq debugfs attributes are removed after blk_cleanup_queue()
> > has finished. Since running a queue after a queue has entered the
> > "
On Wed, 2017-04-12 at 10:23 +0200, Jan Kara wrote:
> +#ifndef CONFIG_BLK_WBT_MQ
> + if (q->mq_ops)
> + return;
> +#endif
> +#ifndef CONFIG_BLK_WBT_SQ
> + if (q->request_fn)
> + return;
> +#endif
> +
> + /*
> + * If this fails, we don't get throttling
> +
On Thu, 2017-04-13 at 16:21 -0700, Omar Sandoval wrote:
> How about passing the seq_file to the callback instead of this
> arbitrarily-sized on-stack buffer?
Hello Omar,
That sounds like a good idea to me. I will make that change.
Bart.
On Fri, 2017-04-14 at 00:40 -0700, Omar Sandoval wrote:
> On Thu, Apr 13, 2017 at 11:05:32PM +0000, Bart Van Assche wrote:
> > On Thu, 2017-04-13 at 16:01 -0700, Omar Sandoval wrote:
> > > Looking at this, I think we have similar issues with most of the other
> > > de
On Fri, 2017-04-14 at 09:13 +0800, Ming Lei wrote:
> On Thu, Apr 13, 2017 at 09:59:57AM -0700, Bart Van Assche wrote:
> > On 04/12/17 19:20, Ming Lei wrote:
> > > On Wed, Apr 12, 2017 at 06:38:07PM +0000, Bart Van Assche wrote:
> > > > If the blk-mq core would alwa
On Fri, 2017-04-14 at 10:13 -0700, Omar Sandoval wrote:
> Thanks, Bart. In this case, the absence of the "mq" directory should
> tell you that the queue is dead. Will you move the cleanup in v2 or
> should I submit a separate patch?
Hello Omar,
I will include a patch in v2 of this patch series th
On Fri, 2017-04-14 at 14:02 -0600, Jens Axboe wrote:
> I was waiting for further comments on patch 3/3.
Hello Jens,
Patch 3/3 is probably fine but I hope that you understand that the introduction
of a new race condition does not make me enthusiast. Should your explanation of
why that race is harm
A later patch will move the call of blk_mq_debugfs_register() to
a function to which the queue name is not passed as an argument.
To avoid having to add a 'name' argument to multiple callers, let
blk_mq_debugfs_register() look up the queue name.
Signed-off-by: Bart Van Assche
Cc: Oma
Move the "state" attribute from the top level to the "mq" directory
as requested by Omar.
Signed-off-by: Bart Van Assche
Reviewed-by: Omar Sandoval
Cc: Hannes Reinecke
---
block/blk-mq-debugfs.c | 9 +
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/bl
One of the debugfs attributes allows to run a queue. Since running
a queue after a queue has entered the "dead" state is not allowed
and even can cause a kernel crash, unregister the debugfs attributes
before a queue reaches the "dead" state.
Signed-off-by: Bart Van Assche
C
This new callback function will be used in the next patch to show
more information about SCSI requests.
Signed-off-by: Bart Van Assche
Cc: Omar Sandoval
Cc: Hannes Reinecke
---
block/blk-mq-debugfs.c | 6 +-
include/linux/blk-mq.h | 6 ++
2 files changed, 11 insertions(+), 1 deletion
starts instead of checking the "dead" queue flag.
- Changed "rq->cmd_flags ^ op" into "rq->cmd_flags & ~REQ_OP_MASK" as
proposed by Omar.
- A seq_file pointer is now passed to the new queue_rq callback function
instead of a fixed-size char buffer.
Bart V
This patch does not change any functionality but makes it possible
to produce a single line of output with multiple flag-to-name
translations.
Signed-off-by: Bart Van Assche
Reviewed-by: Omar Sandoval
Cc: Hannes Reinecke
---
block/blk-mq-debugfs.c | 4 +++-
1 file changed, 3 insertions(+), 1
ion with the queue sysfs_lock
instead of the global mutex all_q_mutex.
Signed-off-by: Bart Van Assche
Cc: Omar Sandoval
Cc: Hannes Reinecke
---
block/blk-mq-sysfs.c | 37 ++---
block/blk-mq.h | 1 +
block/blk-sysfs.c| 6 +++---
3 files changed,
Show the SCSI CDB, .eh_eflags and .result for pending SCSI commands
in /sys/kernel/debug/block/*/mq/*/dispatch and */rq_list.
Signed-off-by: Bart Van Assche
Cc: Martin K. Petersen
Cc: James Bottomley
Cc: Omar Sandoval
Cc: Hannes Reinecke
Cc:
---
drivers/scsi/scsi_lib.c | 26
Show the operation name, .cmd_flags and .rq_flags as names instead
of numbers.
Signed-off-by: Bart Van Assche
Reviewed-by: Omar Sandoval
Cc: Hannes Reinecke
---
block/blk-mq-debugfs.c | 72 +++---
1 file changed, 69 insertions(+), 3 deletions
The global variable 'rd_size' is declared as 'int' in source file
arch/arm/kernel/atags_parse.c and as 'unsigned long' in
drivers/block/brd.c. Fix this inconsistency.
Signed-off-by: Bart Van Assche
Cc: Russell King
Cc: Jens Axboe
Cc: Jan Kara
Cc
On Tue, 2017-04-18 at 09:35 +0200, Johannes Thumshirn wrote:
> On Mon, Apr 17, 2017 at 04:10:03PM -0700, Bart Van Assche wrote:
> > The global variable 'rd_size' is declared as 'int' in source file
> > arch/arm/kernel/atags_parse.c and as 'unsigned lo
On Tue, 2017-04-18 at 19:33 +0200, Roman Penyaev wrote:
> By current email I would like to share some fresh RDMA performance
> results of IBNBD, SCST and NVMEof, based on 4.10 kernel and variety
> of configurations.
Hello Roman,
Thank you for having shared these results. But please do not expect
equest(rq);
> return err;
Hello Christoph,
Sorry that I hadn't noticed this before but shouldn't "req" be changed into
"rq"? Otherwise this patch looks fine to me. If this comment gets addressed
you can add:
Reviewed-by: Bart Van Assche
On Tue, 2017-04-18 at 08:52 -0700, Christoph Hellwig wrote:
> --- a/block/bsg.c
> +++ b/block/bsg.c
> @@ -391,13 +391,13 @@ static int blk_complete_sgv4_hdr_rq(struct request *rq,
> struct sg_io_v4 *hdr,
> struct scsi_request *req = scsi_req(rq);
> int ret = 0;
>
> - dprintk("rq
On Tue, 2017-04-18 at 08:52 -0700, Christoph Hellwig wrote:
> Now that we always have a ->complete callback we can remove the direct
> call to blk_mq_end_request, as well as the error argument to
> blk_mq_complete_request.
Hello Christoph,
Please add a runtime check that issues a warning early if
On Tue, 2017-04-18 at 08:52 -0700, Christoph Hellwig wrote:
> From: Christoph Hellwig
>
> This is for the legacy floppy and ataflop drivers that currently abuse
> ->errors for this purpose. It's stashed away in a union to not grow
> the struct size, the other fields are either used by modern dri
On Tue, 2017-04-18 at 08:52 -0700, Christoph Hellwig wrote:
> The driver never sets req->errors
Reviewed-by: Bart Van Assche
tor offset is copied into req->__sector instead of
retaining the value -1 set by blk_mq_alloc_request().
* req->errors is initialized to zero.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Matias Bjørling
Cc: Adam Manzanares
---
drivers/nvme/host/lightnvm.c | 6 +-
1 file c
Hello Jens,
This series contains three patches intended to reduce code duplication
and two patches that simplify / optimize I/O priority handling. Please
consider these patches for kernel v4.12.
Thanks,
Bart.
Bart Van Assche (5):
block: Export blk_init_request_from_bio()
null_blk: Use
Export this function such that it becomes available to block
drivers.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Matias Bjørling
Cc: Adam Manzanares
---
block/blk-core.c | 5 +++--
block/blk-mq.c | 2 +-
block/blk.h| 1 -
include/linux/blkdev.h | 1
Since only a single caller remains, inline blk_rq_set_prio(). Initialize
req->ioprio even if no I/O priority has been set in the bio nor in the
I/O context.
Signed-off-by: Bart Van Assche
Reviewed-by: Adam Manzanares
Tested-by: Adam Manzanares
Cc: Christoph Hellwig
Cc: Matias Bjørl
Since ioprio_best() translates IOPRIO_CLASS_NONE into IOPRIO_CLASS_BE
and since lower numerical priority values represent a higher priority
a simple numerical comparison is sufficient.
Signed-off-by: Bart Van Assche
Reviewed-by: Adam Manzanares
Tested-by: Adam Manzanares
Cc: Christoph Hellwig
ULL.
* req->errors is initialized to zero.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Matias Bjørling
Cc: Adam Manzanares
---
drivers/block/null_blk.c | 9 +
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c
checking the "dead" queue flag.
- Changed "rq->cmd_flags ^ op" into "rq->cmd_flags & ~REQ_OP_MASK" as
proposed by Omar.
- A seq_file pointer is now passed to the new queue_rq callback function
instead of a fixed-size char buffer.
Bart Van Assche (8):
A later patch will move the call of blk_mq_debugfs_register() to
a function to which the queue name is not passed as an argument.
To avoid having to add a 'name' argument to multiple callers, let
blk_mq_debugfs_register() look up the queue name.
Signed-off-by: Bart Van Assche
Cc: Oma
One of the debugfs attributes allows to run a queue. Since running
a queue after a queue has entered the "dead" state is not allowed
and even can cause a kernel crash, unregister the debugfs attributes
before a queue reaches the "dead" state.
Signed-off-by: Bart Van Assche
C
This new callback function will be used in the next patch to show
more information about SCSI requests.
Signed-off-by: Bart Van Assche
Cc: Omar Sandoval
Cc: Hannes Reinecke
---
block/blk-mq-debugfs.c | 6 +-
include/linux/blk-mq.h | 6 ++
2 files changed, 11 insertions(+), 1 deletion
Show the operation name, .cmd_flags and .rq_flags as names instead
of numbers.
Signed-off-by: Bart Van Assche
Reviewed-by: Omar Sandoval
Cc: Hannes Reinecke
---
block/blk-mq-debugfs.c | 72 +++---
1 file changed, 69 insertions(+), 3 deletions
This patch does not change any functionality but makes it possible
to produce a single line of output with multiple flag-to-name
translations.
Signed-off-by: Bart Van Assche
Reviewed-by: Omar Sandoval
Cc: Hannes Reinecke
---
block/blk-mq-debugfs.c | 4 +++-
1 file changed, 3 insertions(+), 1
Move the "state" attribute from the top level to the "mq" directory
as requested by Omar.
Signed-off-by: Bart Van Assche
Reviewed-by: Omar Sandoval
Cc: Hannes Reinecke
---
block/blk-mq-debugfs.c | 9 +
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/bl
ion with the queue sysfs_lock
instead of the global mutex all_q_mutex.
Signed-off-by: Bart Van Assche
Cc: Omar Sandoval
Cc: Hannes Reinecke
---
block/blk-mq-sysfs.c | 43 +++
block/blk-mq.h | 1 +
block/blk-sysfs.c| 6 +++---
3 files changed,
Show the SCSI CDB, .eh_eflags and .result for pending SCSI commands
in /sys/kernel/debug/block/*/mq/*/dispatch and */rq_list.
Signed-off-by: Bart Van Assche
Cc: Martin K. Petersen
Cc: James Bottomley
Cc: Omar Sandoval
Cc: Hannes Reinecke
Cc:
---
drivers/scsi/scsi_lib.c | 26
On 04/11/17 00:29, Paolo Valente wrote:
>
>> Il giorno 10 apr 2017, alle ore 17:15, Bart Van Assche
>> ha scritto:
>>
>> On Mon, 2017-04-10 at 11:55 +0200, Paolo Valente wrote:
>>> That said, if you do always want maximum throughput, even at the
>>>
On Wed, 2017-04-19 at 09:02 +0200, Paolo Valente wrote:
> > Il giorno 19 apr 2017, alle ore 07:01, Bart Van Assche
> > ha scritto:
> > What API was used by the Android application to tell the I/O scheduler
> > to optimize for latency? Do you think that it wo
On Wed, 2017-04-19 at 08:38 -0600, Jens Axboe wrote:
> On 04/19/2017 12:20 AM, Christoph Hellwig wrote:
> > > + req->ioprio = ioprio_valid(bio_prio(bio)) ? bio_prio(bio) : ioc ?
> > > + ioc->ioprio : IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, 0);
> >
> > I think this would be a tad cleaner with
Export this function such that it becomes available to block
drivers.
Signed-off-by: Bart Van Assche
Reviewed-by: Christoph Hellwig
Cc: Matias Bjørling
Cc: Adam Manzanares
---
block/blk-core.c | 5 +++--
block/blk-mq.c | 2 +-
block/blk.h| 1 -
include/linux
tor offset is copied into req->__sector instead of
retaining the value -1 set by blk_mq_alloc_request().
* req->errors is initialized to zero.
Signed-off-by: Bart Van Assche
Reviewed-by: Christoph Hellwig
Cc: Matias Bjørling
Cc: Adam Manzanares
---
drivers/nvme/host/lightnvm.c | 6 +
ULL.
* req->errors is initialized to zero.
Signed-off-by: Bart Van Assche
Reviewed-by: Christoph Hellwig
Cc: Matias Bjørling
Cc: Adam Manzanares
---
drivers/block/null_blk.c | 9 +
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/block/null_blk.c b/drivers
.
- Used EXPORT_SYMBOL_GPL() to export block layer internals.
Bart Van Assche (5):
block: Export blk_init_request_from_bio()
null_blk: Use blk_init_request_from_bio() instead of open-coding it
lightnvm: Use blk_init_request_from_bio() instead of open-coding it
block: Inline blk_rq_set_prio
Since ioprio_best() translates IOPRIO_CLASS_NONE into IOPRIO_CLASS_BE
and since lower numerical priority values represent a higher priority
a simple numerical comparison is sufficient.
Signed-off-by: Bart Van Assche
Reviewed-by: Adam Manzanares
Tested-by: Adam Manzanares
Reviewed-by: Christoph
Since only a single caller remains, inline blk_rq_set_prio(). Initialize
req->ioprio even if no I/O priority has been set in the bio nor in the
I/O context.
Signed-off-by: Bart Van Assche
Reviewed-by: Adam Manzanares
Tested-by: Adam Manzanares
Reviewed-by: Christoph Hellwig
Cc: Mat
On Wed, 2017-04-19 at 21:26 +0200, Christoph Hellwig wrote:
> The driver never sets req->errors, so blk_execute_rq will always return 0.
Reviewed-by: Bart Van Assche
On Wed, 2017-04-19 at 21:26 +0200, Christoph Hellwig wrote:
> --- a/drivers/scsi/osd/osd_initiator.c
> +++ b/drivers/scsi/osd/osd_initiator.c
> @@ -489,7 +489,10 @@ static void _set_error_resid(struct osd_request *or,
> struct request *req,
>
> int osd_execute_request(struct osd_request *or)
>
On Wed, 2017-04-19 at 21:27 +0200, Christoph Hellwig wrote:
> Signed-off-by: Christoph Hellwig
> Acked-by: Roger Pau Monné
> Reviewed-by: Konrad Rzeszutek Wilk
Reviewed-by: Bart Van Assche
On Wed, 2017-04-19 at 19:25 -0400, Martin K. Petersen wrote:
> Bart Van Assche writes:
> > Show the SCSI CDB, .eh_eflags and .result for pending SCSI commands
> > in /sys/kernel/debug/block/*/mq/*/dispatch and */rq_list.
>
> SCSI_EH_CANCEL_CMD is no more (as of a06586325f3
: Bart Van Assche
Cc: Shaohua Li
---
block/blk-throttle.c | 4
1 file changed, 4 insertions(+)
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index c82bf9b1fe72..9081ed9a5345 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -2059,6 +2059,10 @@ bool blk_throtl_bio
On Thu, 2017-04-20 at 16:02 +0200, Christoph Hellwig wrote:
> The function only returns -EIO if rq->errors is non-zero, which is not
> very useful and lets a large number of callers ignore the return value.
>
> Just let the callers figure out their error themselves.
Reviewed-by: Bart Van Assche
s the errors field in very creative
> ways and stores all kinds of different values in it. I didn't dare
> to touch this magic, so the abuses are brought forward 1:1.
Reviewed-by: Bart Van Assche
On Thu, 2017-04-20 at 16:03 +0200, Christoph Hellwig wrote:
> dm never uses rq->errors, so there is no need to pass an error argument
> to blk_mq_complete_request.
Reviewed-by: Bart Van Assche
On Thu, 2017-04-20 at 16:03 +0200, Christoph Hellwig wrote:
> We'll get all proper errors reported through ->end_io and ->errors will
> go away soon.
Reviewed-by: Bart Van Assche
On Thu, 2017-04-20 at 16:03 +0200, Christoph Hellwig wrote:
> Now that all drivers that call blk_mq_complete_requests have a
> ->complete callback we can remove the direct call to blk_mq_end_request,
> as well as the error argument to blk_mq_complete_request.
Reviewed-by: Bart Van Assche
On Wed, 2017-04-19 at 18:09 -0600, Jens Axboe wrote:
> On 04/19/2017 05:55 PM, Bart Van Assche wrote:
> > Avoid that the following warning is reported when building with
> > W=1 and with CONFIG_BLK_DEV_THROTTLING_LOW=n:
> >
> > block/blk-throttle.c: In function ‘blk
On Thu, 2017-04-20 at 16:45 -0600, Jens Axboe wrote:
> If we're doing a flush/fua insert, insertion might block on getting
> a driver tag, if can_block == true. Add a might_sleep check for that,
> since we just had a bug like that. This will help us catch a similar
> issue quicker in the future.
>
/block/blk-mq.c
> @@ -866,6 +866,8 @@ bool blk_mq_get_driver_tag(struct request *rq, struct
> blk_mq_hw_ctx **hctx,
> .flags = wait ? 0 : BLK_MQ_REQ_NOWAIT,
> };
>
> + might_sleep_if(wait);
> +
> if (rq->tag != -1)
> goto done;
>
>
Thanks!
Reviewed-by: Bart Van Assche
commit c13660a08c8b ("blk-mq-sched: change ->dispatch_requests()
to ->dispatch_request()") removed the last user of this function.
Hence also remove the function itself.
Signed-off-by: Bart Van Assche
Cc: Omar Sandoval
Cc: Hannes Reinecke
---
block/blk-mq-sched.c | 16 ---
Hello Jens,
Since yesterday the following complaint is reported frequently after having
installed the for-4.12/block branch on my test setup. Unless someone has a
better proposal, I will run a bisect.
BUG: sleeping function called from invalid context at
./include/linux/buffer_head.h:349
in_atom
On Fri, 2017-04-21 at 10:33 -0600, Jens Axboe wrote:
> On 04/21/2017 10:31 AM, Bart Van Assche wrote:
> > On Fri, 2017-04-21 at 10:25 -0600, Jens Axboe wrote:
> > > On 04/21/2017 09:32 AM, Bart Van Assche wrote:
> > > > Hello Jens,
> > > >
> >
On Fri, 2017-04-21 at 10:25 -0600, Jens Axboe wrote:
> On 04/21/2017 09:32 AM, Bart Van Assche wrote:
> > Hello Jens,
> >
> > Since yesterday the following complaint is reported frequently after having
> > installed the for-4.12/block branch on my test setup. Unle
On Fri, 2017-04-21 at 10:56 -0600, Jens Axboe wrote:
> On 04/21/2017 10:48 AM, Jens Axboe wrote:
> > I wonder if it's an imbalance in the preempt count. Looking at it, it
> > looks like we're not clearing the alloc data. But I would think that
> > would potentially cause much worse problems, but ma
+0x36/0x40
vfs_statx+0x67/0xc0
SYSC_newfstatat+0x20/0x40
SyS_newfstatat+0xe/0x10
entry_SYSCALL_64_fastpath+0x18/0xad
Fixes: b00c53e8f411 ("blk-mq: fix schedule-while-atomic with scheduler
attached")
Signed-off-by: Bart Van Assche
Cc: Omar Sandoval
---
block/blk-mq.c | 2 ++
1 file
On Thu, 2017-04-20 at 15:18 -0600, Scott Bauer wrote:
> [ 642.638860] BUG: KASAN: use-after-free in scsi_exit_rq+0xf3/0x120 at addr
> 8802b7fedf00
> [ 642.639362] Read of size 1 by task rcuos/5/53
> [ 642.639713] CPU: 7 PID: 53 Comm: rcuos/6 Not tainted 4.11.0-rc5+ #13
> [ 642.640170] Hard
On Fri, 2017-04-21 at 15:05 -0700, Omar Sandoval wrote:
> On Tue, Apr 18, 2017 at 04:29:42PM -0700, Bart Van Assche wrote:
> > +int blk_mq_register_dev(struct device *dev, struct request_queue *q)
> > +{
> > + int ret;
> > +
> > + ret = mutex_lock_interrupti
This patch does not change any functionality but makes it possible
to produce a single line of output with multiple flag-to-name
translations.
Signed-off-by: Bart Van Assche
Reviewed-by: Omar Sandoval
Cc: Hannes Reinecke
---
block/blk-mq-debugfs.c | 4 +++-
1 file changed, 3 insertions(+), 1
Move the "state" attribute from the top level to the "mq" directory
as requested by Omar.
Signed-off-by: Bart Van Assche
Reviewed-by: Omar Sandoval
Cc: Hannes Reinecke
---
block/blk-mq-debugfs.c | 9 +
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/bl
Make __blk_mq_register_dev() check the blk_mq_debugfs_register()
return value. In the error path, only unregister hctxs for which
registration succeeded.
Signed-off-by: Bart Van Assche
Cc: Omar Sandoval
Cc: Hannes Reinecke
---
block/blk-mq-sysfs.c | 23 +--
1 file changed
gt;cmd_flags ^ op" into "rq->cmd_flags & ~REQ_OP_MASK" as
proposed by Omar.
- A seq_file pointer is now passed to the new queue_rq callback function
instead of a fixed-size char buffer.
Bart Van Assche (10):
blk-mq: Register /queue/mq after having registered /queue
blk-mq: L
This new callback function will be used in the next patch to show
more information about SCSI requests.
Signed-off-by: Bart Van Assche
Reviewed-by: Omar Sandoval
Cc: Hannes Reinecke
---
block/blk-mq-debugfs.c | 6 +-
include/linux/blk-mq.h | 6 ++
2 files changed, 11 insertions(+), 1
ion with the queue sysfs_lock
instead of the global mutex all_q_mutex.
Signed-off-by: Bart Van Assche
Cc: Omar Sandoval
Cc: Hannes Reinecke
---
block/blk-mq-sysfs.c | 35 ---
block/blk-mq.h | 1 +
block/blk-sysfs.c| 6 +++---
3 files changed, 32 inserti
One of the debugfs attributes allows to run a queue. Since running
a queue after a queue has entered the "dead" state is not allowed
and even can cause a kernel crash, unregister the debugfs attributes
before a queue reaches the "dead" state.
Signed-off-by: Bart Van Assche
C
Show the SCSI CDB, .eh_eflags and .result for pending SCSI commands
in /sys/kernel/debug/block/*/mq/*/dispatch and */rq_list.
Signed-off-by: Bart Van Assche
Cc: Martin K. Petersen
Cc: James Bottomley
Cc: Omar Sandoval
Cc: Hannes Reinecke
Cc:
---
drivers/scsi/scsi_lib.c | 11 +++
1
A later patch will move the call of blk_mq_debugfs_register() to
a function to which the queue name is not passed as an argument.
To avoid having to add a 'name' argument to multiple callers, let
blk_mq_debugfs_register() look up the queue name.
Signed-off-by: Bart Van Assche
Cc: Oma
Since the blk_mq_debugfs_*register_hctxs() functions register and
unregister all attributes under the "mq" directory, rename these
into blk_mq_debugfs_*register_mq().
Signed-off-by: Bart Van Assche
Cc: Omar Sandoval
Cc: Hannes Reinecke
---
block/blk-mq-debugfs.c | 8
bl
Show the operation name, .cmd_flags and .rq_flags as names instead
of numbers.
Signed-off-by: Bart Van Assche
Reviewed-by: Omar Sandoval
Cc: Hannes Reinecke
---
block/blk-mq-debugfs.c | 72 +++---
1 file changed, 69 insertions(+), 3 deletions
On Mon, 2017-04-24 at 09:49 -0700, Omar Sandoval wrote:
> On Fri, Apr 21, 2017 at 04:40:20PM -0700, Bart Van Assche wrote:
> > Make __blk_mq_register_dev() check the blk_mq_debugfs_register()
> > return value.
>
> I intentionally didn't check this. In my opinion, a
On Mon, 2017-04-24 at 09:55 -0700, Omar Sandoval wrote:
> On Fri, Apr 21, 2017 at 04:40:21PM -0700, Bart Van Assche wrote:
> > One of the debugfs attributes allows to run a queue. Since running
> > a queue after a queue has entered the "dead" state is not allowed
> &
On Mon, 2017-04-24 at 10:17 -0700, Omar Sandoval wrote:
> On Mon, Apr 24, 2017 at 05:12:05PM +0000, Bart Van Assche wrote:
> > On Mon, 2017-04-24 at 09:55 -0700, Omar Sandoval wrote:
> > > On Fri, Apr 21, 2017 at 04:40:21PM -0700, Bart Van Assche wrote:
> > >
On Mon, 2017-04-24 at 10:29 -0700, Omar Sandoval wrote:
> On Mon, Apr 24, 2017 at 10:26:15AM -0700, Omar Sandoval wrote:
> > On Mon, Apr 24, 2017 at 05:24:13PM +0000, Bart Van Assche wrote:
> > > On Mon, 2017-04-24 at 10:17 -0700, Omar Sandoval wrote:
> > > > On M
On Mon, 2017-04-24 at 17:35 -0400, Martin K. Petersen wrote:
> > Show the SCSI CDB, .eh_eflags and .result for pending SCSI commands
> > in /sys/kernel/debug/block/*/mq/*/dispatch and */rq_list.
>
> Why not use SCSI tracing if you are interested in these?
Hello Martin,
SCSI tracing has to be ena
601 - 700 of 2721 matches
Mail list logo