Re: [PATCH 15/26] range: Add range_overlaps()

Davidlohr Bueso
2024-03-25T21:24:33Z

On Sun, 24 Mar 2024, Ira Weiny wrote:

>Code to support CXL Dynamic Capacity devices will have extent ranges
>which need to be compared for intersection not a subset as is being
>checked in range_contains().
>
>range_overlaps() is defined in btrfs with a different meaning from what
>is required in the standard range code. Dan Williams pointed this out
>in [1]. Adjust the btrfs call according to his suggestion there.
>
>Then add a generic range_overlaps().

Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>