Message ID | 1460470563-752-9-git-send-email-anand.jain@oracle.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 8549bd2b3a42..150807e0310e 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -605,6 +605,10 @@ static noinline int device_list_add(const char *path, if (IS_ERR(fs_devices)) return PTR_ERR(fs_devices); + if (btrfs_super_incompat_flags(disk_super) & + BTRFS_FEATURE_INCOMPAT_SPARE_DEV) + fs_devices->spare = 1; + list_add(&fs_devices->list, &fs_uuids); device = NULL; diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h index 48ced5cc09e4..51cf716eb35b 100644 --- a/fs/btrfs/volumes.h +++ b/fs/btrfs/volumes.h @@ -263,6 +263,8 @@ struct btrfs_fs_devices { struct kobject fsid_kobj; struct kobject *device_dir_kobj; struct completion kobj_unregister; + + int spare; }; #define BTRFS_BIO_INLINE_CSUM_SIZE 64