diff --git a/cmds/device.c b/cmds/device.c index 04d25ade..e7bedd85 100644 --- a/cmds/device.c +++ b/cmds/device.c @@ -356,7 +356,7 @@ static int cmd_device_scan(const struct cmd_struct *cmd, int argc, char **argv) } } else { printf("Scanning for Btrfs filesystems\n"); - ret = btrfs_scan_devices(); + ret = btrfs_scan_devices(0); error_on(ret, "error %d while scanning", ret); ret = btrfs_register_all_devices(); error_on(ret, diff --git a/cmds/filesystem.c b/cmds/filesystem.c index 9a88e24e..e3a0b95b 100644 --- a/cmds/filesystem.c +++ b/cmds/filesystem.c @@ -747,7 +747,7 @@ devs_only: else ret = 1; } else { - ret = btrfs_scan_devices(); + ret = btrfs_scan_devices(0); } if (ret) { diff --git a/common/device-scan.c b/common/device-scan.c index 61f8bae7..c0e9167a 100644 --- a/common/device-scan.c +++ b/common/device-scan.c @@ -360,7 +360,7 @@ void free_seen_fsid(struct seen_fsid *seen_fsid_hash[]) } } -int btrfs_scan_devices(void) +int btrfs_scan_devices(int verbose) { int fd = -1; int ret; @@ -404,6 +404,7 @@ int btrfs_scan_devices(void) close (fd); continue; } + pr_verbose(verbose, "registered: %s\n", path); close(fd); } diff --git a/common/device-scan.h b/common/device-scan.h index eda2bae5..8017a275 100644 --- a/common/device-scan.h +++ b/common/device-scan.h @@ -29,7 +29,7 @@ struct seen_fsid { int fd; }; -int btrfs_scan_devices(void); +int btrfs_scan_devices(int verbose); int btrfs_register_one_device(const char *fname); int btrfs_register_all_devices(void); int btrfs_add_to_fsid(struct btrfs_trans_handle *trans, diff --git a/common/utils.c b/common/utils.c index 0301efb0..9742c2e1 100644 --- a/common/utils.c +++ b/common/utils.c @@ -277,7 +277,7 @@ int check_mounted_where(int fd, const char *file, char *where, int size, /* scan other devices */ if (is_btrfs && total_devs > 1) { - ret = btrfs_scan_devices(); + ret = btrfs_scan_devices(0); if (ret) return ret; } diff --git a/disk-io.c b/disk-io.c index 529e8706..88e99e40 100644 --- a/disk-io.c +++ b/disk-io.c @@ -1124,7 +1124,7 @@ int btrfs_scan_fs_devices(int fd, const char *path, } if (!skip_devices && total_devs != 1) { - ret = btrfs_scan_devices(); + ret = btrfs_scan_devices(0); if (ret) return ret; }