[PATCH 0/2][SRU][ARTFUL] Fix VFS warning and file system resize failure (LP: #1726818)

Colin King colin.king at canonical.com
Tue Nov 21 17:05:26 UTC 2017

From: Colin Ian King <colin.king at canonical.com>

The following two patches fix a VFS warning and a file system resize failure
on Artful when booting a virtual image using a vagrant/VirtualBox combo.

[SRU Justfication, Artful]


Booting the 4.13 Artful kernel with vagrant using VirtualBox trips the warning:

[ 61.010337] VFS: brelse: Trying to free free buffer
[ 61.114875] ------------[ cut here ]------------
[ 61.114886] WARNING: CPU: 0 PID: 683 at /build/linux-XO_uEE/linux-4.13.0/fs/buffer.c:1205 __brelse+0x21/0x30

and a failed resize of a partition. The root cause has been bisected down
to the following commmit:

commit c20cfc27a47307e811346f85959cf3cc07ae42f9
Author: Christoph Hellwig <hch at lst.de>
Date: Wed Apr 5 19:21:07 2017 +0200

    block: stop using blkdev_issue_write_same for zeroing

The Upstream commit directly fixes this issue:

commit d5ce4c31d6df518dd8f63bbae20d7423c5018a6c
Author: Ilya Dryomov <idryomov at gmail.com>
Date: Mon Oct 16 15:59:10 2017 +0200

    block: cope with WRITE ZEROES failing in blkdev_issue_zeroout()

..however we also require a backport of the following upstream commit to apply
the above commit cleanly:

commit 425a4dba7953e35ffd096771973add6d2f40d2ed
Author: Ilya Dryomov <idryomov at gmail.com>
Date: Mon Oct 16 15:59:09 2017 +0200

    block: factor out __blkdev_issue_zero_pages()


On Ubuntu Xenial:

1. sudo apt-get install virtualbox vagrant
2. edit /etc/group and add one's user name to the vboxusers group
3. log out log back
4. vagrant init ubuntu/artful64
5. vagrant up
6. vagrant ssh
7. dmesg | grep "VFS: brelse"

without the fix one will see the VFS brelse warning message and the /
partition will not have been resized.

with a fixed system there is is no VFS vbrelse warning and / as been
resized as expected.

[Regresion potential]
These patches touch the blk library so potentially it could break the block
layer and corrupt data on disk. However these are upstream fixes that address
the buggy commit c20cfc27a47307e811346f85959cf3cc07ae42f9 and are known to
address the bug.

Colin Ian King (1):
  block: factor out __blkdev_issue_zero_pages()

Ilya Dryomov (1):
  block: cope with WRITE ZEROES failing in blkdev_issue_zeroout()

 block/blk-lib.c | 108 +++++++++++++++++++++++++++++++++++++-------------------
 1 file changed, 72 insertions(+), 36 deletions(-)


More information about the kernel-team mailing list