Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Max Chernoff <git@maxchernoff.ca>
To: Boris Burkov <boris@bur.io>
Cc: linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH] btrfs: fix incorrect readahead expansion length
Date: Fri, 03 Oct 2025 05:02:43 -0600	[thread overview]
Message-ID: <96454206ee3ee7f8dd873cfe3989b974e7408cd7.camel@maxchernoff.ca> (raw)
In-Reply-To: <763f1e5a6d9611638977e24aeead5c9a266da678.1759337413.git.boris@bur.io>

Hi Boris,

On Wed, 2025-10-01 at 09:50 -0700, Boris Burkov wrote:
> diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
> index dfda8f6da194..3a8681566fc5 100644
> --- a/fs/btrfs/extent_io.c
> +++ b/fs/btrfs/extent_io.c
> @@ -972,7 +972,7 @@ static void btrfs_readahead_expand(struct readahead_control *ractl,
>  {
>  	const u64 ra_pos = readahead_pos(ractl);
>  	const u64 ra_end = ra_pos + readahead_length(ractl);
> -	const u64 em_end = em->start + em->ram_bytes;
> +	const u64 em_end = em->start + em->len;
>
>  	/* No expansion for holes and inline extents. */
>  	if (em->disk_bytenr > EXTENT_MAP_LAST_BYTE)

I've tested this patch on top of 6.16.8 with the minimal disk image, and
on top of 6.16.9 on the machine where I originally encountered the
errors, and can confirm that it fixed the problem in both cases.

Thanks again for all your help,
-- Max

      parent reply	other threads:[~2025-10-03 11:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-01 16:50 [PATCH] btrfs: fix incorrect readahead expansion length Boris Burkov
2025-10-01 17:10 ` Filipe Manana
2025-10-01 21:14   ` Boris Burkov
2025-10-03 12:30     ` Filipe Manana
2025-10-03 11:02 ` Max Chernoff [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=96454206ee3ee7f8dd873cfe3989b974e7408cd7.camel@maxchernoff.ca \
    --to=git@maxchernoff.ca \
    --cc=boris@bur.io \
    --cc=kernel-team@fb.com \
    --cc=linux-btrfs@vger.kernel.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