summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2021-09-01 11:18:03 -0700
committerDarrick J. Wong <djwong@kernel.org>2021-10-22 16:41:05 -0700
commitfaff24ec99ae3f34c0096a184bb845dca928fd2b (patch)
treebaf43e35503462fc87caa7c68facd9a1bd27c0e2
parent8f68adee7dfbf608941bae86b161d1d9a9676895 (diff)
xfs: apply noalloc mode to inode allocations toonoalloc-ags_2021-10-22
Don't allow inode allocations from this group if it's marked noalloc. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
-rw-r--r--fs/xfs/libxfs/xfs_ialloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_ialloc.c b/fs/xfs/libxfs/xfs_ialloc.c
index 12d347658d96..b7a48e800bc1 100644
--- a/fs/xfs/libxfs/xfs_ialloc.c
+++ b/fs/xfs/libxfs/xfs_ialloc.c
@@ -1019,6 +1019,7 @@ xfs_dialloc_ag_inobt(
ASSERT(pag->pagi_init);
ASSERT(pag->pagi_inodeok);
+ ASSERT(!pag->pagf_noalloc);
ASSERT(pag->pagi_freecount > 0);
restart_pagno:
@@ -1645,7 +1646,7 @@ xfs_dialloc_good_ag(
int needspace;
int error;
- if (!pag->pagi_inodeok)
+ if (!pag->pagi_inodeok || pag->pagf_noalloc)
return false;
if (!pag->pagi_init) {