]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
xfs: apply noalloc mode to inode allocations too
authorDarrick J. Wong <djwong@kernel.org>
Wed, 7 Aug 2024 22:54:51 +0000 (15:54 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 14 Aug 2024 03:08:25 +0000 (20:08 -0700)
Don't allow inode allocations from this group if it's marked noalloc.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
libxfs/xfs_ialloc.c

index 606e7eedba868421198672165c1731cf09d71f27..d67e7a6677b4b0a23a0e037baea314515e60ff15 100644 (file)
@@ -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);