From 0e14ded69b61e4df26405f30910b3749d73a1b88 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Wed, 7 Aug 2024 15:54:51 -0700 Subject: [PATCH] xfs: apply noalloc mode to inode allocations too Don't allow inode allocations from this group if it's marked noalloc. Signed-off-by: Darrick J. Wong --- libxfs/xfs_ialloc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libxfs/xfs_ialloc.c b/libxfs/xfs_ialloc.c index 606e7eedb..d67e7a667 100644 --- a/libxfs/xfs_ialloc.c +++ b/libxfs/xfs_ialloc.c @@ -1104,6 +1104,7 @@ xfs_dialloc_ag_inobt( ASSERT(xfs_perag_initialised_agi(pag)); ASSERT(xfs_perag_allows_inodes(pag)); + ASSERT(!xfs_perag_prohibits_alloc(pag)); ASSERT(pag->pagi_freecount > 0); restart_pagno: @@ -1732,6 +1733,8 @@ xfs_dialloc_good_ag( return false; if (!xfs_perag_allows_inodes(pag)) return false; + if (xfs_perag_prohibits_alloc(pag)) + return false; if (!xfs_perag_initialised_agi(pag)) { error = xfs_ialloc_read_agi(pag, tp, 0, NULL); -- 2.50.1