From: Christoph Hellwig <hch@infradead.org>
To: Brian Foster <bfoster@redhat.com>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH v2 2/2] mm/fadvise: use LLONG_MAX instead of -1 for eof
Date: Tue, 29 Nov 2022 23:46:06 -0800 [thread overview]
Message-ID: <Y4cKPjmqaiiv4NzK@infradead.org> (raw)
In-Reply-To: <20221128155632.3950447-3-bfoster@redhat.com>
On Mon, Nov 28, 2022 at 10:56:32AM -0500, Brian Foster wrote:
> generic_fadvise() sets endbyte = -1 to specify end of file (i.e. if
> length == 0 is passed from userspace). Most other callers to
> filemap_fdatawrite_range() use LLONG_MAX for this purpose,
> particularly if they also call fdatawait_range() (which requires end
> >= start). For example, sync_file_range(), vfs_fsync() (where the
> range is passed down through per-fs ->fsync() callbacks),
> filemap_flush(), etc. generic_fadvise() does not currently wait on
> writeback, but fix the call up to be consistent with other callers.
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
prev parent reply other threads:[~2022-11-30 7:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-28 15:56 [PATCH v2 0/2] filemap: skip write and wait if end offset precedes start Brian Foster
2022-11-28 15:56 ` [PATCH v2 1/2] " Brian Foster
2022-11-30 7:44 ` Christoph Hellwig
2022-11-28 15:56 ` [PATCH v2 2/2] mm/fadvise: use LLONG_MAX instead of -1 for eof Brian Foster
2022-11-30 7:46 ` Christoph Hellwig [this message]
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=Y4cKPjmqaiiv4NzK@infradead.org \
--to=hch@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=bfoster@redhat.com \
--cc=linux-mm@kvack.org \
/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