0001
0002 #ifndef _LINUX_STATFS_H
0003 #define _LINUX_STATFS_H
0004
0005 #include <linux/types.h>
0006 #include <asm/statfs.h>
0007 #include <asm/byteorder.h>
0008
0009 struct kstatfs {
0010 long f_type;
0011 long f_bsize;
0012 u64 f_blocks;
0013 u64 f_bfree;
0014 u64 f_bavail;
0015 u64 f_files;
0016 u64 f_ffree;
0017 __kernel_fsid_t f_fsid;
0018 long f_namelen;
0019 long f_frsize;
0020 long f_flags;
0021 long f_spare[4];
0022 };
0023
0024
0025
0026
0027
0028
0029
0030
0031 #define ST_RDONLY 0x0001
0032 #define ST_NOSUID 0x0002
0033 #define ST_NODEV 0x0004
0034 #define ST_NOEXEC 0x0008
0035 #define ST_SYNCHRONOUS 0x0010
0036 #define ST_VALID 0x0020
0037 #define ST_MANDLOCK 0x0040
0038
0039
0040
0041 #define ST_NOATIME 0x0400
0042 #define ST_NODIRATIME 0x0800
0043 #define ST_RELATIME 0x1000
0044 #define ST_NOSYMFOLLOW 0x2000
0045
0046 struct dentry;
0047 extern int vfs_get_fsid(struct dentry *dentry, __kernel_fsid_t *fsid);
0048
0049 static inline __kernel_fsid_t u64_to_fsid(u64 v)
0050 {
0051 return (__kernel_fsid_t){.val = {(u32)v, (u32)(v>>32)}};
0052 }
0053
0054
0055 static inline __kernel_fsid_t uuid_to_fsid(__u8 *uuid)
0056 {
0057 return u64_to_fsid(le64_to_cpup((void *)uuid) ^
0058 le64_to_cpup((void *)(uuid + sizeof(u64))));
0059 }
0060
0061 #endif