]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
xfs: tune down agno asserts in the bmap code
authorChristoph Hellwig <hch@lst.de>
Fri, 17 Feb 2017 01:12:51 +0000 (17:12 -0800)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 21 Apr 2017 08:11:20 +0000 (10:11 +0200)
commit57469e00b47502862f10f92db6ccf17b14220129
treec918c4d08692249591fbdd866350db57e0e2b330
parentbe427bbff46b919d8a81e87748107e7526cef0b5
xfs: tune down agno asserts in the bmap code

BugLink: http://bugs.launchpad.net/bugs/1681875
commit 410d17f67e583559be3a922f8b6cc336331893f3 upstream.

In various places we currently assert that xfs_bmap_btalloc allocates
from the same as the firstblock value passed in, unless it's either
NULLAGNO or the dop_low flag is set.  But the reflink code does not
fully follow this convention as it passes in firstblock purely as
a hint for the allocator without actually having previous allocations
in the transaction, and without having a minleft check on the current
AG, leading to the assert firing on a very full and heavily used
file system.  As even the reflink code only allocates from equal or
higher AGs for now we can simply the check to always allow for equal
or higher AGs.

Note that we need to eventually split the two meanings of the firstblock
value.  At that point we can also allow the reflink code to allocate
from any AG instead of limiting it in any way.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
fs/xfs/libxfs/xfs_bmap.c