linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neal Gompa <neal@gompa.dev>
To: Josef Bacik <josef@toxicpanda.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/8] btrfs-progs: check: fix max inline extent size
Date: Wed, 11 Oct 2023 19:14:54 -0400	[thread overview]
Message-ID: <CAEg-Je-Zn29Up0bEKu8OBAoU3DAD_8r_mtDCd=OHHQRv2CMLLA@mail.gmail.com> (raw)
In-Reply-To: <999dc4783e67f45b00173f1ea869136c52ea598d.1696969632.git.josef@toxicpanda.com>

On Tue, Oct 10, 2023 at 4:28 PM Josef Bacik <josef@toxicpanda.com> wrote:
>
> Fscrypt will use our entire inline extent range for symlinks, which
> uncovered a bug in btrfs check where we set the maximum inline extent
> size to
>
> min(sectorsize - 1, BTRFS_MAX_INLINE_DATA_SIZE)
>
> which isn't correct, we have always allowed sectorsize sized inline
> extents, so fix check to use the correct maximum inline extent size.
>
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> ---
>  check/main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/check/main.c b/check/main.c
> index d387eb25..0979a8c6 100644
> --- a/check/main.c
> +++ b/check/main.c
> @@ -1640,7 +1640,7 @@ static int process_file_extent(struct btrfs_root *root,
>         u64 disk_bytenr = 0;
>         u64 extent_offset = 0;
>         u64 mask = gfs_info->sectorsize - 1;
> -       u32 max_inline_size = min_t(u32, mask,
> +       u32 max_inline_size = min_t(u32, gfs_info->sectorsize,
>                                 BTRFS_MAX_INLINE_DATA_SIZE(gfs_info));
>         u8 compression;
>         int extent_type;
> --
> 2.41.0
>

LGTM.

Reviewed-by: Neal Gompa <neal@gompa.dev>


-- 
真実はいつも一つ!/ Always, there's only one truth!

  reply	other threads:[~2023-10-11 23:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-10 20:28 [PATCH 0/8] btrfs-progs: add fscrypt support Josef Bacik
2023-10-10 20:28 ` [PATCH 1/8] btrfs-progs: check: fix max inline extent size Josef Bacik
2023-10-11 23:14   ` Neal Gompa [this message]
2023-10-10 20:28 ` [PATCH 2/8] btrfs-progs: add new FEATURE_INCOMPAT_ENCRYPT flag Josef Bacik
2023-10-10 20:28 ` [PATCH 3/8] btrfs-progs: start tracking extent encryption context info Josef Bacik
2023-10-10 20:28 ` [PATCH 4/8] btrfs-progs: add inode encryption contexts Josef Bacik
2023-10-10 20:28 ` [PATCH 5/8] btrfs-progs: interpret encrypted file extents Josef Bacik
2023-10-10 20:28 ` [PATCH 6/8] btrfs-progs: handle fscrypt context items Josef Bacik
2023-10-10 20:28 ` [PATCH 7/8] btrfs-progs: escape unprintable characters in names Josef Bacik
2023-10-10 20:28 ` [PATCH 8/8] btrfs-progs: check: update inline extent length checking Josef Bacik
  -- strict thread matches above, loose matches on Subject: below --
2025-10-15 12:11 [PATCH 0/8] btrfs-progs: fscrypt updates Daniel Vacek
2025-10-15 12:11 ` [PATCH 1/8] btrfs-progs: check: fix max inline extent size Daniel Vacek

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='CAEg-Je-Zn29Up0bEKu8OBAoU3DAD_8r_mtDCd=OHHQRv2CMLLA@mail.gmail.com' \
    --to=neal@gompa.dev \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@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;
as well as URLs for NNTP newsgroup(s).