16f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 28a1ab315SDavid Howells #ifndef _UAPI_GENERIC_STATFS_H 38a1ab315SDavid Howells #define _UAPI_GENERIC_STATFS_H 48a1ab315SDavid Howells 58a1ab315SDavid Howells #include <linux/types.h> 68a1ab315SDavid Howells 78a1ab315SDavid Howells 88a1ab315SDavid Howells /* 98a1ab315SDavid Howells * Most 64-bit platforms use 'long', while most 32-bit platforms use '__u32'. 108a1ab315SDavid Howells * Yes, they differ in signedness as well as size. 118a1ab315SDavid Howells * Special cases can override it for themselves -- except for S390x, which 128a1ab315SDavid Howells * is just a little too special for us. And MIPS, which I'm not touching 138a1ab315SDavid Howells * with a 10' pole. 148a1ab315SDavid Howells */ 158a1ab315SDavid Howells #ifndef __statfs_word 168a1ab315SDavid Howells #if __BITS_PER_LONG == 64 1779dbbc60SH.J. Lu #define __statfs_word __kernel_long_t 188a1ab315SDavid Howells #else 198a1ab315SDavid Howells #define __statfs_word __u32 208a1ab315SDavid Howells #endif 218a1ab315SDavid Howells #endif 228a1ab315SDavid Howells 238a1ab315SDavid Howells struct statfs { 248a1ab315SDavid Howells __statfs_word f_type; 258a1ab315SDavid Howells __statfs_word f_bsize; 268a1ab315SDavid Howells __statfs_word f_blocks; 278a1ab315SDavid Howells __statfs_word f_bfree; 288a1ab315SDavid Howells __statfs_word f_bavail; 298a1ab315SDavid Howells __statfs_word f_files; 308a1ab315SDavid Howells __statfs_word f_ffree; 318a1ab315SDavid Howells __kernel_fsid_t f_fsid; 328a1ab315SDavid Howells __statfs_word f_namelen; 338a1ab315SDavid Howells __statfs_word f_frsize; 348a1ab315SDavid Howells __statfs_word f_flags; 358a1ab315SDavid Howells __statfs_word f_spare[4]; 368a1ab315SDavid Howells }; 378a1ab315SDavid Howells 388a1ab315SDavid Howells /* 398a1ab315SDavid Howells * ARM needs to avoid the 32-bit padding at the end, for consistency 408a1ab315SDavid Howells * between EABI and OABI 418a1ab315SDavid Howells */ 428a1ab315SDavid Howells #ifndef ARCH_PACK_STATFS64 438a1ab315SDavid Howells #define ARCH_PACK_STATFS64 448a1ab315SDavid Howells #endif 458a1ab315SDavid Howells 468a1ab315SDavid Howells struct statfs64 { 478a1ab315SDavid Howells __statfs_word f_type; 488a1ab315SDavid Howells __statfs_word f_bsize; 498a1ab315SDavid Howells __u64 f_blocks; 508a1ab315SDavid Howells __u64 f_bfree; 518a1ab315SDavid Howells __u64 f_bavail; 528a1ab315SDavid Howells __u64 f_files; 538a1ab315SDavid Howells __u64 f_ffree; 548a1ab315SDavid Howells __kernel_fsid_t f_fsid; 558a1ab315SDavid Howells __statfs_word f_namelen; 568a1ab315SDavid Howells __statfs_word f_frsize; 578a1ab315SDavid Howells __statfs_word f_flags; 588a1ab315SDavid Howells __statfs_word f_spare[4]; 598a1ab315SDavid Howells } ARCH_PACK_STATFS64; 608a1ab315SDavid Howells 618a1ab315SDavid Howells /* 628a1ab315SDavid Howells * IA64 and x86_64 need to avoid the 32-bit padding at the end, 638a1ab315SDavid Howells * to be compatible with the i386 ABI 648a1ab315SDavid Howells */ 658a1ab315SDavid Howells #ifndef ARCH_PACK_COMPAT_STATFS64 668a1ab315SDavid Howells #define ARCH_PACK_COMPAT_STATFS64 678a1ab315SDavid Howells #endif 688a1ab315SDavid Howells 698a1ab315SDavid Howells struct compat_statfs64 { 708a1ab315SDavid Howells __u32 f_type; 718a1ab315SDavid Howells __u32 f_bsize; 728a1ab315SDavid Howells __u64 f_blocks; 738a1ab315SDavid Howells __u64 f_bfree; 748a1ab315SDavid Howells __u64 f_bavail; 758a1ab315SDavid Howells __u64 f_files; 768a1ab315SDavid Howells __u64 f_ffree; 778a1ab315SDavid Howells __kernel_fsid_t f_fsid; 788a1ab315SDavid Howells __u32 f_namelen; 798a1ab315SDavid Howells __u32 f_frsize; 808a1ab315SDavid Howells __u32 f_flags; 818a1ab315SDavid Howells __u32 f_spare[4]; 828a1ab315SDavid Howells } ARCH_PACK_COMPAT_STATFS64; 838a1ab315SDavid Howells 848a1ab315SDavid Howells #endif /* _UAPI_GENERIC_STATFS_H */ 85