blob: 3b4fb3e52f0d280088efb42b0c32f5db6534be7b [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _GENERIC_STATFS_H
2#define _GENERIC_STATFS_H
3
Arnd Bergmann3a471cb2009-02-26 00:51:45 +01004#include <linux/types.h>
5
6#ifdef __KERNEL__
Linus Torvalds1da177e2005-04-16 15:20:36 -07007typedef __kernel_fsid_t fsid_t;
8#endif
9
David Woodhouse92a75072008-09-01 14:07:11 +010010/*
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
18#if BITS_PER_LONG == 64
19#define __statfs_word long
20#else
21#define __statfs_word __u32
22#endif
23#endif
24
Linus Torvalds1da177e2005-04-16 15:20:36 -070025struct statfs {
David Woodhouse92a75072008-09-01 14:07:11 +010026 __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 Torvalds1da177e2005-04-16 15:20:36 -070033 __kernel_fsid_t f_fsid;
David Woodhouse92a75072008-09-01 14:07:11 +010034 __statfs_word f_namelen;
35 __statfs_word f_frsize;
36 __statfs_word f_spare[5];
Linus Torvalds1da177e2005-04-16 15:20:36 -070037};
38
David Woodhouse92a75072008-09-01 14:07:11 +010039/*
40 * ARM needs to avoid the 32-bit padding at the end, for consistency
41 * between EABI and OABI
42 */
43#ifndef ARCH_PACK_STATFS64
44#define ARCH_PACK_STATFS64
45#endif
46
Linus Torvalds1da177e2005-04-16 15:20:36 -070047struct statfs64 {
David Woodhouse92a75072008-09-01 14:07:11 +010048 __statfs_word f_type;
49 __statfs_word f_bsize;
Linus Torvalds1da177e2005-04-16 15:20:36 -070050 __u64 f_blocks;
51 __u64 f_bfree;
52 __u64 f_bavail;
53 __u64 f_files;
54 __u64 f_ffree;
55 __kernel_fsid_t f_fsid;
David Woodhouse92a75072008-09-01 14:07:11 +010056 __statfs_word f_namelen;
57 __statfs_word f_frsize;
58 __statfs_word f_spare[5];
59} ARCH_PACK_STATFS64;
60
61/*
62 * IA64 and x86_64 need to avoid the 32-bit padding at the end,
63 * to be compatible with the i386 ABI
64 */
65#ifndef ARCH_PACK_COMPAT_STATFS64
66#define ARCH_PACK_COMPAT_STATFS64
67#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070068
69struct compat_statfs64 {
70 __u32 f_type;
71 __u32 f_bsize;
72 __u64 f_blocks;
73 __u64 f_bfree;
74 __u64 f_bavail;
75 __u64 f_files;
76 __u64 f_ffree;
77 __kernel_fsid_t f_fsid;
78 __u32 f_namelen;
79 __u32 f_frsize;
80 __u32 f_spare[5];
David Woodhouse92a75072008-09-01 14:07:11 +010081} ARCH_PACK_COMPAT_STATFS64;
Linus Torvalds1da177e2005-04-16 15:20:36 -070082
83#endif