]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xfs: handle racing deletions in xfs_zone_gc_iter_irec
authorHans Holmberg <hans.holmberg@wdc.com>
Mon, 18 May 2026 06:52:24 +0000 (08:52 +0200)
committerCarlos Maiolino <cem@kernel.org>
Sat, 30 May 2026 06:26:17 +0000 (08:26 +0200)
commitbc95fa240a1b8ae64d3dabe87cbe103b912afc45
treec8d1b0c5cba07b685d00687aeb47b7a407a743f9
parent8339dd0e5090f092c525c5e04b2a75ec5e5305a6
xfs: handle racing deletions in xfs_zone_gc_iter_irec

Under heavy garbage collection pressure from RocksDB workloads,
filesystem shutdowns can occur in xfs_zone_gc_iter_irec when
xfs_iget() returns -EINVAL for deleted files.

Fix this by handling -EINVAL just like we handle -ENOENT, allowing
zone GC to safely ignore stale mappings.

Fixes: 080d01c41d44 ("xfs: implement zoned garbage collection")
Signed-off-by: Hans Holmberg <hans.holmberg@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/xfs_zone_gc.c