| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _GENERIC_STATFS_H | 
 | 2 | #define _GENERIC_STATFS_H | 
 | 3 |  | 
| Arnd Bergmann | 3a471cb | 2009-02-26 00:51:45 +0100 | [diff] [blame] | 4 | #include <linux/types.h> | 
 | 5 |  | 
 | 6 | #ifdef __KERNEL__ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | typedef __kernel_fsid_t	fsid_t; | 
 | 8 | #endif | 
 | 9 |  | 
| David Woodhouse | 92a7507 | 2008-09-01 14:07:11 +0100 | [diff] [blame] | 10 | /* | 
 | 11 |  * Most 64-bit platforms use 'long', while most 32-bit platforms use '__u32'. | 
 | 12 |  * Yes, they differ in signedness as well as size. | 
 | 13 |  * Special cases can override it for themselves -- except for S390x, which | 
 | 14 |  * is just a little too special for us. And MIPS, which I'm not touching | 
 | 15 |  * with a 10' pole. | 
 | 16 |  */ | 
 | 17 | #ifndef __statfs_word | 
| H. Peter Anvin | f5c2347 | 2012-04-26 11:45:16 -0700 | [diff] [blame] | 18 | #if __BITS_PER_LONG == 64 | 
| David Woodhouse | 92a7507 | 2008-09-01 14:07:11 +0100 | [diff] [blame] | 19 | #define __statfs_word long | 
 | 20 | #else | 
 | 21 | #define __statfs_word __u32 | 
 | 22 | #endif | 
 | 23 | #endif | 
 | 24 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | struct statfs { | 
| David Woodhouse | 92a7507 | 2008-09-01 14:07:11 +0100 | [diff] [blame] | 26 | 	__statfs_word f_type; | 
 | 27 | 	__statfs_word f_bsize; | 
 | 28 | 	__statfs_word f_blocks; | 
 | 29 | 	__statfs_word f_bfree; | 
 | 30 | 	__statfs_word f_bavail; | 
 | 31 | 	__statfs_word f_files; | 
 | 32 | 	__statfs_word f_ffree; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | 	__kernel_fsid_t f_fsid; | 
| David Woodhouse | 92a7507 | 2008-09-01 14:07:11 +0100 | [diff] [blame] | 34 | 	__statfs_word f_namelen; | 
 | 35 | 	__statfs_word f_frsize; | 
| Christoph Hellwig | 365b181 | 2010-07-07 18:53:25 +0200 | [diff] [blame] | 36 | 	__statfs_word f_flags; | 
 | 37 | 	__statfs_word f_spare[4]; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 38 | }; | 
 | 39 |  | 
| David Woodhouse | 92a7507 | 2008-09-01 14:07:11 +0100 | [diff] [blame] | 40 | /* | 
 | 41 |  * ARM needs to avoid the 32-bit padding at the end, for consistency | 
 | 42 |  * between EABI and OABI  | 
 | 43 |  */ | 
 | 44 | #ifndef ARCH_PACK_STATFS64 | 
 | 45 | #define ARCH_PACK_STATFS64 | 
 | 46 | #endif | 
 | 47 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 48 | struct statfs64 { | 
| David Woodhouse | 92a7507 | 2008-09-01 14:07:11 +0100 | [diff] [blame] | 49 | 	__statfs_word f_type; | 
 | 50 | 	__statfs_word f_bsize; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 51 | 	__u64 f_blocks; | 
 | 52 | 	__u64 f_bfree; | 
 | 53 | 	__u64 f_bavail; | 
 | 54 | 	__u64 f_files; | 
 | 55 | 	__u64 f_ffree; | 
 | 56 | 	__kernel_fsid_t f_fsid; | 
| David Woodhouse | 92a7507 | 2008-09-01 14:07:11 +0100 | [diff] [blame] | 57 | 	__statfs_word f_namelen; | 
 | 58 | 	__statfs_word f_frsize; | 
| Christoph Hellwig | 365b181 | 2010-07-07 18:53:25 +0200 | [diff] [blame] | 59 | 	__statfs_word f_flags; | 
 | 60 | 	__statfs_word f_spare[4]; | 
| David Woodhouse | 92a7507 | 2008-09-01 14:07:11 +0100 | [diff] [blame] | 61 | } ARCH_PACK_STATFS64; | 
 | 62 |  | 
 | 63 | /*  | 
 | 64 |  * IA64 and x86_64 need to avoid the 32-bit padding at the end, | 
 | 65 |  * to be compatible with the i386 ABI | 
 | 66 |  */ | 
 | 67 | #ifndef ARCH_PACK_COMPAT_STATFS64 | 
 | 68 | #define ARCH_PACK_COMPAT_STATFS64 | 
 | 69 | #endif | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 70 |  | 
 | 71 | struct compat_statfs64 { | 
 | 72 | 	__u32 f_type; | 
 | 73 | 	__u32 f_bsize; | 
 | 74 | 	__u64 f_blocks; | 
 | 75 | 	__u64 f_bfree; | 
 | 76 | 	__u64 f_bavail; | 
 | 77 | 	__u64 f_files; | 
 | 78 | 	__u64 f_ffree; | 
 | 79 | 	__kernel_fsid_t f_fsid; | 
 | 80 | 	__u32 f_namelen; | 
 | 81 | 	__u32 f_frsize; | 
| Christoph Hellwig | 365b181 | 2010-07-07 18:53:25 +0200 | [diff] [blame] | 82 | 	__u32 f_flags; | 
 | 83 | 	__u32 f_spare[4]; | 
| David Woodhouse | 92a7507 | 2008-09-01 14:07:11 +0100 | [diff] [blame] | 84 | } ARCH_PACK_COMPAT_STATFS64; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 85 |  | 
 | 86 | #endif |