aboutsummaryrefslogtreecommitdiffstats
diff options
authorHans Holmberg <hans.holmberg@wdc.com>2026-05-18 08:52:24 +0200
committerCarlos Maiolino <cem@kernel.org>2026-05-26 11:55:58 +0200
commit6f4d98bb8b4d4fe4e15e8ca4e7718c799186efcf (patch)
tree22ee8100cd2bf2df763e37f30cfad8e793091c1d
parentc69439a891ccb37ede5d68539636337c6bd92fab (diff)
downloadlinux-next-history-6f4d98bb8b4d4fe4e15e8ca4e7718c799186efcf.tar.gz
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>
-rw-r--r--fs/xfs/xfs_zone_gc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_zone_gc.c b/fs/xfs/xfs_zone_gc.c
index c8a1d5c0332c5..f03211e4354ad 100644
--- a/fs/xfs/xfs_zone_gc.c
+++ b/fs/xfs/xfs_zone_gc.c
@@ -400,7 +400,7 @@ retry:
/*
* If the inode was already deleted, skip over it.
*/
- if (error == -ENOENT) {
+ if (error == -ENOENT || error == -EINVAL) {
iter->rec_idx++;
goto retry;
}