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
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
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
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
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
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
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,
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
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
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
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
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
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
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
> >>>
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
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
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
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.
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
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
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[] = {
>
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,
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
---
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
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
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
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
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
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,
>>>
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
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
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
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
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
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
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
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
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
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
> ---
>
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
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.
>>>
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.
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
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
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
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
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 +
>
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
> ---
>
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
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
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:
> >
> >
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
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
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
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
>
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
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
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
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
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.
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,
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:
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
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
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
65 matches
Mail list logo