From: Greg KH <greg@kroah.com>
To: Anand Jain <anand.jain@oracle.com>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
linux-btrfs@vger.kernel.org,
Alexander Tsvetkov <alexander.tsvetkov@oracle.com>,
David Sterba <dsterba@suse.com>
Subject: Re: [PATCH stable-5.4.y stable-5.10.y] btrfs: fix upper limit for max_inline for page size 64K
Date: Sat, 18 Sep 2021 14:18:40 +0200 [thread overview]
Message-ID: <YUXZIHWG97Pae1HG@kroah.com> (raw)
In-Reply-To: <305e717a1ce9bda18b1867c6fb079f91d6e54c98.1631776544.git.anand.jain@oracle.com>
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
prev parent reply other threads:[~2021-09-18 12:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-16 7:34 [PATCH stable-5.4.y stable-5.10.y] btrfs: fix upper limit for max_inline for page size 64K Anand Jain
2021-09-18 12:18 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YUXZIHWG97Pae1HG@kroah.com \
--to=greg@kroah.com \
--cc=alexander.tsvetkov@oracle.com \
--cc=anand.jain@oracle.com \
--cc=dsterba@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox