^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) // SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * Copyright (c) 2004-2005 Silicon Graphics, Inc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) * All Rights Reserved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) #ifndef __XFS_IOCTL32_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) #define __XFS_IOCTL32_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #include <linux/compat.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) * on 32-bit arches, ioctl argument structures may have different sizes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) * and/or alignment. We define compat structures which match the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) * 32-bit sizes/alignments here, and their associated ioctl numbers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) * xfs_ioctl32.c contains routines to copy these structures in and out.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) /* stock kernel-level ioctls we support */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #define XFS_IOC_GETXFLAGS_32 FS_IOC32_GETFLAGS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #define XFS_IOC_SETXFLAGS_32 FS_IOC32_SETFLAGS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) #define XFS_IOC_GETVERSION_32 FS_IOC32_GETVERSION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) * On intel, even if sizes match, alignment and/or padding may differ.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) #if defined(CONFIG_IA64) || defined(CONFIG_X86_64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) #define BROKEN_X86_ALIGNMENT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) #define __compat_packed __attribute__((packed))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) #define __compat_packed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) typedef struct compat_xfs_bstime {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) old_time32_t tv_sec; /* seconds */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) __s32 tv_nsec; /* and nanoseconds */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) } compat_xfs_bstime_t;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) struct compat_xfs_bstat {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) __u64 bs_ino; /* inode number */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) __u16 bs_mode; /* type and mode */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) __u16 bs_nlink; /* number of links */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) __u32 bs_uid; /* user id */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) __u32 bs_gid; /* group id */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) __u32 bs_rdev; /* device value */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) __s32 bs_blksize; /* block size */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) __s64 bs_size; /* file size */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) compat_xfs_bstime_t bs_atime; /* access time */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) compat_xfs_bstime_t bs_mtime; /* modify time */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) compat_xfs_bstime_t bs_ctime; /* inode change time */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) int64_t bs_blocks; /* number of blocks */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) __u32 bs_xflags; /* extended flags */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) __s32 bs_extsize; /* extent size */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) __s32 bs_extents; /* number of extents */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) __u32 bs_gen; /* generation count */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) __u16 bs_projid_lo; /* lower part of project id */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) #define bs_projid bs_projid_lo /* (previously just bs_projid) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) __u16 bs_forkoff; /* inode fork offset in bytes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) __u16 bs_projid_hi; /* high part of project id */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) unsigned char bs_pad[10]; /* pad space, unused */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) __u32 bs_dmevmask; /* DMIG event mask */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) __u16 bs_dmstate; /* DMIG state info */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) __u16 bs_aextents; /* attribute number of extents */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) } __compat_packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) struct compat_xfs_fsop_bulkreq {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) compat_uptr_t lastip; /* last inode # pointer */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) __s32 icount; /* count of entries in buffer */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) compat_uptr_t ubuffer; /* user buffer for inode desc. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) compat_uptr_t ocount; /* output count pointer */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) #define XFS_IOC_FSBULKSTAT_32 \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) _IOWR('X', 101, struct compat_xfs_fsop_bulkreq)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) #define XFS_IOC_FSBULKSTAT_SINGLE_32 \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) _IOWR('X', 102, struct compat_xfs_fsop_bulkreq)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) #define XFS_IOC_FSINUMBERS_32 \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) _IOWR('X', 103, struct compat_xfs_fsop_bulkreq)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) typedef struct compat_xfs_fsop_handlereq {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) __u32 fd; /* fd for FD_TO_HANDLE */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) compat_uptr_t path; /* user pathname */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) __u32 oflags; /* open flags */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) compat_uptr_t ihandle; /* user supplied handle */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) __u32 ihandlen; /* user supplied length */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) compat_uptr_t ohandle; /* user buffer for handle */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) compat_uptr_t ohandlen; /* user buffer length */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) } compat_xfs_fsop_handlereq_t;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) #define XFS_IOC_PATH_TO_FSHANDLE_32 \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) _IOWR('X', 104, struct compat_xfs_fsop_handlereq)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) #define XFS_IOC_PATH_TO_HANDLE_32 \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) _IOWR('X', 105, struct compat_xfs_fsop_handlereq)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) #define XFS_IOC_FD_TO_HANDLE_32 \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) _IOWR('X', 106, struct compat_xfs_fsop_handlereq)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) #define XFS_IOC_OPEN_BY_HANDLE_32 \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) _IOWR('X', 107, struct compat_xfs_fsop_handlereq)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) #define XFS_IOC_READLINK_BY_HANDLE_32 \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) _IOWR('X', 108, struct compat_xfs_fsop_handlereq)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) /* The bstat field in the swapext struct needs translation */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) struct compat_xfs_swapext {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) int64_t sx_version; /* version */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) int64_t sx_fdtarget; /* fd of target file */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) int64_t sx_fdtmp; /* fd of tmp file */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) xfs_off_t sx_offset; /* offset into file */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) xfs_off_t sx_length; /* leng from offset */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) char sx_pad[16]; /* pad space, unused */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) struct compat_xfs_bstat sx_stat; /* stat of target b4 copy */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) } __compat_packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) #define XFS_IOC_SWAPEXT_32 _IOWR('X', 109, struct compat_xfs_swapext)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) typedef struct compat_xfs_fsop_attrlist_handlereq {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) struct compat_xfs_fsop_handlereq hreq; /* handle interface structure */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) struct xfs_attrlist_cursor pos; /* opaque cookie, list offset */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) __u32 flags; /* which namespace to use */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) __u32 buflen; /* length of buffer supplied */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) compat_uptr_t buffer; /* returned names */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) } __compat_packed compat_xfs_fsop_attrlist_handlereq_t;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) /* Note: actually this is read/write */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) #define XFS_IOC_ATTRLIST_BY_HANDLE_32 \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) _IOW('X', 122, struct compat_xfs_fsop_attrlist_handlereq)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) /* am_opcodes defined in xfs_fs.h */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) typedef struct compat_xfs_attr_multiop {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) __u32 am_opcode;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) __s32 am_error;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) compat_uptr_t am_attrname;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) compat_uptr_t am_attrvalue;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) __u32 am_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) __u32 am_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) } compat_xfs_attr_multiop_t;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) typedef struct compat_xfs_fsop_attrmulti_handlereq {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) struct compat_xfs_fsop_handlereq hreq; /* handle interface structure */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) __u32 opcount;/* count of following multiop */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) /* ptr to compat_xfs_attr_multiop */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) compat_uptr_t ops; /* attr_multi data */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) } compat_xfs_fsop_attrmulti_handlereq_t;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) #define XFS_IOC_ATTRMULTI_BY_HANDLE_32 \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) _IOW('X', 123, struct compat_xfs_fsop_attrmulti_handlereq)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) #ifdef BROKEN_X86_ALIGNMENT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) /* on ia32 l_start is on a 32-bit boundary */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) typedef struct compat_xfs_flock64 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) __s16 l_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) __s16 l_whence;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) __s64 l_start __attribute__((packed));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) /* len == 0 means until end of file */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) __s64 l_len __attribute__((packed));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) __s32 l_sysid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) __u32 l_pid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) __s32 l_pad[4]; /* reserve area */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) } compat_xfs_flock64_t;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) #define XFS_IOC_ALLOCSP_32 _IOW('X', 10, struct compat_xfs_flock64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) #define XFS_IOC_FREESP_32 _IOW('X', 11, struct compat_xfs_flock64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) #define XFS_IOC_ALLOCSP64_32 _IOW('X', 36, struct compat_xfs_flock64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) #define XFS_IOC_FREESP64_32 _IOW('X', 37, struct compat_xfs_flock64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) #define XFS_IOC_RESVSP_32 _IOW('X', 40, struct compat_xfs_flock64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) #define XFS_IOC_UNRESVSP_32 _IOW('X', 41, struct compat_xfs_flock64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) #define XFS_IOC_RESVSP64_32 _IOW('X', 42, struct compat_xfs_flock64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) #define XFS_IOC_UNRESVSP64_32 _IOW('X', 43, struct compat_xfs_flock64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) #define XFS_IOC_ZERO_RANGE_32 _IOW('X', 57, struct compat_xfs_flock64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) typedef struct compat_xfs_fsop_geom_v1 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) __u32 blocksize; /* filesystem (data) block size */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) __u32 rtextsize; /* realtime extent size */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) __u32 agblocks; /* fsblocks in an AG */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) __u32 agcount; /* number of allocation groups */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) __u32 logblocks; /* fsblocks in the log */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) __u32 sectsize; /* (data) sector size, bytes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) __u32 inodesize; /* inode size in bytes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) __u32 imaxpct; /* max allowed inode space(%) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) __u64 datablocks; /* fsblocks in data subvolume */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) __u64 rtblocks; /* fsblocks in realtime subvol */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) __u64 rtextents; /* rt extents in realtime subvol*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) __u64 logstart; /* starting fsblock of the log */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) unsigned char uuid[16]; /* unique id of the filesystem */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) __u32 sunit; /* stripe unit, fsblocks */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) __u32 swidth; /* stripe width, fsblocks */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) __s32 version; /* structure version */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) __u32 flags; /* superblock version flags */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) __u32 logsectsize; /* log sector size, bytes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) __u32 rtsectsize; /* realtime sector size, bytes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) __u32 dirblocksize; /* directory block size, bytes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) } __attribute__((packed)) compat_xfs_fsop_geom_v1_t;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) #define XFS_IOC_FSGEOMETRY_V1_32 \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) _IOR('X', 100, struct compat_xfs_fsop_geom_v1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) struct compat_xfs_inogrp {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) __u64 xi_startino; /* starting inode number */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) __s32 xi_alloccount; /* # bits set in allocmask */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) __u64 xi_allocmask; /* mask of allocated inodes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) } __attribute__((packed));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) /* These growfs input structures have padding on the end, so must translate */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) typedef struct compat_xfs_growfs_data {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) __u64 newblocks; /* new data subvol size, fsblocks */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) __u32 imaxpct; /* new inode space percentage limit */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) } __attribute__((packed)) compat_xfs_growfs_data_t;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) typedef struct compat_xfs_growfs_rt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) __u64 newblocks; /* new realtime size, fsblocks */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) __u32 extsize; /* new realtime extent size, fsblocks */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) } __attribute__((packed)) compat_xfs_growfs_rt_t;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) #define XFS_IOC_FSGROWFSDATA_32 _IOW('X', 110, struct compat_xfs_growfs_data)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) #define XFS_IOC_FSGROWFSRT_32 _IOW('X', 112, struct compat_xfs_growfs_rt)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) #endif /* BROKEN_X86_ALIGNMENT */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) #endif /* __XFS_IOCTL32_H__ */