Re: [PATCH for stable 6.1.x] btrfs: get the next extent map during fiemap/lseek more efficiently

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 19, 2023 at 11:02:19AM +0100, fdmanana@xxxxxxxxxx wrote:
> From: Filipe Manana <fdmanana@xxxxxxxx>
> 
> 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@xxxxxxxx>
> Signed-off-by: David Sterba <dsterba@xxxxxxxx>
> ---
> 
> 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



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux