@@ -62,7 +62,9 @@ struct sockaddr {
6262#include <linux/dma-buf.h>
6363#include <linux/dma-heap.h>
6464#include <linux/dm-ioctl.h>
65+ #if 0 // Temporarily disable linux/ext4.h until Linux 6.4.
6566#include <linux/ext4.h>
67+ #endif
6668#include <linux/fb.h>
6769#include <linux/f2fs.h>
6870#include <linux/fiemap.h>
@@ -175,6 +177,37 @@ struct sockaddr {
175177typedef __kernel_loff_t loff_t ;
176178#endif
177179
180+ // Temporarily define these ext4 ioctl codes manually until Linux 6.4.
181+ #define EXT4_IOC32_GETRSVSZ _IOR('f', 5, int)
182+ #define EXT4_IOC32_GETVERSION _IOR('f', 3, int)
183+ #define EXT4_IOC32_GETVERSION_OLD FS_IOC32_GETVERSION
184+ #define EXT4_IOC32_GROUP_ADD _IOW('f', 8, struct compat_ext4_new_group_input)
185+ #define EXT4_IOC32_GROUP_EXTEND _IOW('f', 7, unsigned int)
186+ #define EXT4_IOC32_SETRSVSZ _IOW('f', 6, int)
187+ #define EXT4_IOC32_SETVERSION _IOW('f', 4, int)
188+ #define EXT4_IOC32_SETVERSION_OLD FS_IOC32_SETVERSION
189+ #define EXT4_IOC_ALLOC_DA_BLKS _IO('f', 12)
190+ #define EXT4_IOC_CHECKPOINT _IOW('f', 43, __u32)
191+ #define EXT4_IOC_CLEAR_ES_CACHE _IO('f', 40)
192+ #define EXT4_IOC_GET_ES_CACHE _IOWR('f', 42, struct fiemap)
193+ #define EXT4_IOC_GETFSUUID _IOR('f', 44, struct fsuuid)
194+ #define EXT4_IOC_GETRSVSZ _IOR('f', 5, long)
195+ #define EXT4_IOC_GETSTATE _IOW('f', 41, __u32)
196+ #define EXT4_IOC_GETVERSION _IOR('f', 3, long)
197+ #define EXT4_IOC_GETVERSION_OLD FS_IOC_GETVERSION
198+ #define EXT4_IOC_GROUP_ADD _IOW('f', 8, struct ext4_new_group_input)
199+ #define EXT4_IOC_GROUP_EXTEND _IOW('f', 7, unsigned long)
200+ #define EXT4_IOC_MIGRATE _IO('f', 9)
201+ #define EXT4_IOC_MOVE_EXT _IOWR('f', 15, struct move_extent)
202+ #define EXT4_IOC_PRECACHE_EXTENTS _IO('f', 18)
203+ #define EXT4_IOC_RESIZE_FS _IOW('f', 16, __u64)
204+ #define EXT4_IOC_SETFSUUID _IOW('f', 44, struct fsuuid)
205+ #define EXT4_IOC_SETRSVSZ _IOW('f', 6, long)
206+ #define EXT4_IOC_SETVERSION _IOW('f', 4, long)
207+ #define EXT4_IOC_SETVERSION_OLD FS_IOC_SETVERSION
208+ #define EXT4_IOC_SHUTDOWN _IOR('X', 125, __u32)
209+ #define EXT4_IOC_SWAP_BOOT _IO('f', 17)
210+
178211void entry (const char * s );
179212
180213#define IOCTL_REQUEST (s ) do { \
@@ -501,27 +534,35 @@ void list(void) {
501534 IOCTL_REQUEST (EXT4_IOC_GETRSVSZ );
502535 IOCTL_REQUEST (EXT4_IOC_SETRSVSZ );
503536 IOCTL_REQUEST (EXT4_IOC_GROUP_EXTEND );
537+ #if 0 // Temporarily disable until Linux 6.4.
504538 IOCTL_REQUEST (EXT4_IOC_GROUP_ADD );
539+ #endif
505540 IOCTL_REQUEST (EXT4_IOC_MIGRATE );
506541 IOCTL_REQUEST (EXT4_IOC_ALLOC_DA_BLKS );
542+ #if 0 // Temporarily disable until Linux 6.4.
507543 IOCTL_REQUEST (EXT4_IOC_MOVE_EXT );
544+ #endif
508545 IOCTL_REQUEST (EXT4_IOC_RESIZE_FS );
509546 IOCTL_REQUEST (EXT4_IOC_SWAP_BOOT );
510547 IOCTL_REQUEST (EXT4_IOC_PRECACHE_EXTENTS );
511548 IOCTL_REQUEST (EXT4_IOC_CLEAR_ES_CACHE );
512549 IOCTL_REQUEST (EXT4_IOC_GETSTATE );
513550 IOCTL_REQUEST (EXT4_IOC_GET_ES_CACHE );
514551 IOCTL_REQUEST (EXT4_IOC_CHECKPOINT );
552+ #if 0 // Temporarily disable until Linux 6.4.
515553 IOCTL_REQUEST (EXT4_IOC_GETFSUUID );
516554 IOCTL_REQUEST (EXT4_IOC_SETFSUUID );
555+ #endif
517556 IOCTL_REQUEST (EXT4_IOC_SHUTDOWN );
518557
519558 IOCTL_REQUEST (EXT4_IOC32_GETVERSION );
520559 IOCTL_REQUEST (EXT4_IOC32_SETVERSION );
521560 IOCTL_REQUEST (EXT4_IOC32_GETRSVSZ );
522561 IOCTL_REQUEST (EXT4_IOC32_SETRSVSZ );
523562 IOCTL_REQUEST (EXT4_IOC32_GROUP_EXTEND );
563+ #if 0 // Temporarily disable until Linux 6.4.
524564 IOCTL_REQUEST (EXT4_IOC32_GROUP_ADD );
565+ #endif
525566 IOCTL_REQUEST (EXT4_IOC32_GETVERSION_OLD );
526567 IOCTL_REQUEST (EXT4_IOC32_SETVERSION_OLD );
527568
@@ -548,7 +589,6 @@ void list(void) {
548589 IOCTL_REQUEST (KVM_SET_BOOT_CPU_ID );
549590 IOCTL_REQUEST (KVM_SET_MP_STATE );
550591 IOCTL_REQUEST (KVM_GET_MP_STATE );
551- IOCTL_REQUEST (KVM_SET_MEMORY_REGION );
552592 IOCTL_REQUEST (KVM_GET_API_VERSION );
553593 IOCTL_REQUEST (KVM_S390_GET_SKEYS );
554594#if 0 // needs `struct kvm_create_spapr_tce_64`
0 commit comments