lkml.org 
[lkml]   [2021]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH stable-5.4.y stable-5.10.y] btrfs: fix upper limit for max_inline for page size 64K
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@oracle.com>
> CC: stable@vger.kernel.org # 5.4+
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> Reviewed-by: David Sterba <dsterba@suse.com>
> Signed-off-by: David Sterba <dsterba@suse.com>
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> ---
> fs/btrfs/disk-io.c | 45 +++++++++++++++++++++++----------------------
> 1 file changed, 23 insertions(+), 22 deletions(-)

Now queued up, thanks.

greg k-h

\
 
 \ /
  Last update: 2021-09-18 14:19    [W:0.041 / U:3.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site