]> www.infradead.org Git - users/hch/xfstests-dev.git/commit
xfs/509: adjust inumbers accounting for metadata directories
authorDarrick J. Wong <djwong@kernel.org>
Thu, 20 Feb 2025 21:47:02 +0000 (13:47 -0800)
committerZorro Lang <zlang@kernel.org>
Thu, 6 Mar 2025 13:25:55 +0000 (21:25 +0800)
commit194542e7ec7a27a12345777db324220a97fd12f2
treed7309243766d4b0d1eddb9bd3ec7b35aaee977db
parent342db989bd45dc443f28aaca302593ec61a3f727
xfs/509: adjust inumbers accounting for metadata directories

The INUMBERS ioctl exports data from the inode btree directly -- the
number of inodes it reports is taken from ir_freemask and includes all
the files in the metadata directory tree.  BULKSTAT, on the other hand,
only reports non-metadata files.  When metadir is enabled, this will
(eventually) cause a discrepancy in the inode counts that is large
enough to exceed the tolerances, thereby causing a test failure.

Correct this by counting the files in the metadata directory and
subtracting that from the INUMBERS totals.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/xfs/509