summaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorChristoph Hellwig2017-01-09 22:36:30 +0100
committerDarrick J. Wong2017-01-09 22:35:00 +0100
commit5149fd327f16e393c1d04fa5325ab072c32472bf (patch)
tree8b84371ccc0ad6fe0e220c20ad16e695caf6f6a9 /fs/xfs
parentLinux 4.10-rc3 (diff)
downloadkernel-qcow2-linux-5149fd327f16e393c1d04fa5325ab072c32472bf.tar.gz
kernel-qcow2-linux-5149fd327f16e393c1d04fa5325ab072c32472bf.tar.xz
kernel-qcow2-linux-5149fd327f16e393c1d04fa5325ab072c32472bf.zip
xfs: bump up reserved blocks in xfs_alloc_set_aside
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>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/libxfs/xfs_alloc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c
index 5050056a0b06..0a46f8488b8d 100644
--- a/fs/xfs/libxfs/xfs_alloc.c
+++ b/fs/xfs/libxfs/xfs_alloc.c
@@ -95,10 +95,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);
}
/*