From edd57bf494a2e1642edb7f9233a397058e1f62d6 Mon Sep 17 00:00:00 2001 From: Anand Jain Date: Thu, 30 Sep 2021 20:18:55 +0800 Subject: [PATCH] btrfs-progs: fix comments in cmd_filesystem_show I had to go back to find what BTRFS_ARG_REG is, add a comment for that. And, search_umounted_fs_uuids() is also to find the seed device, so bring the related comment above it. Signed-off-by: Anand Jain Signed-off-by: David Sterba --- cmds/filesystem.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cmds/filesystem.c b/cmds/filesystem.c index c338571a..6a9e46d2 100644 --- a/cmds/filesystem.c +++ b/cmds/filesystem.c @@ -754,6 +754,7 @@ static int cmd_filesystem_show(const struct cmd_struct *cmd, devs_only: if (type == BTRFS_ARG_REG) { /* + * Given input (search) is regular file. * We don't close the fs_info because it will free the device, * this is not a long-running process so it's fine */ @@ -770,16 +771,17 @@ devs_only: return 1; } + /* + * The seed/sprout mappings are not detected yet, do mapping build for + * all umounted filesystems. But first, copy all unmounted UUIDs only + * to all_uuids. + */ ret = search_umounted_fs_uuids(&all_uuids, search, &found); if (ret < 0) { error("searching target device returned error %d", ret); return 1; } - /* - * The seed/sprout mapping are not detected yet, - * do mapping build for all umounted fs - */ ret = map_seed_devices(&all_uuids); if (ret) { error("mapping seed devices returned error %d", ret);