]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: bump up reserved blocks in xfs_alloc_set_aside
authorChristoph Hellwig <hch@lst.de>
Wed, 11 Jan 2017 02:07:05 +0000 (20:07 -0600)
committerEric Sandeen <sandeen@redhat.com>
Wed, 11 Jan 2017 02:07:05 +0000 (20:07 -0600)
Source kernel commit: 5149fd327f16e393c1d04fa5325ab072c32472bf

Setting aside 4 blocks globally for bmbt splits isn't all that useful,
as different threads can allocate space in parallel.  Bump it to 4
blocks per AG to allow each thread that is currently doing an
allocation to dip into it separately.  Without that we may no have
enough reserved blocks if there are enough parallel transactions
in an almost out space file system that all run into bmap btree
splits.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_alloc.c

index a12d5c65e89cd97f4511bcb0d053e4c51c831c91..70bb06fedef6a4db57d7ef6416e26a2575a56de5 100644 (file)
@@ -91,10 +91,7 @@ unsigned int
 xfs_alloc_set_aside(
        struct xfs_mount        *mp)
 {
-       unsigned int            blocks;
-
-       blocks = 4 + (mp->m_sb.sb_agcount * XFS_ALLOC_AGFL_RESERVE);
-       return blocks;
+       return mp->m_sb.sb_agcount * (XFS_ALLOC_AGFL_RESERVE + 4);
 }
 
 /*