The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Chunsheng Luo <luochunsheng@ustc.edu>
Cc: miklos@szeredi.hu, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fuse: clarify extending writes handling
Date: Tue, 19 Aug 2025 22:20:43 -0700	[thread overview]
Message-ID: <20250820052043.GJ7942@frogsfrogsfrogs> (raw)
In-Reply-To: <20250820021143.1069-1-luochunsheng@ustc.edu>

On Wed, Aug 20, 2025 at 10:11:43AM +0800, Chunsheng Luo wrote:
> Tue, 19 Aug 2025 16:07:19 Miklos Szeredi wrote:
> 
> >>
> >> Only flush extending writes (up to LLONG_MAX) for files with upcoming
> >> write operations, and Fix confusing 'end' parameter usage.
> >
> > Patch looks correct, but it changes behavior on input file of
> > copy_file_range(), which is not explained here.
> 
> Thank you for your review.
> 
> For the copy_file_range input file, since it only involves read operations,
> I think it is not necessary to flush to LLONG_MAX. Therefore, for the input file, 
> flushing to the end is sufficient.
> 
> If you think my understanding is correct, I can resend a revised version of
> the patch to update the commit log and include a clear explanation regarding
> the behavior changes in 'fuse_copy_file_range' and 'fuse_file_fallocate' operations.

I don't understand the current behavior at all -- why do the callers of
fuse_writeback_range pass an @end parameter when it ignores @end in
favor of LLONG_MAX?  And why is it necessary to flush to EOF at all?
fallocate and copy_file_range both take i_rwsem, so what could they be
racing with?  Or am I missing something here?

fuse-iomap flushes and unmaps only the given file range, and afaict
that's just fine ... but there is this pesky generic/551 failure I keep
seeing, so I might actually be missing some subtlety. :)

--D

> Thanks
> Chunsheng Luo
> 

  reply	other threads:[~2025-08-20  5:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-18 13:29 [PATCH] fuse: clarify extending writes handling Chunsheng Luo
2025-08-19 14:07 ` Miklos Szeredi
2025-08-20  2:11   ` Chunsheng Luo
2025-08-20  5:20     ` Darrick J. Wong [this message]
2025-08-20  6:52       ` Miklos Szeredi
2025-08-20 16:27         ` Darrick J. Wong
2025-08-21  6:25           ` Chunsheng Luo

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=20250820052043.GJ7942@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luochunsheng@ustc.edu \
    --cc=miklos@szeredi.hu \
    /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