diff options
author | Darrick J. Wong <djwong@kernel.org> | 2021-01-05 17:46:11 -0800 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-03-25 17:08:47 -0700 |
commit | e92a06eeec420b281ef96dbdfb7ccdc0e698aff2 (patch) | |
tree | 6ce9816d10ed6aec2cb42ec7f1d579e23489f5cf | |
parent | 833dca9d1fee7fc1d2c97221d2c29989cfae0aab (diff) |
xfs: apply noalloc mode to inode allocations toonoalloc-ags_2021-03-25
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.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_ialloc.c b/fs/xfs/libxfs/xfs_ialloc.c index df4eb129ec72..10348981fe57 100644 --- a/fs/xfs/libxfs/xfs_ialloc.c +++ b/fs/xfs/libxfs/xfs_ialloc.c @@ -996,7 +996,7 @@ xfs_ialloc_ag_select( flags = XFS_ALLOC_FLAG_TRYLOCK; for (;;) { pag = xfs_perag_get(mp, agno); - if (!pag->pagi_inodeok) { + if (!pag->pagi_inodeok || pag->pagf_noalloc) { xfs_ialloc_next_ag(mp); goto nextag; } @@ -1173,6 +1173,7 @@ xfs_dialloc_ag_inobt( ASSERT(pag->pagi_init); ASSERT(pag->pagi_inodeok); + ASSERT(!pag->pagf_noalloc); ASSERT(pag->pagi_freecount > 0); restart_pagno: @@ -1828,7 +1829,7 @@ xfs_dialloc_select_ag( agno = start_agno; for (;;) { pag = xfs_perag_get(mp, agno); - if (!pag->pagi_inodeok) { + if (!pag->pagi_inodeok || pag->pagf_noalloc) { xfs_ialloc_next_ag(mp); goto nextag; } |