On Mon, Feb 10, 2025 at 11:04:21AM +0800, Alan Huang wrote:
> Since we don't merge compressed extents, uncompressed_size should be
> equal to compressed_size, use uncompressed_size to clarify the intention.

compressed_size actually describes the intention better here, it refers
to size ondisk, and we're checking if the extents are contiguous on disk

> 
> Signed-off-by: Alan Huang <[email protected]>
> ---
>  fs/bcachefs/extents.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/bcachefs/extents.c b/fs/bcachefs/extents.c
> index 05d5f71a7ca9..eeea23d09b9a 100644
> --- a/fs/bcachefs/extents.c
> +++ b/fs/bcachefs/extents.c
> @@ -326,7 +326,7 @@ bool bch2_extent_merge(struct bch_fs *c, struct bkey_s l, 
> struct bkey_s_c r)
>                           !bch2_checksum_mergeable(lp.crc.csum_type))
>                               return false;
>  
> -                     if (lp.crc.offset + lp.crc.live_size != 
> lp.crc.compressed_size ||
> +                     if (lp.crc.offset + lp.crc.live_size != 
> lp.crc.uncompressed_size ||
>                           rp.crc.offset)
>                               return false;
>  
> -- 
> 2.47.0
> 

Reply via email to