Skip to content

Commit ebc8735

Browse files
lorddoskiaskdave
authored andcommitted
btrfs: Deprecate BTRFS_SUBVOL_CREATE_ASYNC flag
Support for asynchronous snapshot creation was originally added in 72fd032 ("Btrfs: add SNAP_CREATE_ASYNC ioctl") to cater for ceph's backend needs. However, since Ceph has deprecated support for btrfs there is no longer need for that support in btrfs. Additionally, this was never supported by btrfs-progs, the official userspace tools. Reviewed-by: Qu Wenruo <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Nikolay Borisov <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 762bf09 commit ebc8735

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

fs/btrfs/ioctl.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1841,8 +1841,15 @@ static noinline int btrfs_ioctl_snap_create_v2(struct file *file,
18411841
goto free_args;
18421842
}
18431843

1844-
if (vol_args->flags & BTRFS_SUBVOL_CREATE_ASYNC)
1844+
if (vol_args->flags & BTRFS_SUBVOL_CREATE_ASYNC) {
1845+
struct inode *inode = file_inode(file);
1846+
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
1847+
1848+
btrfs_warn(fs_info,
1849+
"SNAP_CREATE_V2 ioctl with CREATE_ASYNC is deprecated and will be removed in kernel 5.7");
1850+
18451851
ptr = &transid;
1852+
}
18461853
if (vol_args->flags & BTRFS_SUBVOL_RDONLY)
18471854
readonly = true;
18481855
if (vol_args->flags & BTRFS_SUBVOL_QGROUP_INHERIT) {
@@ -4191,6 +4198,9 @@ static noinline long btrfs_ioctl_start_sync(struct btrfs_root *root,
41914198
u64 transid;
41924199
int ret;
41934200

4201+
btrfs_warn(root->fs_info,
4202+
"START_SYNC ioctl is deprecated and will be removed in kernel 5.7");
4203+
41944204
trans = btrfs_attach_transaction_barrier(root);
41954205
if (IS_ERR(trans)) {
41964206
if (PTR_ERR(trans) != -ENOENT)
@@ -4218,6 +4228,9 @@ static noinline long btrfs_ioctl_wait_sync(struct btrfs_fs_info *fs_info,
42184228
{
42194229
u64 transid;
42204230

4231+
btrfs_warn(fs_info,
4232+
"WAIT_SYNC ioctl is deprecated and will be removed in kernel 5.7");
4233+
42214234
if (argp) {
42224235
if (copy_from_user(&transid, argp, sizeof(transid)))
42234236
return -EFAULT;

0 commit comments

Comments
 (0)