From: Viacheslav Dubeyko <slava@dubeyko.com>
To: Yangtao Li <frank.li@vivo.com>,
axboe@kernel.dk, aivazian.tigran@gmail.com,
viro@zeniv.linux.org.uk, brauner@kernel.org, jack@suse.cz,
linkinjeon@kernel.org, sj1557.seo@samsung.com,
yuezhang.mo@sony.com, glaubitz@physik.fu-berlin.de,
shaggy@kernel.org, konishi.ryusuke@gmail.com,
almaz.alexandrovich@paragon-software.com, me@bobcopeland.com,
willy@infradead.org, josef@toxicpanda.com, kovalev@altlinux.org,
dave@stgolabs.net, mhocko@suse.com, chentaotao@didiglobal.com
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
jfs-discussion@lists.sourceforge.net,
linux-nilfs@vger.kernel.org, ntfs3@lists.linux.dev,
linux-karma-devel@lists.sourceforge.net, bpf@vger.kernel.org
Subject: Re: [PATCH 2/4] fs/buffer: parse IOCB_DONTCACHE flag in block_write_begin()
Date: Fri, 04 Jul 2025 10:29:27 -0700 [thread overview]
Message-ID: <d698490f3ee35889d8922f392079846b647cd47e.camel@dubeyko.com> (raw)
In-Reply-To: <20250626173023.2702554-3-frank.li@vivo.com>
On Thu, 2025-06-26 at 11:30 -0600, Yangtao Li wrote:
> When iocb flags passes IOCB_DONTCACHE, use FGP_DONTCACHE mode to get
> folio.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
> fs/buffer.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/fs/buffer.c b/fs/buffer.c
> index f2b7b30a76ca..0ed80b62feea 100644
> --- a/fs/buffer.c
> +++ b/fs/buffer.c
> @@ -2251,11 +2251,14 @@ int block_write_begin(struct kiocb *iocb,
> struct address_space *mapping, loff_t
> unsigned len, struct folio **foliop, get_block_t
> *get_block)
> {
> pgoff_t index = pos >> PAGE_SHIFT;
> + fgf_t fgp = FGP_WRITEBEGIN;
> struct folio *folio;
> int status;
>
> - folio = __filemap_get_folio(mapping, index, FGP_WRITEBEGIN,
> - mapping_gfp_mask(mapping));
> + if (iocb->ki_flags & IOCB_DONTCACHE)
> + fgp |= FGP_DONTCACHE;
> +
> + folio = __filemap_get_folio(mapping, index, fgp,
> mapping_gfp_mask(mapping));
> if (IS_ERR(folio))
> return PTR_ERR(folio);
>
Correct me if I am wrong. As far as I can see, the first patch depends
from second one. It means that if somebody applies the first patch
but, somehow, don't apply the second one, then nobody will be able to
compile the kernel code. Am I correct?
Why do we need to make this modification and, then, touch other file
systems? What the justification of this? Why do we need to make this
modification at the first place?
Thanks,
Slava.
next prev parent reply other threads:[~2025-07-04 17:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-26 17:30 [PATCH 0/4] hfs/hfsplus: add uncached buffer io support Yangtao Li
2025-06-26 17:30 ` [PATCH 1/4] block: Add struct kiocb pointer to block_write_begin() Yangtao Li
2025-06-26 17:30 ` [PATCH 2/4] fs/buffer: parse IOCB_DONTCACHE flag in block_write_begin() Yangtao Li
2025-07-04 17:29 ` Viacheslav Dubeyko [this message]
2025-06-26 17:30 ` [PATCH 3/4] hfsplus: enable uncached buffer io support Yangtao Li
2025-07-04 17:45 ` Viacheslav Dubeyko
2025-06-26 17:30 ` [PATCH 4/4] hfs: " Yangtao Li
2025-07-04 17:37 ` Viacheslav Dubeyko
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=d698490f3ee35889d8922f392079846b647cd47e.camel@dubeyko.com \
--to=slava@dubeyko.com \
--cc=aivazian.tigran@gmail.com \
--cc=almaz.alexandrovich@paragon-software.com \
--cc=axboe@kernel.dk \
--cc=bpf@vger.kernel.org \
--cc=brauner@kernel.org \
--cc=chentaotao@didiglobal.com \
--cc=dave@stgolabs.net \
--cc=frank.li@vivo.com \
--cc=glaubitz@physik.fu-berlin.de \
--cc=jack@suse.cz \
--cc=jfs-discussion@lists.sourceforge.net \
--cc=josef@toxicpanda.com \
--cc=konishi.ryusuke@gmail.com \
--cc=kovalev@altlinux.org \
--cc=linkinjeon@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-karma-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nilfs@vger.kernel.org \
--cc=me@bobcopeland.com \
--cc=mhocko@suse.com \
--cc=ntfs3@lists.linux.dev \
--cc=shaggy@kernel.org \
--cc=sj1557.seo@samsung.com \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
--cc=yuezhang.mo@sony.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
all inboxes | Powered by JetHome®