Subject: Re: [PATCH v3] ext4: Add a uapi header for ext4 userspace APIs

Hi,

On Sun, Apr 02, 2023 at 11:37:42AM +0900, Josh Triplett wrote:
> Create a uapi header include/uapi/linux/ext4.h, move the ioctls and
> associated data structures to the uapi header, and include it from
> fs/ext4/ext4.h.
>
> Signed-off-by: Josh Triplett <[email protected]>
> ---
>
> Sorry for the churn; I didn't encounter these errors in local
> test builds.
>
> v2:
> - Add UAPI header to MAINTAINERS
> - Fix include paths in UAPI header
> - Formatting fix for EXT4_IOC_SHUTDOWN
>
> v3:
> - Leave compat ioctls in the private ext4.h header. It appears that some other
> UAPI headers already follow this pattern, with compat defined privately. For
> instance, quota and ethtool both follow that pattern.

Do you intend to keep the compat ioctl definitions in the private header?

[...]
> --- /dev/null
> +++ b/include/uapi/linux/ext4.h
[...]
> +/*
> + * ioctl commands in 32 bit emulation
> + */
> +#define EXT4_IOC32_GETVERSION _IOR('f', 3, int)
> +#define EXT4_IOC32_SETVERSION _IOW('f', 4, int)
> +#define EXT4_IOC32_GETRSVSZ _IOR('f', 5, int)
> +#define EXT4_IOC32_SETRSVSZ _IOW('f', 6, int)
> +#define EXT4_IOC32_GROUP_EXTEND _IOW('f', 7, unsigned int)
> +#define EXT4_IOC32_GROUP_ADD _IOW('f', 8, struct compat_ext4_new_group_input)

It appears that the ioctl definition for EXT4_IOC32_GROUP_ADD is provided,
but there is no corresponding definition for the
compat_ext4_new_group_input structure nowhere in the uapi headers.

--
glebfm