From: Qu Wenruo <wqu@suse.com>
To: "Misono, Tomohiro" <misono.tomohiro@jp.fujitsu.com>,
linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] btrfs-progs: ins: print uuid only if it exists
Date: Tue, 31 Oct 2017 13:50:51 +0800 [thread overview]
Message-ID: <d63e1304-654e-ffe5-ef82-d6b976bc779f@suse.com> (raw)
In-Reply-To: <7979b9a1-37d6-9eec-79a7-1730b8338b7f@jp.fujitsu.com>
[-- Attachment #1.1: Type: text/plain, Size: 1100 bytes --]
On 2017年10月31日 13:39, Misono, Tomohiro wrote:
> UUID of ROOT_ITEM is empty if it is not subvolume (and not created by
> kernel). So, just skip it if it is empty just like parent/received UUID.
>
> Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Thanks,
Qu
> ---
> print-tree.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/print-tree.c b/print-tree.c
> index 8abd760..9d1b862 100644
> --- a/print-tree.c
> +++ b/print-tree.c
> @@ -581,8 +581,10 @@ static void print_root_item(struct extent_buffer *leaf, int slot)
> flags_str);
>
> if (root_item.generation == root_item.generation_v2) {
> - uuid_unparse(root_item.uuid, uuid_str);
> - printf("\t\tuuid %s\n", uuid_str);
> + if (!empty_uuid(root_item.uuid)) {
> + uuid_unparse(root_item.uuid, uuid_str);
> + printf("\t\tuuid %s\n", uuid_str);
> + }
> if (!empty_uuid(root_item.parent_uuid)) {
> uuid_unparse(root_item.parent_uuid, uuid_str);
> printf("\t\tparent_uuid %s\n", uuid_str);
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 504 bytes --]
prev parent reply other threads:[~2017-10-31 5:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-31 5:39 [PATCH] btrfs-progs: ins: print uuid only if it exists Misono, Tomohiro
2017-10-31 5:50 ` Qu Wenruo [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=d63e1304-654e-ffe5-ef82-d6b976bc779f@suse.com \
--to=wqu@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=misono.tomohiro@jp.fujitsu.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;
as well as URLs for NNTP newsgroup(s).