Re: [PATCH v2] ext4: correct best extent lstart adjustment logic

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

 



Hey Baokun, thanks for the v2.

On Thu, Feb 01, 2024 at 10:18:45PM +0800, Baokun Li wrote:
> When yangerkun review commit 93cdf49f6eca ("ext4: Fix best extent lstart
> adjustment logic in ext4_mb_new_inode_pa()"), it was found that the best
> extent did not completely cover the original request after adjusting the
> best extent lstart in ext4_mb_new_inode_pa() as follows:
> 
>   original request: 2/10(8)
>   normalized request: 0/64(64)
>   best extent: 0/9(9)
> 
> When we check if best ex can be kept at start of goal, ac_o_ex.fe_logical
> is 2 less than the adjusted best extent logical end 9, so we think the
> adjustment is done. But obviously 0/9(9) doesn't cover 2/10(8), so we
> should determine here if the original request logical end is less than or
> equal to the adjusted best extent logical end.
> 
> In addition, add a comment stating when adjusted best_ex will not cover
> the original request, and remove the duplicate assertion because adjusting
> lstart makes no change to b_ex.fe_len.
> 
> Link: https://lore.kernel.org/r/3630fa7f-b432-7afd-5f79-781bc3b2c5ea@xxxxxxxxxx
> Fixes: 93cdf49f6eca ("ext4: Fix best extent lstart adjustment logic in ext4_mb_new_inode_pa()")
> Cc: stable@xxxxxxxxxx

So I'm not sure if this is actually fixing a BUG and if we need to
backport this to stable but I guess Ted can take a call on that. 

Other than that, the patch looks good. Feel free to add:

Reviewed-by: Ojaswin Mujoo <ojaswin@xxxxxxxxxxxxx>


Regards,
ojaswin

> Signed-off-by: yangerkun <yangerkun@xxxxxxxxxx>
> Signed-off-by: Baokun Li <libaokun1@xxxxxxxxxx>




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux