On 28.08.19 г. 12:56 ч., Anand Jain wrote:
> So when searching for BTRFS_DEV_ITEMS_OBJECTID it hits. Albeit it is
> defined same as BTRFS_ROOT_TREE_OBJECTID.
>
> Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx>
> ---
> print-tree.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/print-tree.c b/print-tree.c
> index b31e515f8989..5832f3089e3d 100644
> --- a/print-tree.c
> +++ b/print-tree.c
> @@ -704,6 +704,7 @@ void print_objectid(FILE *stream, u64 objectid, u8 type)
> }
>
> switch (objectid) {
> + /* BTRFS_DEV_ITEMS_OBJECTID */
That comment looks really cryptic to someone just looking at the code.
Adding case BTRFS_DEV_ITEMS_OBJECTID: is better.
> case BTRFS_ROOT_TREE_OBJECTID:
> if (type == BTRFS_DEV_ITEM_KEY)
> fprintf(stream, "DEV_ITEMS");
>