mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
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: 080d01c41d ("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>
This commit is contained in:
parent
8339dd0e50
commit
bc95fa240a
|
|
@ -400,7 +400,7 @@ xfs_zone_gc_iter_irec(
|
|||
/*
|
||||
* If the inode was already deleted, skip over it.
|
||||
*/
|
||||
if (error == -ENOENT) {
|
||||
if (error == -ENOENT || error == -EINVAL) {
|
||||
iter->rec_idx++;
|
||||
goto retry;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user