Re: [dm-devel] [PATCH 02/13] scsi/osd: don't save block errors into req_results

2017-05-26 Thread Martin K. Petersen
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

Re: [dm-devel] [PATCH v3 00/10] dm: zoned block device support

2017-05-26 Thread Mike Snitzer
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. >

[dm-devel] [PATCH] multipath-tools: fix a format warning in multipathd.8

2017-05-26 Thread Xose Vazquez Perez
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

Re: [dm-devel] [PATCH v3 00/10] dm: zoned block device support

2017-05-26 Thread Mike Snitzer
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

[dm-devel] [PATCH 08/13] dm mpath: merge do_end_io_bio into multipath_end_io_bio

2017-05-26 Thread Christoph Hellwig
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

[dm-devel] [PATCH 11/13] block: introduce new block status code type

2017-05-26 Thread Christoph Hellwig
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

[dm-devel] [PATCH 04/13] dm: fix REQ_RAHEAD handling

2017-05-26 Thread Christoph Hellwig
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

[dm-devel] dedicated error codes for the block layer V2

2017-05-26 Thread Christoph Hellwig
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

[dm-devel] [PATCH 12/13] blk-mq: switch ->queue_rq return value to blk_status_t

2017-05-26 Thread Christoph Hellwig
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

[dm-devel] [PATCH 03/13] gfs2: remove the unused sd_log_error field

2017-05-26 Thread Christoph Hellwig
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

[dm-devel] [PATCH 09/13] dm: don't return errnos from ->map

2017-05-26 Thread Christoph Hellwig
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

[dm-devel] [PATCH 01/13] nvme-lightnvm: use blk_execute_rq in nvme_nvm_submit_user_cmd

2017-05-26 Thread Christoph Hellwig
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

[dm-devel] [PATCH 10/13] dm: change ->end_io calling convention

2017-05-26 Thread Christoph Hellwig
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

[dm-devel] [PATCH 07/13] block_dev: propagate bio_iov_iter_get_pages error in __blkdev_direct_IO

2017-05-26 Thread Christoph Hellwig
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

[dm-devel] [PATCH 06/13] fs: simplify dio_bio_complete

2017-05-26 Thread Christoph Hellwig
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

[dm-devel] [PATCH 02/13] scsi/osd: don't save block errors into req_results

2017-05-26 Thread Christoph Hellwig
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

[dm-devel] [PATCH 05/13] fs: remove the unused error argument to dio_end_io()

2017-05-26 Thread Christoph Hellwig
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

Re: [dm-devel] [PATCH 2/6] blk-mq: use the introduced blk_mq_unquiesce_queue()

2017-05-26 Thread Ming Lei
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) >

Re: [dm-devel] [PATCH 07/13] block_dev: propagate bio_iov_iter_get_pages error in __blkdev_direct_IO

2017-05-26 Thread Johannes Thumshirn
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

Re: [dm-devel] [PATCH v3 00/10] dm: zoned block device support

2017-05-26 Thread Damien Le Moal
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

[dm-devel] [PATCH 3/6] blk-mq: fix blk_mq_quiesce_queue

2017-05-26 Thread Ming Lei
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

[dm-devel] [PATCH 1/6] blk-mq: introduce blk_mq_unquiesce_queue

2017-05-26 Thread Ming Lei
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

[dm-devel] [PATCH 6/6] blk-mq: clarify dispatching won't be blocked by stopping queue

2017-05-26 Thread 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

[dm-devel] [PATCH 2/6] blk-mq: use the introduced blk_mq_unquiesce_queue()

2017-05-26 Thread Ming Lei
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

[dm-devel] [PATCH 5/6] blk-mq: don't stop queue for quiescing

2017-05-26 Thread Ming Lei
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.

[dm-devel] [PATCH 6/6] blk-mq: clarify dispatching may not be drained/blocked by stopping queue

2017-05-26 Thread 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

[dm-devel] [PATCH 4/6] blk-mq: update comments on blk_mq_quiesce_queue()

2017-05-26 Thread Ming Lei
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

[dm-devel] [PATCH 0/6] blk-mq: fix & improve queue quiescing

2017-05-26 Thread Ming Lei
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

Re: [dm-devel] [PATCH 2/6] blk-mq: use the introduced blk_mq_unquiesce_queue()

2017-05-26 Thread kbuild test robot
-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