From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: sandeen@sandeen.net, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/1] xfs_db: identify the minlogsize transaction reservation
Date: Wed, 29 Jun 2022 09:22:43 +1000 [thread overview]
Message-ID: <20220628232243.GV227878@dread.disaster.area> (raw)
In-Reply-To: <165644946000.1091822.9533075738203869891.stgit@magnolia>
On Tue, Jun 28, 2022 at 01:51:00PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> Right now, we don't make it easy to spot the transaction reservation
> used to compute the minimum log size in userspace:
>
> # xfs_db -c logres /dev/sda
> type 0 logres 168184 logcount 5 flags 0x4
> ...
> type 25 logres 760 logcount 0 flags 0x0
> type -1 logres 547200 logcount 8 flags 0x4
>
> Type "-1" doesn't communicate the purpose at all, it just looks like a
> math error. Help out the user a bit by printing more information:
>
> minlogsize logres 547200 logcount 8
>
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> ---
> db/logformat.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
>
> diff --git a/db/logformat.c b/db/logformat.c
> index 38b0af11..5edaa549 100644
> --- a/db/logformat.c
> +++ b/db/logformat.c
> @@ -160,8 +160,10 @@ logres_f(
> end_res = (struct xfs_trans_res *)(M_RES(mp) + 1);
> for (i = 0; res < end_res; i++, res++)
> print_logres(i, res);
> +
> libxfs_log_get_max_trans_res(mp, &resv);
> - print_logres(-1, &resv);
> + dbprintf(_("minlogsize logres %u logcount %d\n"),
> + resv.tr_logres, resv.tr_logcount);
Looks good.
Reviewed-by: Dave Chinner <dchinner@redhat.com>
--
Dave Chinner
david@fromorbit.com
prev parent reply other threads:[~2022-06-28 23:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-28 20:50 [PATCHSET 0/1] xfs_db: improve output of the logres command Darrick J. Wong
2022-06-28 20:51 ` [PATCH 1/1] xfs_db: identify the minlogsize transaction reservation Darrick J. Wong
2022-06-28 23:22 ` Dave Chinner [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=20220628232243.GV227878@dread.disaster.area \
--to=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@sandeen.net \
/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