fs: reserve a new ioctl magic for exfat and ntfs
Subsystems (3)
PATCH v3 1/2 fs: reserve a new ioctl magic for exfat and ntfs
ntfs and ntfs3 had no ioctl magic assigned to them. A decision to share the new ioctl magic(0xEF) between ntfs and exfat has been made
1. due to the similarities in API design
2. because they're maintained by the same group devs
3. to delay the eventual exhaustion of ioctl number namespace
Also, the uapi header file is named ntfs.h, not ntfs3.h to cater the on-going work of reviving ntfs classic and potentially consolidating it with ntfs3.
Signed-off-by David Timber <[email protected]>
--- .../userspace-api/ioctl/ioctl-number.rst | 1 + MAINTAINERS | 2 ++ fs/ntfs3/file.c | 6 ------ fs/ntfs3/ntfs_fs.h | 1 + include/uapi/linux/exfat.h | 3 ++- include/uapi/linux/ntfs.h | 16 ++++++++++++++++ 6 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 include/uapi/linux/ntfs.h
Documentation/userspace-api/ioctl/ioctl-number.rst +1 -0
@@ -410,6 +410,7 @@ Code Seq# Include File Comments <mailto:[email protected]> 0xF9 00-0F uapi/misc/amd-apml.h AMD side band system management interface driver <mailto:[email protected]> +0xEF 00-0F uapi/linux/exfat.h and uapi/linux/ntfs3.h 0xFD all linux/dm-ioctl.h 0xFE all linux/isst_if.h ==== ===== ========================================================= ================================================================
MAINTAINERS +2 -0
@@ -9597,6 +9597,7 @@ L: [email protected] S: Maintained T: git git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat.git F: fs/exfat/ +F: include/uapi/linux/exfat.h EXPRESSWIRE PROTOCOL LIBRARY M: Duje Mihanović <[email protected]>
@@ -18876,6 +18877,7 @@ W: http://www.paragon-software.com/ T: git https://github.com/Paragon-Software-Group/linux-ntfs3.git F: Documentation/filesystems/ntfs3.rst F: fs/ntfs3/ +F: include/uapi/linux/ntfs.h NTSYNC SYNCHRONIZATION PRIMITIVE DRIVER M: Elizabeth Figura <[email protected]>
fs/ntfs3/file.c +0 -6
@@ -21,12 +21,6 @@#include "ntfs.h" #include "ntfs_fs.h" -/* -* cifx, btrfs, exfat, ext4, f2fs use this constant. -* Hope this value will become common to all fs. -*/ -#define NTFS3_IOC_SHUTDOWN _IOR('X', 125, __u32) -/* * Helper for ntfs_should_use_dio. */
fs/ntfs3/ntfs_fs.h +1 -0
@@ -26,6 +26,7 @@#include <linux/time64.h> #include <linux/types.h> #include <linux/uidgid.h> +#include <uapi/linux/ntfs.h> #include <asm/div64.h> #include <asm/page.h>
include/uapi/linux/exfat.h +2 -1
@@ -12,7 +12,8 @@* exfat-specific ioctl commands */ -#define EXFAT_IOC_SHUTDOWN _IOR('X', 125, __u32) +#define EXFAT_IOCTL_MAGIC 0xEF/* shared with ntfs3 */ +#define EXFAT_IOC_SHUTDOWN _IOR('X', 125, __u32)/* * Flags used by EXFAT_IOC_SHUTDOWN
include/uapi/linux/ntfs.h new file +16 -0
@@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ + +#ifndef _UAPI_LINUX_NTFS_H +#define _UAPI_LINUX_NTFS_H +#include <linux/types.h> +#include <linux/ioctl.h> + +#define NTFS_IOCTL_MAGIC 0xEF/* shared with exfat */ + +/* +* cifx, btrfs, exfat, ext4, f2fs use this constant. +* Hope this value will become common to all fs. +*/ +#define NTFS3_IOC_SHUTDOWN _IOR('X', 125, __u32) + +#endif /* _UAPI_LINUX_NTFS_H */
Signature · 1 line
2.53.0.1.ga224b40d3f.dirty