diff mbox

btrfs-progs: dump_tree: remove superfluous _TREE

Message ID 20171124202608.11152-1-hans@knorrie.org (mailing list archive)
State New, archived
Headers show

Commit Message

Hans van Kranenburg Nov. 24, 2017, 8:26 p.m. UTC
-# btrfs inspect-internal dump-tree -t fs /dev/block/device
ERROR: unrecognized tree id: fs

Without this fix I can't dump-tree fs, but I can dump-tree fs_tree and
also fs_tree_tree, which is a bit silly.
---
 cmds-inspect-dump-tree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Qu Wenruo Nov. 25, 2017, 1:03 a.m. UTC | #1
On 2017年11月25日 04:26, Hans van Kranenburg wrote:
> -# btrfs inspect-internal dump-tree -t fs /dev/block/device
> ERROR: unrecognized tree id: fs
> 
> Without this fix I can't dump-tree fs, but I can dump-tree fs_tree and
> also fs_tree_tree, which is a bit silly.
> ---
>  cmds-inspect-dump-tree.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/cmds-inspect-dump-tree.c b/cmds-inspect-dump-tree.c
> index 4e72c08a..df44bb63 100644
> --- a/cmds-inspect-dump-tree.c
> +++ b/cmds-inspect-dump-tree.c
> @@ -143,7 +143,7 @@ static u64 treeid_from_string(const char *str, const char **end)
>  		{ "CHUNK", BTRFS_CHUNK_TREE_OBJECTID },
>  		{ "DEVICE", BTRFS_DEV_TREE_OBJECTID },
>  		{ "DEV", BTRFS_DEV_TREE_OBJECTID },
> -		{ "FS_TREE", BTRFS_FS_TREE_OBJECTID },
> +		{ "FS", BTRFS_FS_TREE_OBJECTID },

Considering no other name has the _tree suffix, this looks good to me.

Reviewed-by: Qu Wenruo <wqu@suse.com>

Thanks,
Qu
>  		{ "CSUM", BTRFS_CSUM_TREE_OBJECTID },
>  		{ "CHECKSUM", BTRFS_CSUM_TREE_OBJECTID },
>  		{ "QUOTA", BTRFS_QUOTA_TREE_OBJECTID },
>
David Sterba Nov. 27, 2017, 4:17 p.m. UTC | #2
On Sat, Nov 25, 2017 at 09:03:26AM +0800, Qu Wenruo wrote:
> On 2017年11月25日 04:26, Hans van Kranenburg wrote:
> > -# btrfs inspect-internal dump-tree -t fs /dev/block/device
> > ERROR: unrecognized tree id: fs
> > 
> > Without this fix I can't dump-tree fs, but I can dump-tree fs_tree and
> > also fs_tree_tree, which is a bit silly.
> > ---
> >  cmds-inspect-dump-tree.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/cmds-inspect-dump-tree.c b/cmds-inspect-dump-tree.c
> > index 4e72c08a..df44bb63 100644
> > --- a/cmds-inspect-dump-tree.c
> > +++ b/cmds-inspect-dump-tree.c
> > @@ -143,7 +143,7 @@ static u64 treeid_from_string(const char *str, const char **end)
> >  		{ "CHUNK", BTRFS_CHUNK_TREE_OBJECTID },
> >  		{ "DEVICE", BTRFS_DEV_TREE_OBJECTID },
> >  		{ "DEV", BTRFS_DEV_TREE_OBJECTID },
> > -		{ "FS_TREE", BTRFS_FS_TREE_OBJECTID },
> > +		{ "FS", BTRFS_FS_TREE_OBJECTID },
> 
> Considering no other name has the _tree suffix, this looks good to me.
> 
> Reviewed-by: Qu Wenruo <wqu@suse.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/cmds-inspect-dump-tree.c b/cmds-inspect-dump-tree.c
index 4e72c08a..df44bb63 100644
--- a/cmds-inspect-dump-tree.c
+++ b/cmds-inspect-dump-tree.c
@@ -143,7 +143,7 @@  static u64 treeid_from_string(const char *str, const char **end)
 		{ "CHUNK", BTRFS_CHUNK_TREE_OBJECTID },
 		{ "DEVICE", BTRFS_DEV_TREE_OBJECTID },
 		{ "DEV", BTRFS_DEV_TREE_OBJECTID },
-		{ "FS_TREE", BTRFS_FS_TREE_OBJECTID },
+		{ "FS", BTRFS_FS_TREE_OBJECTID },
 		{ "CSUM", BTRFS_CSUM_TREE_OBJECTID },
 		{ "CHECKSUM", BTRFS_CSUM_TREE_OBJECTID },
 		{ "QUOTA", BTRFS_QUOTA_TREE_OBJECTID },