aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
authorXiao Guangrong <xiaoguangrong@cn.fujitsu.com>2010-01-06 06:48:18 -0500
committerChris Mason <chris.mason@oracle.com>2010-03-15 11:00:14 -0400
commita343832f1a55c74791a8a37053fc02ad80640710 (patch)
tree79e920025747703c06ba7a97e433a3ad307d80fe /fs/btrfs/volumes.c
parent91748467a5c5884e44ad5cf58630c0c28474f1f6 (diff)
btrfs: using btrfs_stack_device_id() get devid
We can use btrfs_stack_device_id() to get dev_item->devid Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r--fs/btrfs/volumes.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index eb89e1317aca..4053fc44d2cf 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -599,7 +599,7 @@ static int __btrfs_open_devices(struct btrfs_fs_devices *fs_devices,
599 goto error_close; 599 goto error_close;
600 600
601 disk_super = (struct btrfs_super_block *)bh->b_data; 601 disk_super = (struct btrfs_super_block *)bh->b_data;
602 devid = le64_to_cpu(disk_super->dev_item.devid); 602 devid = btrfs_stack_device_id(&disk_super->dev_item);
603 if (devid != device->devid) 603 if (devid != device->devid)
604 goto error_brelse; 604 goto error_brelse;
605 605
@@ -701,7 +701,7 @@ int btrfs_scan_one_device(const char *path, fmode_t flags, void *holder,
701 goto error_close; 701 goto error_close;
702 } 702 }
703 disk_super = (struct btrfs_super_block *)bh->b_data; 703 disk_super = (struct btrfs_super_block *)bh->b_data;
704 devid = le64_to_cpu(disk_super->dev_item.devid); 704 devid = btrfs_stack_device_id(&disk_super->dev_item);
705 transid = btrfs_super_generation(disk_super); 705 transid = btrfs_super_generation(disk_super);
706 if (disk_super->label[0]) 706 if (disk_super->label[0])
707 printk(KERN_INFO "device label %s ", disk_super->label); 707 printk(KERN_INFO "device label %s ", disk_super->label);
@@ -1194,7 +1194,7 @@ int btrfs_rm_device(struct btrfs_root *root, char *device_path)
1194 goto error_close; 1194 goto error_close;
1195 } 1195 }
1196 disk_super = (struct btrfs_super_block *)bh->b_data; 1196 disk_super = (struct btrfs_super_block *)bh->b_data;
1197 devid = le64_to_cpu(disk_super->dev_item.devid); 1197 devid = btrfs_stack_device_id(&disk_super->dev_item);
1198 dev_uuid = disk_super->dev_item.uuid; 1198 dev_uuid = disk_super->dev_item.uuid;
1199 device = btrfs_find_device(root, devid, dev_uuid, 1199 device = btrfs_find_device(root, devid, dev_uuid,
1200 disk_super->fsid); 1200 disk_super->fsid);