[PATCH V2] blk-throttle: cap discard request size

2017-08-18 Thread Shaohua Li
discard request usually is very big and easily use all bandwidth budget of a cgroup. discard request size doesn't really mean the size of data written, so it doesn't make sense to account it into bandwidth budget. Jens pointed out treating the size 0 doesn't make sense too, because discard request

[PATCH v2] blk-mq-debugfs: Add names for recently added flags

2017-08-18 Thread Bart Van Assche
The symbolic constants QUEUE_FLAG_SCSI_PASSTHROUGH, QUEUE_FLAG_QUIESCED and REQ_NOWAIT are missing from blk-mq-debugfs.c. Add these to blk-mq-debugfs.c such that these appear as names in debugfs instead of as numbers. Signed-off-by: Bart Van Assche Cc: Omar Sandoval

Re: [PATCH v4] blktrace: Fix potentail deadlock between delete & sysfs ops

2017-08-18 Thread Waiman Long
On 08/18/2017 04:18 PM, Bart Van Assche wrote: > On Fri, 2017-08-18 at 16:01 -0400, Waiman Long wrote: >> [ ... ] >> Instead of using bd_mutex, a new global blktrace mutex is now used >> to protect against concurrent access, creation and destruction of the >> blk_trace structure that is used only

Re: [PATCH v4] blktrace: Fix potentail deadlock between delete & sysfs ops

2017-08-18 Thread Bart Van Assche
On Fri, 2017-08-18 at 16:01 -0400, Waiman Long wrote: > [ ... ] > Instead of using bd_mutex, a new global blktrace mutex is now used > to protect against concurrent access, creation and destruction of the > blk_trace structure that is used only in the blktrace.c file. As > blktrace files will not

[PATCH v4] blktrace: Fix potentail deadlock between delete & sysfs ops

2017-08-18 Thread Waiman Long
The lockdep code had reported the following unsafe locking scenario: CPU0CPU1 lock(s_active#228); lock(>bd_mutex/1); lock(s_active#228); lock(>bd_mutex); *** DEADLOCK

Re: [PATCH v3] blktrace: Fix potentail deadlock between delete & sysfs ops

2017-08-18 Thread Waiman Long
On 08/18/2017 02:07 PM, Bart Van Assche wrote: > On Fri, 2017-08-18 at 13:54 -0400, Waiman Long wrote: >> Instead, a global blktrace >> mutex will be used to serialize the read/write of the blktrace sysfs >> attributes. > Hello Waiman, > > Using a mutex to serialize code is wrong. What is needed

[PATCH v2 2/3] loop: use queue limit instead of private lo_logical_blocksize

2017-08-18 Thread Omar Sandoval
From: Omar Sandoval There's no reason to track this separately; just use the logical_block_size queue limit. Signed-off-by: Omar Sandoval --- drivers/block/loop.c | 44 ++-- drivers/block/loop.h | 1 - 2 files changed,

[PATCH v2 3/3] loop: always return block size in LOOP_GET_STATUS

2017-08-18 Thread Omar Sandoval
From: Omar Sandoval When I was writing a test for the new loop device block size functionality, I noticed a couple of issues with how LOOP_GET_STATUS handles the block size: - lo_init[0] is never filled in with the logical block size we previously set - lo_flags returned from

[PATCH v2 0/3] loop: LO_FLAGS_BLOCKSIZE fixes

2017-08-18 Thread Omar Sandoval
From: Omar Sandoval Patches 1 and 3 are from the original series. Patch 2 gets rid of the redundant struct loop_device.lo_logical_blocksize in favor of using the queue's own logical_block_size. Karel, I decided against adding another sysfs entry since it will always be the same

[PATCH v2 1/3] loop: fix hang if LOOP_SET_STATUS gets invalid blocksize or encrypt type

2017-08-18 Thread Omar Sandoval
From: Omar Sandoval In both of these error cases, we need to make sure to unfreeze the queue before we return. Fixes: ecdd09597a57 ("block/loop: fix race between I/O and set_status") Fixes: f2c6df7dbf9a ("loop: support 4k physical blocksize") Reviewed-by: Hannes Reinecke

[GIT PULL] Block fixes for 4.13-rc

2017-08-18 Thread Jens Axboe
Hi Linus, A small set of fixes that should go into this release. This pull request contains: - An NVMe pull request from Christoph, with a few select fixes. One of them fix a polling regression in this series, in which it's trivial to cause the kernel to disable most of the hardware queue

Re: [PATCH] blk-throttle: ignore discard request size

2017-08-18 Thread Shaohua Li
On Fri, Aug 18, 2017 at 01:15:15PM -0600, Jens Axboe wrote: > On 08/18/2017 01:12 PM, Shaohua Li wrote: > > On Fri, Aug 18, 2017 at 01:06:46PM -0600, Jens Axboe wrote: > >> On 08/18/2017 10:28 AM, Shaohua Li wrote: > >>> On Fri, Aug 18, 2017 at 09:35:01AM -0600, Jens Axboe wrote: > On

Re: [PATCH] blk-throttle: ignore discard request size

2017-08-18 Thread Jens Axboe
On 08/18/2017 01:12 PM, Shaohua Li wrote: > On Fri, Aug 18, 2017 at 01:06:46PM -0600, Jens Axboe wrote: >> On 08/18/2017 10:28 AM, Shaohua Li wrote: >>> On Fri, Aug 18, 2017 at 09:35:01AM -0600, Jens Axboe wrote: On 08/18/2017 09:13 AM, Shaohua Li wrote: > discard request usually is very

Re: [PATCH] blk-throttle: ignore discard request size

2017-08-18 Thread Shaohua Li
On Fri, Aug 18, 2017 at 01:06:46PM -0600, Jens Axboe wrote: > On 08/18/2017 10:28 AM, Shaohua Li wrote: > > On Fri, Aug 18, 2017 at 09:35:01AM -0600, Jens Axboe wrote: > >> On 08/18/2017 09:13 AM, Shaohua Li wrote: > >>> discard request usually is very big and easily use all bandwidth budget > >>>

Re: [PATCH] blk-throttle: ignore discard request size

2017-08-18 Thread Jens Axboe
On 08/18/2017 10:28 AM, Shaohua Li wrote: > On Fri, Aug 18, 2017 at 09:35:01AM -0600, Jens Axboe wrote: >> On 08/18/2017 09:13 AM, Shaohua Li wrote: >>> discard request usually is very big and easily use all bandwidth budget >>> of a cgroup. discard request size doesn't really mean the size of

Re: [PATCH v3] blktrace: Fix potentail deadlock between delete & sysfs ops

2017-08-18 Thread Bart Van Assche
On Fri, 2017-08-18 at 13:54 -0400, Waiman Long wrote: > Instead, a global blktrace > mutex will be used to serialize the read/write of the blktrace sysfs > attributes. Hello Waiman, Using a mutex to serialize code is wrong. What is needed is exact documentation of what data structures and/or

[PATCH v3] blktrace: Fix potentail deadlock between delete & sysfs ops

2017-08-18 Thread Waiman Long
The lockdep code had reported the following unsafe locking scenario: CPU0CPU1 lock(s_active#228); lock(>bd_mutex/1); lock(s_active#228); lock(>bd_mutex); *** DEADLOCK

Re: [PATCH v2] blktrace: Fix potentail deadlock between delete & sysfs ops

2017-08-18 Thread Steven Rostedt
On Fri, 18 Aug 2017 16:21:46 + Bart Van Assche wrote: > Sorry Waiman but personally I thoroughly detest loops around mutex_trylock() > or > mutex_timed_lock() because such loops are usually used to paper over a problem > instead of fixing the root cause. 100% agree.

Re: [PATCH 1/2] loop: always return block size in LOOP_GET_STATUS

2017-08-18 Thread Karel Zak
On Fri, Aug 18, 2017 at 09:44:25AM -0700, Omar Sandoval wrote: > On Fri, Aug 18, 2017 at 11:22:39AM +0200, Karel Zak wrote: > > On Fri, Aug 18, 2017 at 01:22:26AM -0700, Omar Sandoval wrote: > > > On Fri, Aug 18, 2017 at 10:12:51AM +0200, Hannes Reinecke wrote: > > > > On 08/18/2017 10:05 AM, Omar

Re: [PATCH v2] blktrace: Fix potentail deadlock between delete & sysfs ops

2017-08-18 Thread Waiman Long
On 08/18/2017 12:21 PM, Bart Van Assche wrote: > On Fri, 2017-08-18 at 09:55 -0400, Waiman Long wrote: >> On 08/17/2017 05:30 PM, Steven Rostedt wrote: >>> On Thu, 17 Aug 2017 17:10:07 -0400 >>> Steven Rostedt wrote: Instead of playing games with taking the lock, the

Re: [PATCH] blk-mq-debugfs: Add names for recently added flags

2017-08-18 Thread Bart Van Assche
On Fri, 2017-08-18 at 08:47 -0700, Bart Van Assche wrote: > diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c > index e53b6129ca5a..9fac2915d897 100644 > --- a/block/blk-mq-debugfs.c > +++ b/block/blk-mq-debugfs.c > @@ -73,6 +73,8 @@ static const char *const blk_queue_flag_name[] = { >

Re: [PATCH 1/2] loop: always return block size in LOOP_GET_STATUS

2017-08-18 Thread Omar Sandoval
On Fri, Aug 18, 2017 at 11:22:39AM +0200, Karel Zak wrote: > On Fri, Aug 18, 2017 at 01:22:26AM -0700, Omar Sandoval wrote: > > On Fri, Aug 18, 2017 at 10:12:51AM +0200, Hannes Reinecke wrote: > > > On 08/18/2017 10:05 AM, Omar Sandoval wrote: > > > > On Fri, Aug 18, 2017 at 09:56:26AM +0200,

[PATCH] block, bfq: fix error handle in bfq_init

2017-08-18 Thread weiping zhang
if elv_register fail, bfq_pool should be free. Signed-off-by: weiping zhang --- block/bfq-iosched.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index 436b6ca..bdb072f 100644 ---

Re: [PATCH] blk-throttle: ignore discard request size

2017-08-18 Thread Shaohua Li
On Fri, Aug 18, 2017 at 09:35:01AM -0600, Jens Axboe wrote: > On 08/18/2017 09:13 AM, Shaohua Li wrote: > > discard request usually is very big and easily use all bandwidth budget > > of a cgroup. discard request size doesn't really mean the size of data > > written, so it doesn't make sense to

Re: [PATCH v2] blktrace: Fix potentail deadlock between delete & sysfs ops

2017-08-18 Thread Bart Van Assche
On Fri, 2017-08-18 at 09:55 -0400, Waiman Long wrote: > On 08/17/2017 05:30 PM, Steven Rostedt wrote: > > On Thu, 17 Aug 2017 17:10:07 -0400 > > Steven Rostedt wrote: > > > Instead of playing games with taking the lock, the only way this race > > > is hit, is if the partition

[PATCH] block: remove blk_free_devt in add_partition

2017-08-18 Thread weiping zhang
put_device(pdev) will call pdev->type->release finally, and blk_free_devt has been called in part_release(), so remove it. Signed-off-by: weiping zhang --- block/partition-generic.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/partition-generic.c

[PATCH v2] blk-mq: Explain when 'active_queues' is decremented

2017-08-18 Thread Bart Van Assche
It is nontrivial to derive from the blk-mq source code when blk_mq_tags.active_queues is decremented. Hence add a comment that explains this. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn

[PATCH] blk-mq-debugfs: Add names for recently added flags

2017-08-18 Thread Bart Van Assche
The symbolic constants QUEUE_FLAG_SCSI_PASSTHROUGH, QUEUE_FLAG_QUIESCED and REQ_NOWAIT are missing from blk-mq-debugfs.c. Add these to blk-mq-debugfs.c such that these appear as names in debugfs instead of as numbers. Signed-off-by: Bart Van Assche Cc: Omar Sandoval

Re: [PATCH 06/12] blk-mq-debugfs: Generate name-to-text translation tables

2017-08-18 Thread Jens Axboe
On 08/18/2017 09:11 AM, Bart Van Assche wrote: > On Fri, 2017-08-18 at 08:35 -0600, Jens Axboe wrote: >> On Thu, Aug 17 2017, Bart Van Assche wrote: >>> It is easy to add a flag to one of the block layer headers and to >>> forget to update blk-mq-debugfs.c. E.g. QUEUE_FLAG_SCSI_PASSTHROUGH, >>>

Re: [PATCH] blk-throttle: ignore discard request size

2017-08-18 Thread Jens Axboe
On 08/18/2017 09:13 AM, Shaohua Li wrote: > discard request usually is very big and easily use all bandwidth budget > of a cgroup. discard request size doesn't really mean the size of data > written, so it doesn't make sense to account it into bandwidth budget. > This patch ignores discard

Re: [PATCH] blk-mq-pci: add a fallback when pci_irq_get_affinity returns NULL

2017-08-18 Thread Jens Axboe
On 08/17/2017 04:24 AM, Christoph Hellwig wrote: > While pci_irq_get_affinity should never fail for SMP kernel that > implement the affinity mapping, it will always return NULL in the > UP case, so provide a fallback mapping of all queues to CPU 0 in > that case. Applied for 4.13. -- Jens Axboe

Re: [PATCH v2] blktrace: Fix potentail deadlock between delete & sysfs ops

2017-08-18 Thread Waiman Long
On 08/17/2017 05:30 PM, Steven Rostedt wrote: > On Thu, 17 Aug 2017 17:10:07 -0400 > Steven Rostedt wrote: > > >> Instead of playing games with taking the lock, the only way this race >> is hit, is if the partition is being deleted and the sysfs attribute is >> being read at

[PATCH] loop: Fix freeze if configured block size is not supported

2017-08-18 Thread Milan Broz
The commit f2c6df7dbf9a60e1cd9941f9fb376d4d9ad1e8dd loop: support 4k physical blocksize adds support for loop block size with only specific block sizes. If the size is not supported, the code returns -EINVAL keeping the loop queue frozen. This causes that device could be locked for a long

Re: [Xen-devel] [PATCH 12/12] xen-blkfront: Avoid that gcc 7 warns about fall-through when building with W=1

2017-08-18 Thread Roger Pau Monn303251
On Fri, Aug 18, 2017 at 12:46:23PM +0100, Anthony PERARD wrote: > On Fri, Aug 18, 2017 at 09:54:01AM +0100, Roger Pau Monn303251 wrote: > > On Thu, Aug 17, 2017 at 04:23:11PM -0700, Bart Van Assche wrote: > > > Signed-off-by: Bart Van Assche > > > Cc: Konrad Rzeszutek Wilk

Re: [Xen-devel] [PATCH 12/12] xen-blkfront: Avoid that gcc 7 warns about fall-through when building with W=1

2017-08-18 Thread Anthony PERARD
On Fri, Aug 18, 2017 at 09:54:01AM +0100, Roger Pau Monn303251 wrote: > On Thu, Aug 17, 2017 at 04:23:11PM -0700, Bart Van Assche wrote: > > Signed-off-by: Bart Van Assche > > Cc: Konrad Rzeszutek Wilk > > Cc: Roger Pau Monn303251

Re: [PATCH blktests v2] loop/002: Regression testing for loop device flush

2017-08-18 Thread James Wang
No problem thank you sir 发自我的 iPhone > 在 2017年8月18日,16:11,Omar Sandoval 写道: > >> On Tue, Jun 27, 2017 at 12:01:47PM +0800, James Wang wrote: >> Add a regression testing for loop device. when an unbound device >> be close that take too long time. kernel will consume

Re: [PATCH 1/2] loop: always return block size in LOOP_GET_STATUS

2017-08-18 Thread Karel Zak
On Fri, Aug 18, 2017 at 01:22:26AM -0700, Omar Sandoval wrote: > On Fri, Aug 18, 2017 at 10:12:51AM +0200, Hannes Reinecke wrote: > > On 08/18/2017 10:05 AM, Omar Sandoval wrote: > > > On Fri, Aug 18, 2017 at 09:56:26AM +0200, Hannes Reinecke wrote: > > >> On 08/18/2017 09:47 AM, Omar Sandoval

Re: [PATCH 1/2] loop: always return block size in LOOP_GET_STATUS

2017-08-18 Thread Karel Zak
On Fri, Aug 18, 2017 at 01:22:26AM -0700, Omar Sandoval wrote: > On Fri, Aug 18, 2017 at 10:12:51AM +0200, Hannes Reinecke wrote: > > On 08/18/2017 10:05 AM, Omar Sandoval wrote: > > > On Fri, Aug 18, 2017 at 09:56:26AM +0200, Hannes Reinecke wrote: > > >> On 08/18/2017 09:47 AM, Omar Sandoval

Re: [PATCH 12/12] xen-blkfront: Avoid that gcc 7 warns about fall-through when building with W=1

2017-08-18 Thread Roger Pau Monn303251
On Thu, Aug 17, 2017 at 04:23:11PM -0700, Bart Van Assche wrote: > Signed-off-by: Bart Van Assche > Cc: Konrad Rzeszutek Wilk > Cc: Roger Pau Monn303251 > Cc: xen-de...@lists.xenproject.org > --- >

Re: [PATCH 1/2] loop: always return block size in LOOP_GET_STATUS

2017-08-18 Thread Omar Sandoval
On Fri, Aug 18, 2017 at 10:12:51AM +0200, Hannes Reinecke wrote: > On 08/18/2017 10:05 AM, Omar Sandoval wrote: > > On Fri, Aug 18, 2017 at 09:56:26AM +0200, Hannes Reinecke wrote: > >> On 08/18/2017 09:47 AM, Omar Sandoval wrote: > [ .. ] > >>> > >>> I actually checked losetup, it works just fine

Re: [PATCH 1/2] loop: always return block size in LOOP_GET_STATUS

2017-08-18 Thread Hannes Reinecke
On 08/18/2017 10:05 AM, Omar Sandoval wrote: > On Fri, Aug 18, 2017 at 09:56:26AM +0200, Hannes Reinecke wrote: >> On 08/18/2017 09:47 AM, Omar Sandoval wrote: [ .. ] >>> >>> I actually checked losetup, it works just fine with LO_FLAGS_BLOCKSIZE >>> always set and lo_init[0] always filled in. >>>

Re: [PATCH blktests v2] loop/002: Regression testing for loop device flush

2017-08-18 Thread Omar Sandoval
On Tue, Jun 27, 2017 at 12:01:47PM +0800, James Wang wrote: > Add a regression testing for loop device. when an unbound device > be close that take too long time. kernel will consume serveral orders > of magnitude more wall time than it does for a mounted device. James, sorry I forgot about this.

Re: [PATCH 1/2] loop: always return block size in LOOP_GET_STATUS

2017-08-18 Thread Omar Sandoval
On Fri, Aug 18, 2017 at 09:56:26AM +0200, Hannes Reinecke wrote: > On 08/18/2017 09:47 AM, Omar Sandoval wrote: > > On Fri, Aug 18, 2017 at 09:43:19AM +0200, Hannes Reinecke wrote: > >> On 08/18/2017 09:38 AM, Omar Sandoval wrote: > >>> On Fri, Aug 18, 2017 at 09:18:52AM +0200, Hannes Reinecke

Re: [PATCH 1/2] loop: always return block size in LOOP_GET_STATUS

2017-08-18 Thread Hannes Reinecke
On 08/18/2017 09:47 AM, Omar Sandoval wrote: > On Fri, Aug 18, 2017 at 09:43:19AM +0200, Hannes Reinecke wrote: >> On 08/18/2017 09:38 AM, Omar Sandoval wrote: >>> On Fri, Aug 18, 2017 at 09:18:52AM +0200, Hannes Reinecke wrote: [ .. ] I've got quite some flak for daring to break existing

Re: [PATCH 1/2] loop: always return block size in LOOP_GET_STATUS

2017-08-18 Thread Omar Sandoval
On Fri, Aug 18, 2017 at 09:43:19AM +0200, Hannes Reinecke wrote: > On 08/18/2017 09:38 AM, Omar Sandoval wrote: > > On Fri, Aug 18, 2017 at 09:18:52AM +0200, Hannes Reinecke wrote: > >> On 08/18/2017 08:15 AM, Omar Sandoval wrote: > >>> From: Omar Sandoval > >>> > >>> When I was

Re: [PATCH 1/2] loop: always return block size in LOOP_GET_STATUS

2017-08-18 Thread Hannes Reinecke
On 08/18/2017 09:38 AM, Omar Sandoval wrote: > On Fri, Aug 18, 2017 at 09:18:52AM +0200, Hannes Reinecke wrote: >> On 08/18/2017 08:15 AM, Omar Sandoval wrote: >>> From: Omar Sandoval >>> >>> When I was writing a test for the new loop device block size >>> functionality, I

Re: [PATCH 11/12] xen-blkback: Avoid that gcc 7 warns about fall-through when building with W=1

2017-08-18 Thread Hannes Reinecke
On 08/18/2017 01:23 AM, Bart Van Assche wrote: > Signed-off-by: Bart Van Assche > Cc: Konrad Rzeszutek Wilk > Cc: Roger Pau Monn303251 > Cc: xen-de...@lists.xenproject.org > --- > drivers/block/xen-blkback/blkback.c | 1 + >

Re: [PATCH 09/12] virtio_blk: Use blk_rq_is_scsi()

2017-08-18 Thread Hannes Reinecke
On 08/18/2017 01:23 AM, Bart Van Assche wrote: > This patch does not change any functionality. > > Signed-off-by: Bart Van Assche > Cc: Michael S. Tsirkin > Cc: Jason Wang > Cc: virtualizat...@lists.linux-foundation.org > --- >

Re: [PATCH 10/12] xen-blkback: Fix indentation

2017-08-18 Thread Hannes Reinecke
On 08/18/2017 01:23 AM, Bart Van Assche wrote: > Avoid that smatch reports the following warning when building with > C=2 CHECK="smatch -p=kernel": > > drivers/block/xen-blkback/blkback.c:710 xen_blkbk_unmap_prepare() warn: > inconsistent indenting > > Signed-off-by: Bart Van Assche

Re: [PATCH 08/12] ide-floppy: Use blk_rq_is_scsi()

2017-08-18 Thread Hannes Reinecke
On 08/18/2017 01:23 AM, Bart Van Assche wrote: > This patch does not change any functionality. > > Signed-off-by: Bart Van Assche > Cc: David S. Miller > Cc: linux-...@vger.kernel.org > --- > drivers/ide/ide-floppy.c | 2 +- > 1 file changed, 1

Re: [PATCH 1/2] loop: always return block size in LOOP_GET_STATUS

2017-08-18 Thread Omar Sandoval
On Fri, Aug 18, 2017 at 09:18:52AM +0200, Hannes Reinecke wrote: > On 08/18/2017 08:15 AM, Omar Sandoval wrote: > > From: Omar Sandoval > > > > When I was writing a test for the new loop device block size > > functionality, I realized that the interface is kind of dumb: > > > >

Re: [PATCH 06/12] blk-mq-debugfs: Generate name-to-text translation tables

2017-08-18 Thread Hannes Reinecke
On 08/18/2017 01:23 AM, Bart Van Assche wrote: > It is easy to add a flag to one of the block layer headers and to > forget to update blk-mq-debugfs.c. E.g. QUEUE_FLAG_SCSI_PASSTHROUGH, > QUEUE_FLAG_QUIESCED and REQ_NOWAIT are missing from blk-mq-debugfs.c. > Hence generate the symbol-to-text

Re: [PATCH 05/12] blk-mq-debugfs: Declare a local symbol static

2017-08-18 Thread Hannes Reinecke
On 08/18/2017 01:23 AM, Bart Van Assche wrote: > This was detected by sparse. > > Signed-off-by: Bart Van Assche > Cc: Omar Sandoval > --- > block/blk-mq-debugfs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH 04/12] blk-mq: Make blk_mq_reinit_tagset() calls easier to read

2017-08-18 Thread Hannes Reinecke
On 08/18/2017 01:23 AM, Bart Van Assche wrote: > Since blk_mq_ops.reinit_request is only called from inside > blk_mq_reinit_tagset(), make this function pointer an argument of > blk_mq_reinit_tagset() instead of a member of struct blk_mq_ops. > This patch does not change any functionality but

Re: [PATCH 03/12] blk-mq: Explain when 'active_queues' is decremented

2017-08-18 Thread Hannes Reinecke
On 08/18/2017 01:23 AM, Bart Van Assche wrote: > It is nontrivial to derive from the blk-mq source code when > blk_mq_tags.active_queues is decremented. Hence add a comment that > explains this. > > Signed-off-by: Bart Van Assche > Cc: Christoph Hellwig >

Re: [PATCH 02/12] block: Unexport blk_queue_end_tag()

2017-08-18 Thread Hannes Reinecke
On 08/18/2017 01:23 AM, Bart Van Assche wrote: > This function is only used inside the block layer core. Hence > unexport it. > > Signed-off-by: Bart Van Assche > Cc: Christoph Hellwig > Cc: Hannes Reinecke > Cc: Johannes Thumshirn

Re: [PATCH 01/12] block: Fix two comments that refer to .queue_rq() return values

2017-08-18 Thread Hannes Reinecke
On 08/18/2017 01:23 AM, Bart Van Assche wrote: > Since patch "blk-mq: switch .queue_rq return value to blk_status_t" > .queue_rq() returns a BLK_STS_* value instead of a BLK_MQ_RQ_* > value. Hence refer to the former in comments about .queue_rq() > return values. > > Fixes: commit 39a70c76b89b

Re: [PATCH 2/2] loop: fix hang if LOOP_SET_STATUS gets invalid blocksize or encrypt type

2017-08-18 Thread Hannes Reinecke
On 08/18/2017 08:15 AM, Omar Sandoval wrote: > From: Omar Sandoval > > In both of these error cases, we need to make sure to unfreeze the queue > before we return. > > Fixes: ecdd09597a57 ("block/loop: fix race between I/O and set_status") > Fixes: f2c6df7dbf9a ("loop: support

Re: [PATCH 1/2] loop: always return block size in LOOP_GET_STATUS

2017-08-18 Thread Hannes Reinecke
On 08/18/2017 08:15 AM, Omar Sandoval wrote: > From: Omar Sandoval > > When I was writing a test for the new loop device block size > functionality, I realized that the interface is kind of dumb: > > - lo_init[0] is never filled in with the logical block size we > previously

Re: [RFC PATCH] nvme: always return IRQ_HANDLED

2017-08-18 Thread Christoph Hellwig
On Thu, Aug 17, 2017 at 02:25:27PM -0600, Jens Axboe wrote: > Yes, that will work. We need to get this into 4.13. I'll pick it up for the pull request I'm going to send you today.

Re: [PATCH 05/12] blk-mq-debugfs: Declare a local symbol static

2017-08-18 Thread Omar Sandoval
On Thu, Aug 17, 2017 at 04:23:04PM -0700, Bart Van Assche wrote: > This was detected by sparse. Reviewed-by: Omar Sandoval > Signed-off-by: Bart Van Assche > Cc: Omar Sandoval > --- > block/blk-mq-debugfs.c | 2 +- > 1 file changed,

Re: [PATCH 0/2] loop: LOOP_FLAGS_BLOCKSIZE fixes

2017-08-18 Thread Omar Sandoval
On Thu, Aug 17, 2017 at 11:15:24PM -0700, Omar Sandoval wrote: > From: Omar Sandoval > > A couple of bugs I found while adding blktests for the new loop block > size feature. Based on v4.13-rc5, we should get these in for 4.13. Just pushed the test:

[PATCH 1/2] loop: always return block size in LOOP_GET_STATUS

2017-08-18 Thread Omar Sandoval
From: Omar Sandoval When I was writing a test for the new loop device block size functionality, I realized that the interface is kind of dumb: - lo_init[0] is never filled in with the logical block size we previously set - lo_flags returned from LOOP_GET_STATUS will have

[PATCH 2/2] loop: fix hang if LOOP_SET_STATUS gets invalid blocksize or encrypt type

2017-08-18 Thread Omar Sandoval
From: Omar Sandoval In both of these error cases, we need to make sure to unfreeze the queue before we return. Fixes: ecdd09597a57 ("block/loop: fix race between I/O and set_status") Fixes: f2c6df7dbf9a ("loop: support 4k physical blocksize") Signed-off-by: Omar Sandoval

[PATCH 0/2] loop: LOOP_FLAGS_BLOCKSIZE fixes

2017-08-18 Thread Omar Sandoval
From: Omar Sandoval A couple of bugs I found while adding blktests for the new loop block size feature. Based on v4.13-rc5, we should get these in for 4.13. Thanks! Omar Sandoval (2): loop: always return block size in LOOP_GET_STATUS loop: fix hang if LOOP_SET_STATUS gets