From: David Sterba <dsterba@suse.cz>
To: Josef Bacik <josef@toxicpanda.com>
Cc: dsterba@suse.cz, Nikolay Borisov <nborisov@suse.com>,
linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH 2/2] btrfs: pretty print leaked root name
Date: Mon, 24 Aug 2020 13:30:36 +0200 [thread overview]
Message-ID: <20200824113036.GI2026@twin.jikos.cz> (raw)
In-Reply-To: <cff7de4d-e4de-01cf-62b2-3de0b9e51eb2@toxicpanda.com>
On Fri, Aug 21, 2020 at 10:00:35AM -0400, Josef Bacik wrote:
> On 8/21/20 6:13 AM, David Sterba wrote:
> > On Fri, Aug 21, 2020 at 10:35:38AM +0300, Nikolay Borisov wrote:
> >>> root = list_first_entry(&fs_info->allocated_roots,
> >>> struct btrfs_root, leak_list);
> >>> - btrfs_err(fs_info, "leaked root %llu-%llu refcount %d",
> >>> - root->root_key.objectid, root->root_key.offset,
> >>> - refcount_read(&root->refs));
> >>> + btrfs_err(fs_info, "leaked root %s%lld-%llu refcount %d",
> >>
> >> nit: Won't this string result in some rather awkward looking strings,
> >> such as:
> >>
> >> "leaked root ROOT_TREE<objectid>-<offset>..." i.e shouldn't the
> >> (objectid,offset) pair be marked with parentheses?
> >
> > I don't understand why need/want to print the offset here. It is from
> > the key.offset but for a message we should print it in an understandable
> > way.
>
> The offset matters for the TREE_RELOC roots, because it's the object id
> of the fs root that the reloc root refers to. Thanks,
Ok, that makes sense to print, though printing it as offset=... looks
confusing. Could it be rephrased to refer to the fs tree and reloc tree?
next prev parent reply other threads:[~2020-08-24 11:32 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-20 20:00 [PATCH 0/2][v2] Some leaked root fixes Josef Bacik
2020-08-20 20:00 ` [PATCH 1/2] btrfs: free fs roots on failed mount Josef Bacik
2020-08-21 7:31 ` Nikolay Borisov
2020-08-21 13:59 ` Josef Bacik
2020-08-21 14:07 ` Nikolay Borisov
2020-08-20 20:00 ` [PATCH 2/2] btrfs: pretty print leaked root name Josef Bacik
2020-08-21 7:35 ` Nikolay Borisov
2020-08-21 10:13 ` David Sterba
2020-08-21 10:25 ` Nikolay Borisov
2020-08-21 14:00 ` Josef Bacik
2020-08-24 11:30 ` David Sterba [this message]
2020-08-24 12:46 ` David Sterba
-- strict thread matches above, loose matches on Subject: below --
2020-09-03 18:29 [PATCH 0/2][v3] Some leaked root fixes Josef Bacik
2020-09-03 18:29 ` [PATCH 2/2] btrfs: pretty print leaked root name Josef Bacik
2020-09-07 12:28 ` David Sterba
2020-09-09 7:37 ` David Sterba
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=20200824113036.GI2026@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=josef@toxicpanda.com \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=nborisov@suse.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