public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Joanne Koong <joannelkoong@gmail.com>
Cc: miklos@szeredi.hu, linux-fsdevel@vger.kernel.org,
	jefflexu@linux.alibaba.com
Subject: Re: [PATCH v1 0/3] fuse: clean up offset and page count calculations
Date: Fri, 16 Jan 2026 21:03:10 -0800	[thread overview]
Message-ID: <20260117050310.GE15532@frogsfrogsfrogs> (raw)
In-Reply-To: <20260116235606.2205801-1-joannelkoong@gmail.com>

On Fri, Jan 16, 2026 at 03:56:03PM -0800, Joanne Koong wrote:
> This patchset aims to improve code clarity by using standard kernel helper
> macros for common calculations:
>  * DIV_ROUND_UP() for page count calculations
>  * offset_in_folio() for large folio offset calculations
>  * offset_in_page() for page offset calculations
> 
> These helpers improve readability and consistency with patterns used
> elsewhere in the kernel. No functional changes intended.
> 
> This patchset is on top of Jingbo's patch in [1].

As a straight conversion this looks fine to me so
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

OTOH I just learned that fuse has a backchannel for fuse servers to
inject pagecache data for a regular file.  That might be kinda nice for
an HSM or something?  Though that would be covered by FUSE_READ.

Hrmm, I wonder how well that interacts with iomap... we don't mark the
folios dirty or update timestamps, so I'm guessing the contents could
disappear at any time if the page cache gets reclaimed?

Weiiiird.....

--D


> Thanks,
> Joanne
> 
> [1] https://lore.kernel.org/linux-fsdevel/20260115023607.77349-1-jefflexu@linux.alibaba.com/
> 
> Joanne Koong (3):
>   fuse: use DIV_ROUND_UP() for page count calculations
>   fuse: use offset_in_folio() for large folio offset calculations
>   fuse: use offset_in_page() for page offset calculations
> 
>  fs/fuse/dev.c     | 14 +++++++-------
>  fs/fuse/file.c    |  2 +-
>  fs/fuse/readdir.c |  8 ++++----
>  3 files changed, 12 insertions(+), 12 deletions(-)
> 
> -- 
> 2.47.3
> 
> 

  parent reply	other threads:[~2026-01-17  5:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-16 23:56 [PATCH v1 0/3] fuse: clean up offset and page count calculations Joanne Koong
2026-01-16 23:56 ` [PATCH v1 1/3] fuse: use DIV_ROUND_UP() for " Joanne Koong
2026-01-19  2:12   ` Jingbo Xu
2026-01-20 19:10     ` Joanne Koong
2026-01-20 20:06       ` Joanne Koong
2026-01-21  3:21         ` Jingbo Xu
2026-01-21 21:59           ` Joanne Koong
2026-01-22  1:49             ` Jingbo Xu
2026-01-16 23:56 ` [PATCH v1 2/3] fuse: use offset_in_folio() for large folio offset calculations Joanne Koong
2026-01-19  4:41   ` Chunsheng Luo
2026-01-20 18:59     ` Joanne Koong
2026-01-19  6:24   ` Chunsheng Luo
2026-01-16 23:56 ` [PATCH v1 3/3] fuse: use offset_in_page() for page " Joanne Koong
2026-01-17  5:03 ` Darrick J. Wong [this message]
2026-01-20 19:05   ` [PATCH v1 0/3] fuse: clean up offset and page count calculations Joanne Koong
2026-01-17  7:51 ` Horst Birthelmer
2026-01-20 20:06   ` Joanne Koong

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=20260117050310.GE15532@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=jefflexu@linux.alibaba.com \
    --cc=joannelkoong@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --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