All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
To: <linux-btrfs@vger.kernel.org>
Subject: [PATCH] btrfs-progs: subvol list: don't print deleted subvol as TOPLEVEL
Date: Fri, 13 Oct 2017 17:17:22 +0800	[thread overview]
Message-ID: <20171013091722.2988-1-lufq.fnst@cn.fujitsu.com> (raw)

We should use entry->root_id instead of top_id to determine whether it is
the toplevel subvolume.

Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
---
 btrfs-list.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/btrfs-list.c b/btrfs-list.c
index 6f2d8774..4ea8edfd 100644
--- a/btrfs-list.c
+++ b/btrfs-list.c
@@ -1279,7 +1279,7 @@ static void filter_and_sort_subvol(struct root_lookup *all_subvols,
 
 		ret = resolve_root(all_subvols, entry, top_id);
 		if (ret == -ENOENT) {
-			if (top_id != BTRFS_FS_TREE_OBJECTID) {
+			if (entry->root_id != BTRFS_FS_TREE_OBJECTID) {
 				entry->full_path = strdup("DELETED");
 				entry->deleted = 1;
 			} else {
-- 
2.14.2




             reply	other threads:[~2017-10-13  9:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-13  9:17 Lu Fengqi [this message]
2017-10-13 18:13 ` [PATCH] btrfs-progs: subvol list: don't print deleted subvol as TOPLEVEL 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=20171013091722.2988-1-lufq.fnst@cn.fujitsu.com \
    --to=lufq.fnst@cn.fujitsu.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.