All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhan Xusheng <zhanxusheng1024@gmail.com>
To: Jingbo Xu <jefflexu@linux.alibaba.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 11:10:59 +0800	[thread overview]
Message-ID: <20260820031100.1038753-1-zhanxusheng@xiaomi.com> (raw)
In-Reply-To: <20260818113713.116849-1-jefflexu@linux.alibaba.com>

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.

Thanks,
Zhan Xusheng


  reply	other threads:[~2026-08-20  3:11 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 [this message]
2026-08-20  6:17   ` Jingbo Xu
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=20260820031100.1038753-1-zhanxusheng@xiaomi.com \
    --to=zhanxusheng1024@gmail.com \
    --cc=chao@kernel.org \
    --cc=jefflexu@linux.alibaba.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xiang@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.