Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: fdmanana@kernel.org
Cc: stable@vger.kernel.org, linux-btrfs@vger.kernel.org,
	Filipe Manana <fdmanana@suse.com>,
	David Sterba <dsterba@suse.com>
Subject: Re: [PATCH for stable 6.1.x] btrfs: get the next extent map during fiemap/lseek more efficiently
Date: Sat, 22 Apr 2023 18:04:10 +0200	[thread overview]
Message-ID: <2023042202-sake-sturdily-8baa@gregkh> (raw)
In-Reply-To: <904648448355ca9fe6938f7bce11e412c8dc8cd0.1681855724.git.fdmanana@suse.com>

On Wed, Apr 19, 2023 at 11:02:19AM +0100, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
> 
> commit d47704bd1c78c85831561bcf701b90dd66f811b2 upstream.
> 
> At find_delalloc_subrange(), when we need to get the next extent map, we
> do a full search on the extent map tree (a red black tree). This is fine
> but it's a lot more efficient to simply use rb_next(), which typically
> requires iterating over less nodes of the tree and never needs to compare
> the ranges of nodes with the one we are looking for.
> 
> So add a public helper to extent_map.{h,c} to get the extent map that
> immediately follows another extent map, using rb_next(), and use that
> helper at find_delalloc_subrange().
> 
> Signed-off-by: Filipe Manana <fdmanana@suse.com>
> Signed-off-by: David Sterba <dsterba@suse.com>
> ---
> 
> Please add this patch to the next 6.1 stable release.
> It happens to fix a bug recently reported at:
> 
>      https://bugzilla.redhat.com/show_bug.cgi?id=2187312

Now queued up, thanks.

greg k-h

      reply	other threads:[~2023-04-22 16:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-19 10:02 [PATCH for stable 6.1.x] btrfs: get the next extent map during fiemap/lseek more efficiently fdmanana
2023-04-22 16:04 ` Greg KH [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=2023042202-sake-sturdily-8baa@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=dsterba@suse.com \
    --cc=fdmanana@kernel.org \
    --cc=fdmanana@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=stable@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