Commit 34c51814 authored by Eugene Syromiatnikov's avatar Eugene Syromiatnikov Committed by David Sterba

btrfs: re-instantiate the removed BTRFS_SUBVOL_CREATE_ASYNC definition

The commit 9c1036fd ("btrfs: Remove BTRFS_SUBVOL_CREATE_ASYNC
support") breaks strace build with the kernel headers from git:

    btrfs.c: In function "btrfs_test_subvol_ioctls":
    btrfs.c:531:23: error: "BTRFS_SUBVOL_CREATE_ASYNC" undeclared (first use
    in this function)
       vol_args_v2.flags = BTRFS_SUBVOL_CREATE_ASYNC;

Moreover, it is improper to break UAPI, strace uses the definitions to
decode ioctls that are considered part of public API.

Restore the macro definition and put it under "#ifndef __KERNEL__"
in order to prevent inadvertent in-kernel usage.

Fixes: 9c1036fd ("btrfs: Remove BTRFS_SUBVOL_CREATE_ASYNC support")
Reviewed-by: default avatarNikolay Borisov <nborisov@suse.com>
Signed-off-by: default avatarEugene Syromiatnikov <esyr@redhat.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent d611add4
...@@ -36,12 +36,10 @@ struct btrfs_ioctl_vol_args { ...@@ -36,12 +36,10 @@ struct btrfs_ioctl_vol_args {
#define BTRFS_DEVICE_PATH_NAME_MAX 1024 #define BTRFS_DEVICE_PATH_NAME_MAX 1024
#define BTRFS_SUBVOL_NAME_MAX 4039 #define BTRFS_SUBVOL_NAME_MAX 4039
/* #ifndef __KERNEL__
* Deprecated since 5.7: /* Deprecated since 5.7 */
* # define BTRFS_SUBVOL_CREATE_ASYNC (1ULL << 0)
* BTRFS_SUBVOL_CREATE_ASYNC (1ULL << 0) #endif
*/
#define BTRFS_SUBVOL_RDONLY (1ULL << 1) #define BTRFS_SUBVOL_RDONLY (1ULL << 1)
#define BTRFS_SUBVOL_QGROUP_INHERIT (1ULL << 2) #define BTRFS_SUBVOL_QGROUP_INHERIT (1ULL << 2)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment