Christoph,
> We will only have sense data if the command exectured and got a SCSI
> result, so this is pointless.
"executed"
Reviewed-by: Martin K. Petersen
--
Martin K. Petersen Oracle Linux Engineering
--
dm-devel mailing list
dm-devel@redhat.com
On Fri, May 26 2017 at 10:27am -0400,
Mike Snitzer wrote:
> On Fri, May 26 2017 at 5:10am -0400,
> Damien Le Moal wrote:
>
> > That said, the patch below looks very good, much cleaner than what I had
> > done. Let me test it and I will report back.
>
warning: macro `list' not defined
Cc: Christophe Varoqui
Cc: device-mapper development
Signed-off-by: Xose Vazquez Perez
---
multipathd/multipathd.8 | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git
On Fri, May 26 2017 at 5:10am -0400,
Damien Le Moal wrote:
> Mike,
>
> On 5/26/17 11:12, Mike Snitzer wrote:
> > I'd like to get your thoughts on replacing the first 3 patches with
> > something like the following patch (_not_ compile tested).
> >
> > Basically I'm not
This simplifies the code and especially the error passing a bit and
will help with the next patch.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-mpath.c | 42 +++---
1 file changed, 15 insertions(+), 27 deletions(-)
diff --git
Currently we use nornal Linux errno values in the block layer, and while
we accept any error a few have overloaded magic meanings. This patch
instead introduces a new blk_status_t value that holds block layer specific
status codes and explicitly explains their meaning. Helpers to convert from
A few (but not all) dm targets use a special EWOULDBLOCK error code for
failing REQ_RAHEAD requests that fail due to a lack of available resources.
But no one else knows about this magic code, and lower level drivers also
don't generate it when failing read-ahead requests for similar reasons.
So
This series introduces a new blk_status_t error code type for the block
layer so that we can have tigher control and explicit semantics for
block layer errors.
All but the last three patches are cleanups that lead to the new type.
The series it mostly limited to the block layer and drivers, and
Use the same values for use for request completion errors as the return
value from ->queue_rq. BLK_STS_RESOURCE is special cased to cause
a requeue, and all the others are completed as-is.
Signed-off-by: Christoph Hellwig
---
block/blk-mq.c| 37
Signed-off-by: Christoph Hellwig
Reviewed-by: Bart Van Assche
---
fs/gfs2/incore.h | 1 -
fs/gfs2/lops.c | 4 +---
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index b7cf65d13561..aa3d44527fa2 100644
Instead use the special DM_MAPIO_KILL return value to return -EIO just
like we do for the request based path. Note that dm-log-writes returned
-ENOMEM in a few places, which now becomes -EIO instead. No consumer
treats -ENOMEM special so this shouldn't be an issue (and it should
use a mempool to
Instead of reinventing it poorly.
Signed-off-by: Christoph Hellwig
Reviewed-by: Bart Van Assche
Reviewed-by: Javier González
---
drivers/nvme/host/lightnvm.c | 12 +---
1 file changed, 1 insertion(+), 11 deletions(-)
diff
Turn the error paramter into a pointer so that target drivers can change
the value, and make sure only DM_ENDIO_* values are returned from the
methods.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-cache-target.c | 4 ++--
drivers/md/dm-flakey.c| 8
Once we move the block layer to its own status code we'll still want to
propagate the bio_iov_iter_get_pages, so restructure __blkdev_direct_IO
to take ret into account when returning the errno.
---
fs/block_dev.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git
Only read bio->bi_error once in the common path.
Signed-off-by: Christoph Hellwig
Reviewed-by: Bart Van Assche
---
fs/direct-io.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/direct-io.c b/fs/direct-io.c
index
We will only have sense data if the command exectured and got a SCSI
result, so this is pointless.
Signed-off-by: Christoph Hellwig
---
drivers/scsi/osd/osd_initiator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/osd/osd_initiator.c
Signed-off-by: Christoph Hellwig
Reviewed-by: Bart Van Assche
---
fs/btrfs/inode.c | 6 +++---
fs/direct-io.c | 3 +--
include/linux/fs.h | 2 +-
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
e system]
>
> url:
> https://github.com/0day-ci/linux/commits/Ming-Lei/blk-mq-introduce-blk_mq_unquiesce_queue/20170526-140138
> base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
> for-next
> config: x86_64-randconfig-x019-201721 (attached as .config)
>
On 05/26/2017 10:56 AM, Christoph Hellwig wrote:
> Once we move the block layer to its own status code we'll still want to
> propagate the bio_iov_iter_get_pages, so restructure __blkdev_direct_IO
> to take ret into account when returning the errno.
> ---
-ENOSIGNOFF?
--
Johannes Thumshirn
Mike,
On 5/26/17 11:12, Mike Snitzer wrote:
> I'd like to get your thoughts on replacing the first 3 patches with
> something like the following patch (_not_ compile tested).
>
> Basically I'm not interested in training DM for hypothetical zoned block
> device configurations. I only want the
blk_mq_quiesce_queue() can not block dispatch in the following
two cases:
- direct issue or BLK_MQ_S_START_ON_RUN
- in theory, new RCU read-side critical sections may begin while
synchronize_rcu() was waiting, and end after returning of
synchronize_rcu().
so a new flag of QUEUE_FLAG_QUIESCED is
Now we use blk_mq_start_stopped_hw_queues() implictely
as pair of blk_mq_quiesce_queue(), now we introduce
blk_mq_unquiesce_queue() explictely.
Also this function is introduced for fixing
current quiescing mechanism, which will be done
in the following patches.
Signed-off-by: Ming Lei
BLK_MQ_S_STOPPED may be not observed in other concurrent I/O paths,
we can't guarantee that dispatching won't happen after queue
is stopped.
So clarify the fact and avoid potential misuse.
Signed-off-by: Ming Lei
---
block/blk-mq.c | 10 ++
1 file changed, 10
blk_mq_unquiesce_queue() is used for unquiescing the queue.
Signed-off-by: Ming Lei
---
drivers/md/dm-rq.c | 2 +-
drivers/nvme/host/core.c | 2 +-
drivers/scsi/scsi_lib.c | 5 -
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/md/dm-rq.c
Now we use the QUIESCED flag to drain & block dispatching,
not necessary to stop queue any more.
Also queue can be started by other blk-mq APIs, this limits
uses of blk_mq_quiesce_queue().
Now blk_mq_quiesce_queue() can be used safely and users won't
worry about queue restart during quiescing.
BLK_MQ_S_STOPPED may be not observed in other concurrent I/O paths,
we can't guarantee that dispatching won't happen after queue
is stopped.
So clarify the fact and avoid potential misuse.
Signed-off-by: Ming Lei
---
block/blk-mq.c | 10 ++
1 file changed, 10
Actually what we want to get from blk_mq_quiesce_queue()
isn't only to wait for completion of all ongooing .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
Hi,
There are some issues in current blk_mq_quiesce_queue():
- in case of direct issue or BLK_MQ_S_START_ON_RUN, dispatch won't
can't be prevented after blk_mq_quiesce_queue() is returned.
- in theory, new RCU read-side critical sections may begin while
synchronize_rcu() was
-blk_mq_unquiesce_queue/20170526-140138
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
for-next
config: x86_64-randconfig-x019-201721 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make
29 matches
Mail list logo