summaryrefslogtreecommitdiff
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-05-13 16:03:06 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:03 -0400
commita0af469b58944f6e8c5c8ecbebb42997baf0cb9e (patch)
tree1fa478aa49c24d60417a2e1239050c4c1435a0dc /fs/btrfs/disk-io.c
parentdfe25020689bb2d318782d2c9c7141203583fc70 (diff)
downloadlwn-a0af469b58944f6e8c5c8ecbebb42997baf0cb9e.tar.gz
lwn-a0af469b58944f6e8c5c8ecbebb42997baf0cb9e.zip
Fix btrfs_open_devices to deal with changes since the scan ioctls
Devices can change after the scan ioctls are done, and btrfs_open_devices needs to be able to verify them as they are opened and used by the FS. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 38b0d9ecda6a..264f297260f8 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1266,10 +1266,10 @@ struct btrfs_root *open_ctree(struct super_block *sb,
btrfs_parse_options(options, tree_root, NULL);
- if (btrfs_super_num_devices(disk_super) > fs_devices->num_devices) {
+ if (btrfs_super_num_devices(disk_super) > fs_devices->open_devices) {
printk("Btrfs: wanted %llu devices, but found %llu\n",
(unsigned long long)btrfs_super_num_devices(disk_super),
- (unsigned long long)fs_devices->num_devices);
+ (unsigned long long)fs_devices->open_devices);
if (btrfs_test_opt(tree_root, DEGRADED))
printk("continuing in degraded mode\n");
else {