public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Filipe Manana <fdmanana@kernel.org>
Cc: David Sterba <dsterba@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: make more ASSERTs verbose, part 3
Date: Wed, 8 Apr 2026 00:40:19 +0200	[thread overview]
Message-ID: <20260407224019.GO5735@suse.cz> (raw)
In-Reply-To: <CAL3q7H7CVWM_WSafttqhn8x-q3iUFxOGaipZExuchZH73SP9Fg@mail.gmail.com>

On Wed, Apr 01, 2026 at 03:24:39PM +0100, Filipe Manana wrote:
> > @@ -2335,7 +2338,8 @@ static int btrfs_insert_replace_extent(struct btrfs_trans_handle *trans,
> >                             btrfs_item_ptr_offset(leaf, slot),
> >                             sizeof(struct btrfs_file_extent_item));
> >         extent = btrfs_item_ptr(leaf, slot, struct btrfs_file_extent_item);
> > -       ASSERT(btrfs_file_extent_type(leaf, extent) != BTRFS_FILE_EXTENT_INLINE);
> > +       ASSERT(btrfs_file_extent_type(leaf, extent) != BTRFS_FILE_EXTENT_INLINE,
> > +              "file_extent_type=%u", btrfs_file_extent_type(leaf, extent));
> 
> There's no point printing the file extent type here, if the assertion
> fails it's because it's an inline extent. This would only be useful if
> we were asserting it's inline, not that it's not inline.

Right, I was skipping the pattern where it was clear why the assertion
failed but missed that one.

      reply	other threads:[~2026-04-07 22:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-31 22:36 [PATCH] btrfs: make more ASSERTs verbose, part 3 David Sterba
2026-04-01 14:24 ` Filipe Manana
2026-04-07 22:40   ` David Sterba [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=20260407224019.GO5735@suse.cz \
    --to=dsterba@suse.cz \
    --cc=dsterba@suse.com \
    --cc=fdmanana@kernel.org \
    --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