Skip to content

Commit 34c5181

Browse files
esyr-rhkdave
authored andcommitted
btrfs: re-instantiate the removed BTRFS_SUBVOL_CREATE_ASYNC definition
The commit 9c1036f ("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: 9c1036f ("btrfs: Remove BTRFS_SUBVOL_CREATE_ASYNC support") Reviewed-by: Nikolay Borisov <[email protected]> Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent d611add commit 34c5181

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

include/uapi/linux/btrfs.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,10 @@ struct btrfs_ioctl_vol_args {
3636
#define BTRFS_DEVICE_PATH_NAME_MAX 1024
3737
#define BTRFS_SUBVOL_NAME_MAX 4039
3838

39-
/*
40-
* Deprecated since 5.7:
41-
*
42-
* BTRFS_SUBVOL_CREATE_ASYNC (1ULL << 0)
43-
*/
44-
39+
#ifndef __KERNEL__
40+
/* Deprecated since 5.7 */
41+
# define BTRFS_SUBVOL_CREATE_ASYNC (1ULL << 0)
42+
#endif
4543
#define BTRFS_SUBVOL_RDONLY (1ULL << 1)
4644
#define BTRFS_SUBVOL_QGROUP_INHERIT (1ULL << 2)
4745

0 commit comments

Comments
 (0)