On Tue 30-05-17 11:13:29, Goldwyn Rodrigues wrote:
> > Btw, can you write a small blurb up for the man page to document these
> > ѕemantics in man-page like language?
> >
>
> Yes, but which man page would it belong to?
> Should it be a subsection of errors in io_getevents/io_submit. We don't
> wa
On Tue, May 30, 2017 at 11:00:04AM +0100, David Howells wrote:
> This isn't going to work. You've effectively changed the types of the fields
> in the UUID struct from BE to CPU-endian, but you're still calling
> generate_random_uuid(), which produces a BE UUID. You need to leave the
> struct mem
On Tue, May 30, 2017 at 05:14:44PM +, Bart Van Assche wrote:
> On Sat, 2017-05-27 at 22:21 +0800, Ming Lei wrote:
> > /**
> > - * blk_mq_quiesce_queue() - wait until all ongoing queue_rq calls have
> > finished
> > + * blk_mq_quiesce_queue() - wait until all ongoing dispatching have
> > fini
Christoph Hellwig wrote:
> Does the afs protocol require a v1 uuid or does it just use the formwat on
> the wire?
The format it uses on the wire is separate XDR encoding of each of the fields
in the uuid_v1 struct, counting the elements of the node[] array separately.
I'm not sure that the serv
There is one big issue in current blk_mq_quiesce_queue():
- in case of direct issue or BLK_MQ_S_START_ON_RUN, dispatch won't
be prevented after blk_mq_quiesce_queue() is returned.
It is observed that request double-free/use-after-free
can be triggered easily when canceling NVMe requests v
blk_mq_start_stopped_hw_queues() is used implictely
as counterpart of blk_mq_quiesce_queue() for unquiescing queue,
so we introduce blk_mq_unquiesce_queue() and make it
as counterpart of blk_mq_quiesce_queue() explicitely.
This function is for improving the current quiescing mechanism
in the follo
This flag is introduced for improving the quiescing code.
Signed-off-by: Ming Lei
---
include/linux/blkdev.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 41291be82ac4..60967797f4f6 100644
--- a/include/linux/blkdev.h
+++ b/include/li
blk_mq_unquiesce_queue() is used for unquiescing the
queue explicitly, so replace blk_mq_start_stopped_hw_queues()
with it.
Cc: linux-n...@lists.infradead.org
Cc: linux-s...@vger.kernel.org
Cc: dm-de...@redhat.com
Signed-off-by: Ming Lei
---
drivers/md/dm-rq.c | 2 +-
drivers/nvme/host/cor
When nvme_kill_queues() is run, queues may be in
quiesced state, so we forcibly unquiesce queues to avoid
blocking dispatch, and I/O hang can be avoided in
remove path.
Peviously we use blk_mq_start_stopped_hw_queues() as
counterpart of blk_mq_quiesce_queue(), now we have
introduced blk_mq_unquies
Actually what we want to get from blk_mq_quiesce_queue()
isn't only to wait for completion of all ongoing .queue_rq().
In the typical context of canceling requests, we need to
make sure that the following is done in the dispatch path
before starting to cancel requests:
- failed dispatched
It is required that no dispatch can happen any more once
blk_mq_quiesce_queue() returns, and we don't have such requirement
on APIs of stopping queue.
But blk_mq_quiesce_queue() still may not block/drain dispatch in the
following cases:
- direct issue
- BLK_MQ_S_START_ON_RUN
So use the new flag
Queue can be started by other blk-mq APIs and can be used in
different cases, this limits uses of blk_mq_quiesce_queue()
if it is based on stopping queue, and make its usage very
difficult, especially users have to use the stop queue APIs
carefully for avoiding to break blk_mq_quiesce_queue().
We
This patch reverts commit 2719aa217e0d02(blk-mq: don't use
sync workqueue flushing from drivers) because only
blk_mq_quiesce_queue() need the sync flush, and now
we don't need to stop queue any more, so revert it.
Also changes to cancel_delayed_work() in blk_mq_stop_hw_queue().
Signed-off-by: Min
BLK_MQ_S_STOPPED may not be observed in other concurrent I/O paths,
we can't guarantee that dispatching won't happen after returning
from the APIs of stopping queue.
So clarify the fact and avoid potential misuse.
Signed-off-by: Ming Lei
---
block/blk-mq.c | 10 ++
1 file changed, 10 in
To enable that, make __errseq_set return the value that it was set to
we exit the loop. Take heed that that value is not suitable as a later
"since" value, as it will not have been marked seen.
Signed-off-by: Jeff Layton
---
include/linux/errseq.h | 2 +-
include/linux/fs.h
v5: don't retrofit old API over the new infrastructure
add fstype flag to indicate how wb errors are tracked within that fs
add more function variants that take a errseq_t "since" value
add second errseq_t to struct file to track metadata wb errors
convert ext4 and ext2 to use the n
Sample the wb_err before changing the directory, so that we can catch
errors that occur since that point.
Signed-off-by: Jeff Layton
---
fs/ext2/dir.c | 17 +++--
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c
index 6e476c9929f8..073f096a
Add new filemap_*wait* variants that take a "since" value and return an
error if one occurred since that sample point.
Signed-off-by: Jeff Layton
---
include/linux/fs.h | 9
mm/filemap.c | 67 ++
2 files changed, 76 insertions(+
Set the flag to indicate that we want new-style data writeback error
handling.
This means that we need to override the open routines for files and
directories so that we can sample the bdev wb_err at open.
XXX: doesn't quite pass the xfstest for this currently, as ext2_error
resets the error
Some filesystems (particularly local ones) keep a different mapping for
metadata writeback. Add a second errseq_t to struct file for tracking
metadata writeback errors. Also add a new function for checking a
mapping of the caller's choosing vs. the f_md_wb_err value.
Signed-off-by: Jeff Layton
--
Allow filesystems to pass in an errseq_t for a since value.
Signed-off-by: Jeff Layton
---
include/linux/mm.h | 2 ++
mm/page-writeback.c | 53 +
2 files changed, 43 insertions(+), 12 deletions(-)
diff --git a/include/linux/mm.h b/include/li
Grab the current mapping->wb_err when linking a transaction to the list
and stash it in the journal inode. Then we can use that as a "since"
value when committing it to ensure that there were no writeback errors
since the transaction was started.
We do still need to perform old-style error handlin
New variants of sync_filesystem and sync_blockdev.
Signed-off-by: Jeff Layton
---
fs/block_dev.c | 15 +++
fs/internal.h | 8
fs/sync.c | 45 +
include/linux/fs.h | 13 -
4 files changed, 80 insertion
Fairly straightforward conversion. In fsync, just use the file->f_wb_err
value as a "since" value. At the end, call filemap_report_wb_err to
advance the cursor in it.
Signed-off-by: Jeff Layton
---
fs/block_dev.c | 13 ++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/
For now, we add a FS_WB_ERRSEQ check to know how to handle it.
Signed-off-by: Jeff Layton
---
fs/libfs.c | 26 +++---
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/fs/libfs.c b/fs/libfs.c
index 1dec90819366..2ae58a252718 100644
--- a/fs/libfs.c
+++ b/fs/libfs
Sample the block device inode's errseq_t when opening a file, so we can
catch metadata writeback errors at fsync time. Change ext4_sync_file to
check for data errors first, and then check the blockdev for metadata
errors afterward.
There are also several internal callers of filemap_write_and_wait_
Since it returns errors in a way similar to fsync, have it use the same
method for returning previously-reported writeback errors.
Signed-off-by: Jeff Layton
---
fs/sync.c | 17 +
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/fs/sync.c b/fs/sync.c
index ec93aac4f
Jan's description for this patch is much better than mine, so I'm
quoting it verbatim here:
-8<-
DAX currently doesn't set errors in the mapping when cache flushing
fails in dax_writeback_mapping_range(). Since this function can get
called only from fsync(2) or sync
I waxed a little loquacious here, but I figured that more detail was
better, and writeback error handling is so hard to get right.
Although I think we'll eventually remove it once the transition is
complete, I've gone ahead and documented the FS_WB_ERRSEQ flag as well.
Cc: Jan Kara
Signed-off-by
Now that we have new infrastructure for handling writeback errors using
errseq_t, we need to convert the existing code to use it. We could
attempt to retrofit the old interfaces on top of the new, but there is
a conceptual disconnect here in the case of internal callers that
invoke filemap_fdatawai
An errseq_t is a way of recording errors in one place, and allowing any
number of "subscribers" to tell whether an error has been set again
since a previous time.
It's implemented as an unsigned 32-bit value that is managed with atomic
operations. The low order bits are designated to hold an error
Most filesystems currently use mapping_set_error and
filemap_check_errors for setting and reporting/clearing writeback errors
at the mapping level. filemap_check_errors is indirectly called from
most of the filemap_fdatawait_* functions and from
filemap_write_and_wait*. These functions are called f
Signed-off-by: Jeff Layton
---
common/rc | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/common/rc b/common/rc
index 391d36f373cd..83765aacfb06 100644
--- a/common/rc
+++ b/common/rc
@@ -832,7 +832,16 @@ _scratch_mkfs()
mkfs_cmd="$MKFS_BTRFS_PROG"
With btrfs, we can't really put the log on a separate device. What we
can do however is mirror the metadata across two devices and make the
data striped across all devices. When we turn on dmerror then the
metadata can fall back to using the other mirror while the data errors
out.
Note that the cu
Ensure that we get an error back on all fds when a block device is
open by multiple writers and writeback fails.
Signed-off-by: Jeff Layton
---
tests/generic/998 | 64 +++
tests/generic/998.out | 2 ++
tests/generic/group | 1 +
3 files cha
The writeback error handling test requires that you put the journal on a
separate device. This allows us to use dmerror to simulate data
writeback failure, without affecting the journal.
xfs already has infrastructure for this (a'la $SCRATCH_LOGDEV), so wire
up the ext4 code so that it can do the
This patchset is a companion to the Linux kernel patch series I recently
posted with the cover letter:
[PATCH v5 00/17] fs: introduce new writeback error reporting and convert
ext2 and ext4 to use it
That patchset adds a new userland-visible change to report errors on
all open file descripti
I'm working on a set of kernel patches to change how writeback errors
are handled and reported in the kernel. Instead of reporting a
writeback error to only the first fsync caller on the file, I aim
to make the kernel report them once on every file description.
This patch adds a test for the new b
On Wed, 2017-05-31 at 20:37 +0800, Ming Lei wrote:
> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> index 99e16ac479e3..ffcf05765e2b 100644
> --- a/drivers/scsi/scsi_lib.c
> +++ b/drivers/scsi/scsi_lib.c
> @@ -3031,7 +3031,10 @@ scsi_internal_device_unblock(struct scsi_device *sde
On 05/30/2017 09:09 PM, Hou Tao wrote:
> Hi Jens,
>
> I didn't found the patch in your linux-block git tree and the vanilla git
> tree.
> Maybe you have forgot this CFQ fix ?
Looks like that did get missed, sorry about that. I've queued it up now.
--
Jens Axboe
On Wed, 2017-05-31 at 20:37 +0800, Ming Lei wrote:
>
> + /* wait until queue is unquiesced */
> + wait_event_cmd(q->quiesce_wq, !blk_queue_quiesced(q),
> + may_sleep ?
> + srcu_read_unlock(&hctx->queue_rq_srcu, *srcu_idx) :
> + rc
These helper are used to compare and copy two uuid_t type objects.
Signed-off-by: Amir Goldstein
[hch: also provide the respective guid_ versions]
Signed-off-by: Christoph Hellwig
Reviewed-by: Andy Shevchenko
---
fs/xfs/uuid.c| 6 --
fs/xfs/uuid.h| 7 ---
include/linu
Signed-off-by: Christoph Hellwig
Reviewed-by: Amir Goldstein
Reviewed-by: Andy Shevchenko
---
drivers/scsi/scsi_debug.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 17249c3650fe..35ee09644cfb 100644
--
From: Amir Goldstein
This is used by overlayfs to encode intrasystem unique file handles.
Suggested-by: Miklos Szeredi
Cc: Hugh Dickins
Cc: Andrew Morton
Signed-off-by: Amir Goldstein
Signed-off-by: Christoph Hellwig
---
mm/shmem.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/s
Signed-off-by: Christoph Hellwig
Reviewed-by: Amir Goldstein
Reviewed-by: Andy Shevchenko
---
kernel/sysctl_binary.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sysctl_binary.c b/kernel/sysctl_binary.c
index ece4b177052b..939a158eab11 100644
--- a/kernel/sysct
I'll keep maintaining whatever little changed we need here, with Andy as
my designated reviewer.
Signed-off-by: Christoph Hellwig
---
MAINTAINERS | 11 +++
1 file changed, 11 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 053c3bdd1fe5..660c14729205 100644
--- a/MAINTAINERS
+
And the uuid helpers.
Signed-off-by: Christoph Hellwig
Reviewed-by: Amir Goldstein
Reviewed-by: Andy Shevchenko
---
block/partitions/ldm.c | 10 +-
block/partitions/ldm.h | 6 ++
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/block/partitions/ldm.c b/block/partitio
Signed-off-by: Christoph Hellwig
Reviewed-by: Amir Goldstein
Reviewed-by: Andy Shevchenko
---
drivers/nvme/host/fabrics.c | 8
drivers/nvme/host/fabrics.h | 2 +-
drivers/nvme/host/fc.c | 3 +--
drivers/nvme/target/nvmet.h | 1 +
include/linux/nvme-fc.h | 3 +--
include/linux/
Signed-off-by: Christoph Hellwig
Reviewed-by: Amir Goldstein
Reviewed-by: Andy Shevchenko
---
fs/overlayfs/copy_up.c | 2 +-
fs/overlayfs/overlayfs.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c
index 5b795873f7fa..2a67
Signed-off-by: Christoph Hellwig
Reviewed-by: Amir Goldstein
Acked-by: Mimi Zohar
Reviewed-by: Andy Shevchenko
---
security/integrity/ima/ima_policy.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/security/integrity/ima/ima_policy.c
b/security/integrity/ima/i
This helper was only used by IMA of all things, which would get spurious
errors if CONFIG_BLOCK is disabled. Just opencode the call there.
Signed-off-by: Christoph Hellwig
Reviewed-by: Amir Goldstein
Acked-by: Mimi Zohar
Reviewed-by: Andy Shevchenko
---
include/linux/genhd.h |
For some file systems we still memcpy into it, but in various places this
already allows us to use the proper uuid helpers. More to come..
Signed-off-by: Christoph Hellwig
Reviewed-by: Amir Goldstein
Acked-by: Mimi Zohar (Changes to IMA/EVM)
Reviewed-by: Andy Shevchenko
---
drivers/xen/tmem.
From: Amir Goldstein
Use the common helper uuid_is_null() and remove the xfs specific
helper uuid_is_nil().
The common helper does not check for the NULL pointer value as
xfs helper did, but xfs code never calls the helper with a pointer
that can be NULL.
Conform comments and warning strings to
Opencode uuid_getnodeuniq in the only caller, and directly decode
the uuid_t representation instead of using a structure cast for it.
Signed-off-by: Christoph Hellwig
---
fs/xfs/uuid.c | 25 -
fs/xfs/uuid.h | 1 -
fs/xfs/xfs_mount.c | 5 -
3 files changed,
And switch to use uuid_t instead of the old uuid_be type.
Signed-off-by: Christoph Hellwig
Reviewed-by: Amir Goldstein
Reviewed-by: Andy Shevchenko
---
arch/s390/include/asm/sysinfo.h | 4 ++--
arch/s390/kernel/sysinfo.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git
Hoist the libnvdimm helper as an inline helper to linux/uuid.h
using an auxiliary const variable uuid_null in lib/uuid.c.
[hch: also add the guid variant. Both do the same but I'd like
to keep casts to a minimum]
The common helper uses the new abstract type uuid_t * instead of
u8 *.
Suggested-b
These are only used in uuid.c and vsprintf.c and aren't something modules
should use directly.
Signed-off-by: Christoph Hellwig
Reviewed-by: Amir Goldstein
Reviewed-by: Andy Shevchenko
---
lib/uuid.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/lib/uuid.c b/lib/uuid.c
index 90bee73f7bd
Signed-off-by: Christoph Hellwig
---
fs/nfsd/export.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index e71f11b1a180..3bc08c394a3f 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -486,7 +486,7 @@ secinfo_parse(char **mesg, ch
This matches the userspace version of it, and describes the functionality
much better. Also do the same for the guid version.
Signed-off-by: Christoph Hellwig
---
include/linux/uuid.h | 8
lib/test_uuid.c | 8
lib/uuid.c | 14 +++---
3 files changed, 1
Our "little endian" UUID really is a Wintel GUID, so rename it and its
helpers such (guid_t). The big endian UUID is the only true one, so
give it the name uuid_t. The uuid_le and uuid_be names are retained for
now, but will hopefully go away soon. The exception to that are the _cmp
helpers that
We don't use uuid_be and the UUID_BE constants in any uapi headers, so make
them private to the kernel.
Signed-off-by: Christoph Hellwig
Reviewed-by: Amir Goldstein
Reviewed-by: Andy Shevchenko
---
include/linux/uuid.h | 15 +++
include/uapi/linux/uuid.h | 16
Use the generic Linux definition to implement our UUID type, this will
allow using more generic infrastructure in the future.
Signed-off-by: Christoph Hellwig
Reviewed-by: Amir Goldstein
Reviewed-by: Brian Foster
Reviewed-by: Andy Shevchenko
Reviewed-by: Darrick J. Wong
---
fs/xfs/uuid.h
From: Amir Goldstein
uuid_t definition is about to change.
Signed-off-by: Amir Goldstein
Signed-off-by: Christoph Hellwig
Reviewed-by: Brian Foster
Reviewed-by: Andy Shevchenko
Reviewed-by: Darrick J. Wong
---
fs/xfs/xfs_inode_item.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletio
From: Amir Goldstein
The md private helper uuid_equal() collides with a generic helper
of the same name.
Rename the md private helper to md_uuid_equal() and do the same for
md_sb_equal().
Signed-off-by: Amir Goldstein
Signed-off-by: Christoph Hellwig
Reviewed-by: Shaohua Li
Reviewed-by: Andy
Hi all,
this series, which is a combined effort from Amir, Andy and me introduces
new uuid_t and guid_t type names that are less confusing than the existing
types, adds new helpers for them and starts switching the fs code over to
it. Andy has additional patches on top to convert many of the user
This essentially is a partial revert of commit ff548773
("afs: Move UUID struct to linux/uuid.h") and moves struct uuid_v1 back into
fs/afs as struct afs_uuid. It however keeps it as big endian structure
so that we can use the normal uuid generation helpers when casting to/from
struct afs_uuid.
T
On Wed, 2017-05-31 at 18:18 +0200, Christoph Hellwig wrote:
> This matches the userspace version of it, and describes the
> functionality
> much better. Also do the same for the guid version.
>
No objections for renaming, though I'm pretty sure it should be squashed
to patch 6.
> Signed-off-by:
On Wed, 2017-05-31 at 18:18 +0200, Christoph Hellwig wrote:
> This helper was only used by IMA of all things, which would get
> spurious
> errors if CONFIG_BLOCK is disabled. Just opencode the call there.
> - result = blk_part_pack_uuid(args[0].from,
> -
Christoph Hellwig wrote:
> This essentially is a partial revert of commit ff548773
> ("afs: Move UUID struct to linux/uuid.h") and moves struct uuid_v1 back into
> fs/afs as struct afs_uuid. It however keeps it as big endian structure
> so that we can use the normal uuid generation helpers when
Hello,
On Wed, May 31, 2017 at 09:08:16AM -0400, Jeff Layton wrote:
> I'm working on a set of kernel patches to change how writeback errors
> are handled and reported in the kernel. Instead of reporting a
> writeback error to only the first fsync caller on the file, I aim
> to make the kernel repo
On Wed, May 31, 2017 at 09:16:34PM +0300, Andy Shevchenko wrote:
> On Wed, 2017-05-31 at 18:18 +0200, Christoph Hellwig wrote:
> > This helper was only used by IMA of all things, which would get
> > spurious
> > errors if CONFIG_BLOCK is disabled. Just opencode the call there.
>
> > -
On Wed, May 31, 2017 at 09:14:35PM +0300, Andy Shevchenko wrote:
> On Wed, 2017-05-31 at 18:18 +0200, Christoph Hellwig wrote:
> > This matches the userspace version of it, and describes the
> > functionality
> > much better. Also do the same for the guid version.
> >
>
> No objections for renam
On Wed, 2017-05-31 at 11:59 -0700, Eduardo Valentin wrote:
> Hello,
>
> On Wed, May 31, 2017 at 09:08:16AM -0400, Jeff Layton wrote:
> > I'm working on a set of kernel patches to change how writeback errors
> > are handled and reported in the kernel. Instead of reporting a
> > writeback error to o
On Wed, 31 May 2017 08:45:23 -0400 Jeff Layton wrote:
> This is v5 of the patchset to improve how we're tracking and reporting
> errors that occur during pagecache writeback.
I'm curious to know how you've been testing this? Is that testing
strong enough for us to be confident that all nature o
Hello Jens,
This series contains four patches that add new features to the blk-mq-debugfs.
The changes compared to v1 of this series are:
- Left out the first patch of this series because it's already upstream.
- Renamed "ctx" into "params" in the patch that shows the busy requests.
- In the same
Running a queue causes the block layer to examine the per-CPU and
hw queues but not the requeue list. Hence add a 'kick' operation
that also examines the requeue list.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Hannes Reinecke
Cc: Omar Sandoval
Cc: Ming Lei
---
block/blk-mq-deb
When analyzing e.g. queue lockups it is important to know whether
or not a request has already been started. Hence also show the
atomic request flags.
Signed-off-by: Bart Van Assche
Reviewed-by: Hannes Reinecke
Cc: Omar Sandoval
Cc: Christoph Hellwig
Cc: Ming Lei
---
block/blk-mq-debugfs.c |
Requests that got stuck in a block driver are neither on
blk_mq_ctx.rq_list nor on any hw dispatch queue. Make these
visible in debugfs through the "busy" attribute.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Hannes Reinecke
Cc: Omar Sandoval
Cc: Ming Lei
---
block/blk-mq-debug
When verifying whether or not a blk-mq driver forgot to kick the
requeue list after having requeued a request it is important to
be able to verify the contents of the requeue list. Hence export
that list through debugfs.
Signed-off-by: Bart Van Assche
Reviewed-by: Hannes Reinecke
Cc: Christoph H
On Wed, 2017-05-31 at 13:27 -0700, Andrew Morton wrote:
> On Wed, 31 May 2017 08:45:23 -0400 Jeff Layton wrote:
>
> > This is v5 of the patchset to improve how we're tracking and reporting
> > errors that occur during pagecache writeback.
>
> I'm curious to know how you've been testing this?
>
On Wed, 31 May 2017 17:31:49 -0400 Jeff Layton wrote:
> On Wed, 2017-05-31 at 13:27 -0700, Andrew Morton wrote:
> > On Wed, 31 May 2017 08:45:23 -0400 Jeff Layton wrote:
> >
> > > This is v5 of the patchset to improve how we're tracking and reporting
> > > errors that occur during pagecache wri
Since using scsi_req() is only allowed against request queues for
which struct scsi_request is the first member of their private
request data, refuse to submit SCSI commands against a queue for
which this is not the case.
References: commit 82ed4db499b8 ("block: split scsi_request out of struct
r
Since the pktcdvd driver only supports request queues for which
struct scsi_request is the first member of their private request
data, refuse to register block layer queues for which struct
scsi_request is not the first member of the private data.
References: commit 82ed4db499b8 ("block: split scs
Since BSG only supports request queues for which struct scsi_request
is the first member of their private request data, refuse to register
block layer queues for which struct scsi_request is not the first
member of their private data.
References: commit bd1599d931ca ("scsi_transport_sas: fix BSG i
Hello,
On Wed, May 31, 2017 at 02:30:49PM -0700, Bart Van Assche wrote:
> Requests that got stuck in a block driver are neither on
> blk_mq_ctx.rq_list nor on any hw dispatch queue. Make these
> visible in debugfs through the "busy" attribute.
>
> Signed-off-by: Bart Van Assche
> Cc: Christoph H
Hello Jens,
The patches in this series are a sequel of Christoph's "Split scsi passthrough
fields out of struct request" patch series. The changes compared to v1 of this
patch series are:
- Renamed QUEUE_FLAG_SCSI_PDU into QUEUE_FLAG_SCSI_PASSTHROUGH and
blk_queue_scsi_pdu() into blk_queue_scsi_
The CDROMREADAUDIO ioctl uses SCSI passthrough when the .disk
pointer has been set in struct cdrom_device_info. Hence check
whether SCSI passthrough is supported before submitting a SCSI
command. Note: both the ide-cd and sr drivers set the disk
pointer in struct cdrom_device_info but neither the p
Since the introduction of .init_rq_fn() and .exit_rq_fn() it is
essential that the memory allocated for struct request_queue
stays around until all blk_exit_rl() calls have finished. Hence
make blk_init_rl() take a reference on struct request_queue.
This patch fixes the following crash:
general p
On Wed, 2017-05-31 at 14:43 -0700, Eduardo Valentin wrote:
> On Wed, May 31, 2017 at 02:30:49PM -0700, Bart Van Assche wrote:
> > +static void hctx_show_busy(struct request *rq, void *data, bool reserved)
> > +{
> > + const struct show_busy_params *params = data;
> > +
> > + if (blk_mq_map_queu
>From the context where a SCSI command is submitted it is not always
possible to figure out whether or not the queue the command is
submitted to has struct scsi_request as the first member of its
private data. Hence introduce the flag QUEUE_FLAG_SCSI_PASSTHROUGH.
Signed-off-by: Bart Van Assche
Re
On Wed, May 31, 2017 at 09:45:54PM +, Bart Van Assche wrote:
> On Wed, 2017-05-31 at 14:43 -0700, Eduardo Valentin wrote:
> > On Wed, May 31, 2017 at 02:30:49PM -0700, Bart Van Assche wrote:
> > > +static void hctx_show_busy(struct request *rq, void *data, bool reserved)
> > > +{
> > > + const
On Wed, 2017-05-31 at 14:49 -0700, Eduardo Valentin wrote:
> On Wed, May 31, 2017 at 09:45:54PM +, Bart Van Assche wrote:
> > On Wed, 2017-05-31 at 14:43 -0700, Eduardo Valentin wrote:
> > > On Wed, May 31, 2017 at 02:30:49PM -0700, Bart Van Assche wrote:
> > > > +static void hctx_show_busy(str
On Wed, 2017-05-31 at 14:37 -0700, Andrew Morton wrote:
> On Wed, 31 May 2017 17:31:49 -0400 Jeff Layton wrote:
>
> > On Wed, 2017-05-31 at 13:27 -0700, Andrew Morton wrote:
> > > On Wed, 31 May 2017 08:45:23 -0400 Jeff Layton wrote:
> > >
> > > > This is v5 of the patchset to improve how we're
Document the locking assumptions in functions that modify
blk_mq_ctx.rq_list to make it easier for humans to verify
this code.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Hannes Reinecke
Cc: Omar Sandoval
Cc: Ming Lei
---
block/blk-mq-sched.c | 2 ++
block/blk-mq.c | 4 +++
Hello Jens,
The changes compared to v1 of this patch series are:
* Addressed Christoph's comment about moving the .initialize_rq_fn() call
from blk_rq_init() / blk_mq_rq_ctx_init() into blk_get_request().
* Left out patch "scsi: Make scsi_ioctl_reset() pass the request queue pointer
to blk_rq_
The variable 'disk_type' is never modified so constify it.
Signed-off-by: Bart Van Assche
Reviewed-by: Christoph Hellwig
Cc: Hannes Reinecke
Cc: Omar Sandoval
Cc: Ming Lei
---
block/genhd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/genhd.c b/block/genhd.c
Instead of explicitly calling scsi_req_init() after blk_get_request(),
call that function from inside blk_get_request(). Add an
.initialize_rq_fn() callback function to the block drivers that need
it. Merge the IDE .init_rq_fn() function into .initialize_rq_fn()
because it is too small to keep it a
Several block drivers need to initialize the driver-private data
after having called blk_get_request() and before .prep_rq_fn() is
called, e.g. when submitting a REQ_OP_SCSI_* request. Avoid that
that initialization code has to be repeated after every
blk_get_request() call by adding a new callback
Some functions in block/blk-core.c must only be used on blk-sq queues
while others are safe to use against any queue type. Document which
functions are intended for blk-sq queues and issue a warning if the
blk-sq API is misused.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Hannes Rei
Instead of documenting the locking assumptions of most block layer
functions as a comment, use lockdep_assert_held() to verify locking
assumptions at runtime.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Hannes Reinecke
Cc: Omar Sandoval
Cc: Ming Lei
---
block/blk-core.c| 71
1 - 100 of 129 matches
Mail list logo