From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/2] xfs_db: short circuit type_f if type is unchanged
Date: Fri, 21 Aug 2020 07:46:03 -0700 [thread overview]
Message-ID: <20200821144603.GL6096@magnolia> (raw)
In-Reply-To: <784ed247-0467-093b-1113-ff80a1289cbd@redhat.com>
On Thu, Aug 20, 2020 at 07:05:37PM -0500, Eric Sandeen wrote:
> There's no reason to go through the type change code if the
> type has not been changed.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
>
> diff --git a/db/type.c b/db/type.c
> index 3cb1e868..572ac6d6 100644
> --- a/db/type.c
> +++ b/db/type.c
> @@ -216,6 +216,8 @@ type_f(
> tt = findtyp(argv[1]);
> if (tt == NULL) {
> dbprintf(_("no such type %s\n"), argv[1]);
> + } else if (iocur_top->typ == tt) {
> + return 0;
Doesn't this mean that verifier errors won't be printed if the user asks
to set the type to the current type? e.g.
xfs_db> agf 0
xfs_db> addr bnoroot
xfs_db> fuzz -d level random
Allowing fuzz of corrupted data with good CRC
level = 59679
xfs_db> type bnobt
Metadata corruption detected at 0x5586779a7b18, xfs_bnobt block 0x8/0x1000
xfs_db> type bnobt
Metadata corruption detected at 0x5586779a7b18, xfs_bnobt block 0x8/0x1000
<shrug> OTOH, db doesn't consistently have that behavior either --
inodes only behave like that for crc errors, so maybe this is fine.
Eh whatever, it's the debugging tool, you should be paying attention
anyways.
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> } else {
> if (iocur_top->typ == NULL)
> dbprintf(_("no current object\n"));
>
next prev parent reply other threads:[~2020-08-21 14:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-20 23:44 [PATCH 0/2] xfs_db: more type_f cleanups Eric Sandeen
2020-08-21 0:05 ` [PATCH 1/2] xfs_db: short circuit type_f if type is unchanged Eric Sandeen
2020-08-21 14:46 ` Darrick J. Wong [this message]
2020-08-21 15:46 ` Eric Sandeen
2020-08-21 0:09 ` [PATCH 2/2] xfs_db: consolidate set_iocur_type behavior Eric Sandeen
2020-08-21 14:52 ` Darrick J. Wong
2020-08-21 15:48 ` Eric Sandeen
2020-08-24 16:51 ` [PATCH 2/2 V2] xfs_db: consolidate set_iocur_type() behavior Eric Sandeen
2020-08-24 17:03 ` Darrick J. Wong
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=20200821144603.GL6096@magnolia \
--to=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@redhat.com \
/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