Re: [PATCH] erofs-utils: tests: add a splice() test for inode_share mode

Gao Xiang <[email protected]>
Newsgroups org.ozlabs.lists.linux-erofs
Message-ID <[email protected]>
Hi Xusheng,

On Fri, Aug 21, 2026 at 09:57:22AM +0800, Zhan Xusheng wrote:
> From: Zhan Xusheng <[email protected]>
> 
> From: Zhan Xusheng <[email protected]>
> 
> splice() and sendfile() went through filemap_splice_read() on the user
> file, so they populated the per-inode page cache instead of the shared one
> that read() and mmap() use.  The content was correct either way, which is
> why nothing caught it: only which mapping the pages land in changes.
> 
> Observe that instead.  cachestat() works on the file's own mapping, while
> fincore's mmap()+mincore() fallback goes through erofs_ishare_mmap(), which

Actually we shouldn't rely on the fact that cachestat() works on the
file's own mapping since it's another misfeature, similar to:

https://lore.kernel.org/linux-unionfs/[email protected]/

we should find another way to replace the cachestat() usage here.

Thanks,
Gao Xiang
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.