diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2014-07-03 12:22:12 +0200 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-08-19 17:36:32 +0200 |
commit | 69611ac810af8e88eeb5ebd851589a0e8cc90860 (patch) | |
tree | 9e9a65f19117286e8e8d2778e325603a8c43fdbf /fs | |
parent | btrfs: check generation as replace duplicates devid+uuid (diff) | |
download | linux-69611ac810af8e88eeb5ebd851589a0e8cc90860.tar.xz linux-69611ac810af8e88eeb5ebd851589a0e8cc90860.zip |
Btrfs: fix unzeroed members in fs_devices when creating a fs from seed fs
We forgot to zero some members in fs_devices when we create new fs_devices
from the one of the seed fs. It would cause the problem that we got wrong
chunk profile when allocating chunks. Fix it.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/volumes.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 5700ab03e84b..50edbbc2e76c 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -1988,6 +1988,9 @@ static int btrfs_prepare_sprout(struct btrfs_root *root) fs_devices->seeding = 0; fs_devices->num_devices = 0; fs_devices->open_devices = 0; + fs_devices->missing_devices = 0; + fs_devices->num_can_discard = 0; + fs_devices->rotating = 0; fs_devices->seed = seed_devices; generate_random_uuid(fs_devices->fsid); |