Re: [PATCH 4/5] blk-mq-debugfs: Show busy requests

2017-05-26 Thread Ming Lei
On Sat, May 27, 2017 at 08:54:57AM +0800, Ming Lei wrote: > On Thu, May 25, 2017 at 04:38:09PM -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"

Re: [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

Re: [PATCH 4/5] blk-mq-debugfs: Show busy requests

2017-05-26 Thread Bart Van Assche
On Fri, 2017-05-26 at 07:26 -0600, Jens Axboe wrote: > On 05/25/2017 05:38 PM, 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. > > > >

Re: [PATCH 4/5] blk-mq-debugfs: Show busy requests

2017-05-26 Thread Jens Axboe
On 05/26/2017 03:20 PM, Jens Axboe wrote: > On 05/26/2017 03:17 PM, Bart Van Assche wrote: >> On Fri, 2017-05-26 at 07:26 -0600, Jens Axboe wrote: >>> On 05/25/2017 05:38 PM, Bart Van Assche wrote: Requests that got stuck in a block driver are neither on blk_mq_ctx.rq_list nor on any hw

Re: [PATCH 4/5] blk-mq-debugfs: Show busy requests

2017-05-26 Thread Bart Van Assche
On Fri, 2017-05-26 at 15:20 -0600, Jens Axboe wrote: > On 05/26/2017 03:17 PM, Bart Van Assche wrote: > > On Fri, 2017-05-26 at 07:26 -0600, Jens Axboe wrote: > > > On 05/25/2017 05:38 PM, Bart Van Assche wrote: > > > > Requests that got stuck in a block driver are neither on > > > >

[PATCH 1/3] cfq-iosched: Mark cfq_clear_cfqq_*() as __maybe_unused

2017-05-26 Thread Matthias Kaehlcke
This fixes the following warning when building with clang: block/cfq-iosched.c:449:1: error: unused function 'cfq_clear_cfqq_sync' [-Werror,-Wunused-function] Signed-off-by: Matthias Kaehlcke --- block/cfq-iosched.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH 0/3] cfq-iosched: Fix warnings about unused functions

2017-05-26 Thread Matthias Kaehlcke
This patch series fixes a bunch of 'unused-function' warnings raised by clang. Matthias Kaehlcke (3): cfq-iosched: Mark cfq_clear_cfqq_*() as __maybe_unused cfq-iosched: Fix warning about unused dummy functions cfq-iosched: Delete unused function min_vdisktime() block/cfq-iosched.c | 14

[PATCH 2/3] cfq-iosched: Fix warning about unused dummy functions

2017-05-26 Thread Matthias Kaehlcke
Only define dummies for cfqg_stats_set_start_group_wait_time() and cfqg_stats_end_empty_time() when CONFIG_CFQ_GROUP_IOSCHED=y. This fixes the following warnings when building with clang: block/cfq-iosched.c:589:20: error: unused function 'cfqg_stats_set_start_group_wait_time'

Re: [PATCH 4/5] blk-mq-debugfs: Show busy requests

2017-05-26 Thread Ming Lei
On Thu, May 25, 2017 at 04:38:09PM -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. The name of 'busy' isn't very explicit about this case, and

Re: [PATCH 08/19] block: Introduce request_queue.initialize_rq_fn()

2017-05-26 Thread Bart Van Assche
On Fri, 2017-05-26 at 08:34 +0200, Christoph Hellwig wrote: > On Thu, May 25, 2017 at 11:43:16AM -0700, Bart Van Assche wrote: > > 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

Re: [PATCH 4/5] blk-mq-debugfs: Show busy requests

2017-05-26 Thread Bart Van Assche
On Fri, 2017-05-26 at 16:38 +0200, Hannes Reinecke wrote: > Hmm. I wonder if this is going to work as intended; 'busy' might be > changing rapidly, so the busy_iter might be giving us unintended results. > Have you checked? Hello Hannes, The intention is that this attribute is used by developers

Re: [PATCH 4/5] blk-mq-debugfs: Show busy requests

2017-05-26 Thread Jens Axboe
On 05/26/2017 08:38 AM, Hannes Reinecke wrote: > On 05/26/2017 01:38 AM, 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

Re: [PATCH 4/5] blk-mq-debugfs: Show busy requests

2017-05-26 Thread Jens Axboe
On 05/26/2017 03:17 PM, Bart Van Assche wrote: > On Fri, 2017-05-26 at 07:26 -0600, Jens Axboe wrote: >> On 05/25/2017 05:38 PM, 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

[PATCH 3/3] cfq-iosched: Delete unused function min_vdisktime()

2017-05-26 Thread Matthias Kaehlcke
This fixes the following warning when building with clang: block/cfq-iosched.c:970:19: error: unused function 'min_vdisktime' [-Werror,-Wunused-function] Signed-off-by: Matthias Kaehlcke --- block/cfq-iosched.c | 9 - 1 file changed, 9 deletions(-) diff

[GIT PULL] Block changes for 4.12-rc3

2017-05-26 Thread Jens Axboe
Hi Linus, A collection of fixes that should go into this series. This pull request contains: - A set of NVMe fixes, pulled from Christoph. This includes a set of fixes for the fiber channel bits from James Smart, rdma queue depth fix from Marta, controller removal fixes from Ming, and some

Re: [PATCH 05/19] cdrom: Check private request size before attaching to a queue

2017-05-26 Thread Bart Van Assche
On Fri, 2017-05-26 at 08:08 +0200, Christoph Hellwig wrote: > On Thu, May 25, 2017 at 11:43:13AM -0700, Bart Van Assche wrote: > > Since the cdrom driver only supports request queues for which > > struct scsi_request is the first member of their private request > > data, refuse to register block

Re: [PATCH 06/19] nfsd: Check private request size before submitting a SCSI request

2017-05-26 Thread bfie...@fieldses.org
On Fri, May 26, 2017 at 08:10:03AM +0200, h...@lst.de wrote: > On Thu, May 25, 2017 at 08:19:47PM +, Bart Van Assche wrote: > > On Thu, 2017-05-25 at 14:48 -0400, J . Bruce Fields wrote: > > > On Thu, May 25, 2017 at 11:43:14AM -0700, Bart Van Assche wrote: > > > > Since using scsi_req() is

Re: [PATCH 4/5] blk-mq-debugfs: Show busy requests

2017-05-26 Thread Hannes Reinecke
On 05/26/2017 01:38 AM, 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:

Re: [PATCH v2 0/2] blk-mq: merge bio into sw queue before plugging

2017-05-26 Thread Jens Axboe
On 05/26/2017 05:53 AM, Ming Lei wrote: > Hi, > > The 1st patch moves sw queue's bio merge before plugging, then > the sequential I/O performance regression by blk-mq can be fixed. > > The 2nd patch makes the sw queue's bio merge as the default .bio_merge > if no io scheduler is used or the io

Re: [PATCH 1/5] blk-mq: Only register debugfs attributes for blk-mq queues

2017-05-26 Thread Jens Axboe
On 05/25/2017 05:38 PM, Bart Van Assche wrote: > The code in blk-mq-debugfs.c assumes that it is working on a blk-mq > queue and is not intended to work on a blk-sq queue. Hence only > register blk-mq debugfs attributes for blk-mq queues. Thanks Bart, I have queued this up for this series. --

Re: [PATCH 4/5] blk-mq-debugfs: Show busy requests

2017-05-26 Thread Jens Axboe
On 05/25/2017 05:38 PM, 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:

[PATCH v2 1/2] blk-mq: merge bio into sw queue before plugging

2017-05-26 Thread Ming Lei
Before blk-mq is introduced, I/O is merged to elevator before being putted into plug queue, but blk-mq changed the order and makes merging to sw queue basically impossible. Then it is observed that throughput of sequential I/O is degraded about 10%~20% on virtio-blk in the test[1] if mq-deadline

[PATCH v2 0/2] blk-mq: merge bio into sw queue before plugging

2017-05-26 Thread Ming Lei
Hi, The 1st patch moves sw queue's bio merge before plugging, then the sequential I/O performance regression by blk-mq can be fixed. The 2nd patch makes the sw queue's bio merge as the default .bio_merge if no io scheduler is used or the io scheduler doesn't provide .bio_merge. This post splits

[PATCH v2 2/2] blk-mq: make per-sw-queue bio merge as default .bio_merge

2017-05-26 Thread Ming Lei
Because what the per-sw-queue bio merge does is basically same with scheduler's .bio_merge(), this patch makes per-sw-queue bio merge as the default .bio_merge if no scheduler is used or io scheduler doesn't provide .bio_merge(). Signed-off-by: Ming Lei --- Hi Christoph,

Re: [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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

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

[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

Re: [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) >

[PATCH 1/1] block: use the effective nr_hw_queues

2017-05-26 Thread john.gong
in blk_mq_realloc_hw_ctxs(set, q) set the effective nr_hw_queues, so use this to set the local node in blk_mq_init_cpu_queues. Signed-off-by: john.gong --- block/blk-mq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-mq.c b/block/blk-mq.c

Re: [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

Re: [PATCH 08/19] block: Introduce request_queue.initialize_rq_fn()

2017-05-26 Thread Christoph Hellwig
On Thu, May 25, 2017 at 11:43:16AM -0700, Bart Van Assche wrote: > 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

Re: [PATCH 06/19] nfsd: Check private request size before submitting a SCSI request

2017-05-26 Thread h...@lst.de
On Thu, May 25, 2017 at 08:19:47PM +, Bart Van Assche wrote: > On Thu, 2017-05-25 at 14:48 -0400, J . Bruce Fields wrote: > > On Thu, May 25, 2017 at 11:43:14AM -0700, Bart Van Assche wrote: > > > Since using scsi_req() is only allowed against request queues for > > > which struct scsi_request

Re: [PATCH 06/19] nfsd: Check private request size before submitting a SCSI request

2017-05-26 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

Re: [PATCH 05/19] cdrom: Check private request size before attaching to a queue

2017-05-26 Thread Christoph Hellwig
On Thu, May 25, 2017 at 11:43:13AM -0700, Bart Van Assche wrote: > Since the cdrom 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 this is > not the case. Hmm. I think we have

Re: [PATCH 04/19] pktcdvd: Check queue type before attaching to a queue

2017-05-26 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH 03/19] bsg: Check queue type before attaching to a queue

2017-05-26 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

Re: [PATCH 02/19] block: Introduce queue flag QUEUE_FLAG_SCSI_PDU

2017-05-26 Thread Christoph Hellwig
On Thu, May 25, 2017 at 11:43:10AM -0700, Bart Van Assche wrote: > >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

Re: [PATCH 01/19] block: Avoid that blk_exit_rl() triggers a use-after-free

2017-05-26 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig