@@ -1415,6 +1415,7 @@ enum {
BTRFS_MOUNT_DISCARD_ASYNC = (1UL << 28),
BTRFS_MOUNT_IGNOREBADROOTS = (1UL << 29),
BTRFS_MOUNT_IGNOREDATACSUMS = (1UL << 30),
+ BTRFS_MOUNT_SHAREDEXT = (1UL << 31),
};
#define BTRFS_DEFAULT_COMMIT_INTERVAL (30)
@@ -397,6 +397,7 @@ enum {
#ifdef CONFIG_BTRFS_FS_REF_VERIFY
Opt_ref_verify,
#endif
+ Opt_sharedext,
Opt_err,
};
@@ -471,6 +472,7 @@ static const match_table_t tokens = {
#ifdef CONFIG_BTRFS_FS_REF_VERIFY
{Opt_ref_verify, "ref_verify"},
#endif
+ {Opt_sharedext, "sharedext"},
{Opt_err, NULL},
};
@@ -1013,6 +1015,10 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options,
btrfs_set_opt(info->mount_opt, REF_VERIFY);
break;
#endif
+ case Opt_sharedext:
+ btrfs_info(info, "enabling shared memory for shared extents");
+ btrfs_set_opt(info->mount_opt, SHAREDEXT);
+ break;
case Opt_err:
btrfs_err(info, "unrecognized mount option '%s'", p);
ret = -EINVAL;