summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
authorChris Mason2008-04-18 16:29:49 +0200
committerChris Mason2008-09-25 17:04:02 +0200
commit7ae9c09d8f001eb19ee2ba219dc5c3d4f6d60614 (patch)
tree9ad3de27fec0d73f145e8e9f9dd7a89851ae85bc /fs/btrfs/volumes.c
parentBtrfs: Check device uuids along with devids (diff)
downloadkernel-qcow2-linux-7ae9c09d8f001eb19ee2ba219dc5c3d4f6d60614.tar.gz
kernel-qcow2-linux-7ae9c09d8f001eb19ee2ba219dc5c3d4f6d60614.tar.xz
kernel-qcow2-linux-7ae9c09d8f001eb19ee2ba219dc5c3d4f6d60614.zip
Btrfs: Add support for labels in the super block
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r--fs/btrfs/volumes.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index cdf0019cca2e..93aa36e2436e 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -57,9 +57,7 @@ int btrfs_cleanup_fs_uuids(void)
devices_cur = fs_devices->devices.next;
dev = list_entry(devices_cur, struct btrfs_device,
dev_list);
- printk("uuid cleanup finds %s\n", dev->name);
if (dev->bdev) {
- printk("closing\n");
close_bdev_excl(dev->bdev);
}
list_del(&dev->dev_list);
@@ -149,7 +147,6 @@ static int device_list_add(const char *path,
}
if (fs_devices->lowest_devid > devid) {
fs_devices->lowest_devid = devid;
- printk("lowest devid now %Lu\n", devid);
}
*fs_devices_ret = fs_devices;
return 0;
@@ -166,7 +163,6 @@ int btrfs_close_devices(struct btrfs_fs_devices *fs_devices)
device = list_entry(cur, struct btrfs_device, dev_list);
if (device->bdev) {
close_bdev_excl(device->bdev);
- printk("close devices closes %s\n", device->name);
}
device->bdev = NULL;
}
@@ -220,11 +216,9 @@ int btrfs_scan_one_device(const char *path, int flags, void *holder,
mutex_lock(&uuid_mutex);
- printk("scan one opens %s\n", path);
bdev = open_bdev_excl(path, flags, holder);
if (IS_ERR(bdev)) {
- printk("open failed\n");
ret = PTR_ERR(bdev);
goto error;
}
@@ -240,13 +234,20 @@ int btrfs_scan_one_device(const char *path, int flags, void *holder,
disk_super = (struct btrfs_super_block *)bh->b_data;
if (strncmp((char *)(&disk_super->magic), BTRFS_MAGIC,
sizeof(disk_super->magic))) {
- printk("no btrfs found on %s\n", path);
ret = -EINVAL;
goto error_brelse;
}
devid = le64_to_cpu(disk_super->dev_item.devid);
transid = btrfs_super_generation(disk_super);
- printk("found device %Lu transid %Lu on %s\n", devid, transid, path);
+ if (disk_super->label[0])
+ printk("device label %s ", disk_super->label);
+ else {
+ /* FIXME, make a readl uuid parser */
+ printk("device fsid %llx-%llx ",
+ *(unsigned long long *)disk_super->fsid,
+ *(unsigned long long *)(disk_super->fsid + 8));
+ }
+ printk("devid %Lu transid %Lu %s\n", devid, transid, path);
ret = device_list_add(path, disk_super, devid, fs_devices_ret);
error_brelse: