statfs.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef _LINUX_STATFS_H
  2. #define _LINUX_STATFS_H
  3. #include <linux/types.h>
  4. #include <asm/statfs.h>
  5. struct kstatfs {
  6. long f_type;
  7. long f_bsize;
  8. u64 f_blocks;
  9. u64 f_bfree;
  10. u64 f_bavail;
  11. u64 f_files;
  12. u64 f_ffree;
  13. __kernel_fsid_t f_fsid;
  14. long f_namelen;
  15. long f_frsize;
  16. long f_flags;
  17. long f_spare[4];
  18. };
  19. /*
  20. * Definitions for the flag in f_flag.
  21. *
  22. * Generally these flags are equivalent to the MS_ flags used in the mount
  23. * ABI. The exception is ST_VALID which has the same value as MS_REMOUNT
  24. * which doesn't make any sense for statfs.
  25. */
  26. #define ST_RDONLY 0x0001 /* mount read-only */
  27. #define ST_NOSUID 0x0002 /* ignore suid and sgid bits */
  28. #define ST_NODEV 0x0004 /* disallow access to device special files */
  29. #define ST_NOEXEC 0x0008 /* disallow program execution */
  30. #define ST_SYNCHRONOUS 0x0010 /* writes are synced at once */
  31. #define ST_VALID 0x0020 /* f_flags support is implemented */
  32. #define ST_MANDLOCK 0x0040 /* allow mandatory locks on an FS */
  33. /* 0x0080 used for ST_WRITE in glibc */
  34. /* 0x0100 used for ST_APPEND in glibc */
  35. /* 0x0200 used for ST_IMMUTABLE in glibc */
  36. #define ST_NOATIME 0x0400 /* do not update access times */
  37. #define ST_NODIRATIME 0x0800 /* do not update directory access times */
  38. #define ST_RELATIME 0x1000 /* update atime relative to mtime/ctime */
  39. #endif