Re: [PATCH 4/4] xfs: only iget the file once when doing vectored scrub-by-handle

Christoph Hellwig
2024-04-16T05:35:26Z

> out_free:
> + /*
> + * If we're holding the only reference to an inode opened via handle,
> + * mark it dontcache so that we don't pollute the cache.
> + */
> + if (handle_ip) {
> + if (atomic_read(&VFS_I(handle_ip)->i_count) == 1)
> + d_mark_dontcache(VFS_I(handle_ip));
> + xfs_irele(handle_ip);

This still feels the wrong way around vs just using IGET_UNCACHED?

Or did I miss the killer argument why that can't work?