Re: [PATCH stable-5.4.y stable-5.10.y] btrfs: fix upper limit for max_inline for page size 64K

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

 



On Thu, Sep 16, 2021 at 03:34:01PM +0800, Anand Jain wrote:
> Commit 6f93e834fa7c5faa0372e46828b4b2a966ac61d7 upstream.
> 
> The mount option max_inline ranges from 0 to the sectorsize (which is
> now equal to page size). But we parse the mount options too early and
> before the actual sectorsize is read from the superblock. So the upper
> limit of max_inline is unaware of the actual sectorsize and is limited
> by the temporary sectorsize 4096, even on a system where the default
> sectorsize is 64K.
> 
> Fix this by reading the superblock sectorsize before the mount option
> parse.
> 
> Reported-by: Alexander Tsvetkov <alexander.tsvetkov@xxxxxxxxxx>
> CC: stable@xxxxxxxxxxxxxxx # 5.4+
> Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx>
> Reviewed-by: David Sterba <dsterba@xxxxxxxx>
> Signed-off-by: David Sterba <dsterba@xxxxxxxx>
> Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx>
> ---
>  fs/btrfs/disk-io.c | 45 +++++++++++++++++++++++----------------------
>  1 file changed, 23 insertions(+), 22 deletions(-)

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