linux-btrfs.vger.kernel.org archive mirror
 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 3/5] btrfs: store details about first setget bounds check failure
Date: Thu, 10 Feb 2022 18:27:51 +0100	[thread overview]
Message-ID: <20220210172751.GS12643@twin.jikos.cz> (raw)
In-Reply-To: <Yf0OqgnMCFNmNkbl@debian9.Home>

On Fri, Feb 04, 2022 at 11:31:54AM +0000, Filipe Manana wrote:
> On Thu, Feb 03, 2022 at 06:26:29PM +0100, David Sterba wrote:
> > +
> > +	/* Count events and record more details about the first one */
> > +	fs_info = eb->fs_info;
> > +	atomic_inc(&fs_info->setget_failures);
> > +	if (test_and_set_bit(BTRFS_FS_SETGET_COMPLAINS, &eb->fs_info->flags))
> > +		return;
> > +
> > +	fs_info->setget_eb_start = eb->start;
> > +	fs_info->setget_ptr = ptr;
> > +	fs_info->setget_off = member_offset;
> > +	fs_info->setget_size = size;
> 
> These new fields at fs_info are set here, but then never read, neither in this
> patch nor in the remaining of this patchset.
> 
> Do you plan to use them somewhere else? If not, it seems they could go away.

The original idea was to print them at some later point, eg. at umount
time or when transaction commit is attempted and the error bit is set.
But as the error message is printed for each detected out of bounds it's
probably not necessary to store it. I'll drop it unless I find a better
reason.

  reply	other threads:[~2022-02-10 17:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03 17:26 [PATCH 0/5] Speedups and check_setget_bounds reporting updates David Sterba
2022-02-03 17:26 ` [PATCH 1/5] btrfs: remove redundant check in up check_setget_bounds David Sterba
2022-02-10 17:52   ` David Sterba
2022-02-03 17:26 ` [PATCH 2/5] btrfs: factor out reporting when check_setget_bounds fails David Sterba
2022-02-03 17:26 ` [PATCH 3/5] btrfs: store details about first setget bounds check failure David Sterba
2022-02-04 11:31   ` Filipe Manana
2022-02-10 17:27     ` David Sterba [this message]
2022-02-03 17:26 ` [PATCH 4/5] btrfs: fail transaction when a setget bounds check failure is detected David Sterba
2022-02-04 11:29   ` Filipe Manana
2022-02-04 13:38     ` Filipe Manana
2022-02-10 17:50     ` David Sterba
2022-02-11 11:23       ` Filipe Manana
2022-02-03 17:26 ` [PATCH 5/5] btrfs: move check_setget_bounds out of ASSERT David Sterba
2022-02-04  8:35 ` [PATCH 0/5] Speedups and check_setget_bounds reporting updates Johannes Thumshirn

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=20220210172751.GS12643@twin.jikos.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;
as well as URLs for NNTP newsgroup(s).