File blkzoneioctls.patch of Package qemu
Index: qemu-7.1.0/linux-user/ioctls.h
===================================================================
--- qemu-7.1.0.orig/linux-user/ioctls.h
+++ qemu-7.1.0/linux-user/ioctls.h
@@ -134,6 +134,8 @@
IOCTL(FICLONE, IOC_W, TYPE_INT)
IOCTL(FICLONERANGE, IOC_W, MK_PTR(MK_STRUCT(STRUCT_file_clone_range)))
#endif
+ IOCTL(BLKGETZONESZ, IOC_R, MK_PTR(TYPE_INT))
+ IOCTL(BLKGETNRZONES, IOC_R, MK_PTR(TYPE_INT))
IOCTL(FIGETBSZ, IOC_R, MK_PTR(TYPE_LONG))
#ifdef CONFIG_FIEMAP
Index: qemu-7.1.0/linux-user/syscall_defs.h
===================================================================
--- qemu-7.1.0.orig/linux-user/syscall_defs.h
+++ qemu-7.1.0/linux-user/syscall_defs.h
@@ -926,7 +926,7 @@ struct target_rtc_pll_info {
/* A jump here: 108-111 have been used for various private purposes. */
#define TARGET_BLKBSZGET TARGET_IOR(0x12, 112, abi_ulong)
#define TARGET_BLKBSZSET TARGET_IOW(0x12, 113, abi_ulong)
-#define TARGET_BLKGETSIZE64 TARGET_IOR(0x12,114,abi_ulong)
+#define TARGET_BLKGETSIZE64 TARGET_IOR(0x12, 114,abi_ulong)
/* return device size in bytes
(u64 *arg) */
@@ -940,6 +940,10 @@ struct target_rtc_pll_info {
#define TARGET_BLKROTATIONAL TARGET_IO(0x12, 126)
#define TARGET_BLKZEROOUT TARGET_IO(0x12, 127)
+/* Zoned lock device ioctls. */
+#define TARGET_BLKGETZONESZ TARGET_IOR(0x12, 132, abi_uint)
+#define TARGET_BLKGETNRZONES TARGET_IOR(0x12, 133, abi_uint)
+
/* From <linux/fd.h> */
#define TARGET_FDMSGON TARGET_IO(2, 0x45)
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -95,6 +95,7 @@
#include <linux/soundcard.h>
#include <linux/kd.h>
#include <linux/mtio.h>
+#include <linux/blkzoned.h>
#ifdef HAVE_SYS_MOUNT_FSCONFIG
/*