[PATCH] xfs: set minleft correctly for randomly sparse inode allocations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In DEBUG mode may do sparse inode allocations randomly, but forget to
set the remaining space correctly for the inode btree to split.
It's OK for most cases, only under DEBUG mode and AG space is running
out may bring something bad.

Fixes: 1cdadee11f8d ("xfs: randomly do sparse inode allocations in DEBUG mode")
Signed-off-by: Guo Xuenan <guoxuenan@xxxxxxxxxx>
---
 fs/xfs/libxfs/xfs_ialloc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/xfs/libxfs/xfs_ialloc.c b/fs/xfs/libxfs/xfs_ialloc.c
index 94db50eb706a..29bc160312ec 100644
--- a/fs/xfs/libxfs/xfs_ialloc.c
+++ b/fs/xfs/libxfs/xfs_ialloc.c
@@ -763,6 +763,8 @@ xfs_ialloc_ag_alloc(
 		args.alignment = args.mp->m_sb.sb_spino_align;
 		args.prod = 1;
 
+		/* Allow space for the inode btree to split */
+		args.minleft = igeo->inobt_maxlevels;
 		args.minlen = igeo->ialloc_min_blks;
 		args.maxlen = args.minlen;
 
-- 
2.31.1




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux