diff options
author | Yan Zheng <zheng.yan@oracle.com> | 2008-11-20 09:52:48 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-11-20 09:52:48 -0500 |
commit | aa62e84c84436593edb56c9b9c61fa701c69f80e (patch) | |
tree | 41d06e2caee4af7a1d8933d9481f80c95a84acf0 /volumes.c | |
parent | 49bc666d5fcedc7221eeeef0499e21a45c3ca4ad (diff) |
Btrfs image tool
This patch adds btrfs image tool. The image tool is
a debugging tool that creates/restores btrfs metadump
image.
Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Diffstat (limited to 'volumes.c')
-rw-r--r-- | volumes.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -222,7 +222,10 @@ int btrfs_scan_one_device(int fd, const char *path, goto error_brelse; } devid = le64_to_cpu(disk_super->dev_item.devid); - *total_devs = btrfs_super_num_devices(disk_super); + if (btrfs_super_flags(disk_super) & BTRFS_SUPER_FLAG_METADUMP) + *total_devs = 1; + else + *total_devs = btrfs_super_num_devices(disk_super); uuid_unparse(disk_super->fsid, uuidbuf); ret = device_list_add(path, disk_super, devid, fs_devices_ret); |