From: Jingbo Xu <jefflexu@linux.alibaba.com>
To: Zhan Xusheng <zhanxusheng1024@gmail.com>,
xiang@kernel.org, chao@kernel.org, linux-erofs@lists.ozlabs.org
Cc: Zhan Xusheng <zhanxusheng@xiaomi.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] erofs: support SEEK_HOLE/SEEK_DATA in inode_share mode
Date: Thu, 20 Aug 2026 14:17:36 +0800 [thread overview]
Message-ID: <b7dc7192-d586-45a2-bc4a-b41dc681c9bb@linux.alibaba.com> (raw)
In-Reply-To: <20260820031100.1038753-1-zhanxusheng@xiaomi.com>
On 8/20/26 11:10 AM, Zhan Xusheng wrote:
> On Tue, 18 Aug 2026 19:37:13 +0800, Jingbo Xu wrote:
>> - .llseek = generic_file_llseek,
>> + .llseek = erofs_file_llseek,
>
> No objection to the change. While in that table, .splice_read is the entry
> left that touches the page cache without going through ->private_data:
>
> .read_iter kiocb_clone() onto private_data, then filemap_read()
> .mmap vma_set_file(vma, realfile)
> .fadvise vfs_fadvise(file->private_data, ...)
> .splice_read filemap_splice_read
>
> filemap_splice_read() does init_sync_kiocb(&iocb, in), and
> filemap_get_pages() then takes iocb->ki_filp->f_mapping (mm/filemap.c:2686),
> so it works on the user file's mapping, which after your patch is confirmed
> to be the real inode's. erofs_fill_inode() sets that mapping's a_ops
> unconditionally, so the data splice() and sendfile() return is correct, but
> they populate the per-file page cache from disk rather than the shared one
> read() and mmap() use, caching the same content twice.
Right. I think that would be another patch to fix that.
--
Thanks,
Jingbo
next prev parent reply other threads:[~2026-08-20 6:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-18 11:37 [PATCH] erofs: support SEEK_HOLE/SEEK_DATA in inode_share mode Jingbo Xu
2026-08-20 3:10 ` Zhan Xusheng
2026-08-20 6:17 ` Jingbo Xu [this message]
2026-08-20 13:33 ` Gao Xiang
2026-08-20 13:35 ` Jingbo Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b7dc7192-d586-45a2-bc4a-b41dc681c9bb@linux.alibaba.com \
--to=jefflexu@linux.alibaba.com \
--cc=chao@kernel.org \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=xiang@kernel.org \
--cc=zhanxusheng1024@gmail.com \
--cc=zhanxusheng@xiaomi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox