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-09-17 18:55:19 -0700
commitdee59856530ba9530bc134b56a843b83780472ec (patch)
tree399369981073f2f5feea53432b889cc630cb379a
parentfda5981846fc365dd9907804de46298da2b014a8 (diff)
xfs: apply noalloc mode to inode allocations toonoalloc-ags_2021-09-17
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) {