On Mon, Mar 03, 2025 at 06:03:07AM -0800, Christoph Hellwig wrote: > The right thing to do it to just issue readahead in > vfs_dedupe_file_range_compare. The ractl structure is a bit odd so > it'll need slightky more careful thoughts than just a hacked up > one-liner, but it should still be realtively simple. I can look into > it once I find a little time if no one beats me to it. I gave it a quick try yesterday, but it turns out XFS hold the invalidate_lock over dedup, and the readahead code also wants to take it. So the simple use of the readahead code doesn't work. But as dedup only needs a tiny subset of the readahead algorithm it might be possible to simply open code it. I'll see what I can do when I find a little more time for it.