diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 53 |
1 files changed, 26 insertions, 27 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index b1bcb275b596..10b8dedcd18b 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -60,24 +60,24 @@ struct inodes_stat_t { | |||
60 | */ | 60 | */ |
61 | 61 | ||
62 | /* file is open for reading */ | 62 | /* file is open for reading */ |
63 | #define FMODE_READ ((__force fmode_t)1) | 63 | #define FMODE_READ ((__force fmode_t)0x1) |
64 | /* file is open for writing */ | 64 | /* file is open for writing */ |
65 | #define FMODE_WRITE ((__force fmode_t)2) | 65 | #define FMODE_WRITE ((__force fmode_t)0x2) |
66 | /* file is seekable */ | 66 | /* file is seekable */ |
67 | #define FMODE_LSEEK ((__force fmode_t)4) | 67 | #define FMODE_LSEEK ((__force fmode_t)0x4) |
68 | /* file can be accessed using pread */ | 68 | /* file can be accessed using pread */ |
69 | #define FMODE_PREAD ((__force fmode_t)8) | 69 | #define FMODE_PREAD ((__force fmode_t)0x8) |
70 | /* file can be accessed using pwrite */ | 70 | /* file can be accessed using pwrite */ |
71 | #define FMODE_PWRITE ((__force fmode_t)16) | 71 | #define FMODE_PWRITE ((__force fmode_t)0x10) |
72 | /* File is opened for execution with sys_execve / sys_uselib */ | 72 | /* File is opened for execution with sys_execve / sys_uselib */ |
73 | #define FMODE_EXEC ((__force fmode_t)32) | 73 | #define FMODE_EXEC ((__force fmode_t)0x20) |
74 | /* File is opened with O_NDELAY (only set for block devices) */ | 74 | /* File is opened with O_NDELAY (only set for block devices) */ |
75 | #define FMODE_NDELAY ((__force fmode_t)64) | 75 | #define FMODE_NDELAY ((__force fmode_t)0x40) |
76 | /* File is opened with O_EXCL (only set for block devices) */ | 76 | /* File is opened with O_EXCL (only set for block devices) */ |
77 | #define FMODE_EXCL ((__force fmode_t)128) | 77 | #define FMODE_EXCL ((__force fmode_t)0x80) |
78 | /* File is opened using open(.., 3, ..) and is writeable only for ioctls | 78 | /* File is opened using open(.., 3, ..) and is writeable only for ioctls |
79 | (specialy hack for floppy.c) */ | 79 | (specialy hack for floppy.c) */ |
80 | #define FMODE_WRITE_IOCTL ((__force fmode_t)256) | 80 | #define FMODE_WRITE_IOCTL ((__force fmode_t)0x100) |
81 | 81 | ||
82 | /* | 82 | /* |
83 | * Don't update ctime and mtime. | 83 | * Don't update ctime and mtime. |
@@ -85,7 +85,10 @@ struct inodes_stat_t { | |||
85 | * Currently a special hack for the XFS open_by_handle ioctl, but we'll | 85 | * Currently a special hack for the XFS open_by_handle ioctl, but we'll |
86 | * hopefully graduate it to a proper O_CMTIME flag supported by open(2) soon. | 86 | * hopefully graduate it to a proper O_CMTIME flag supported by open(2) soon. |
87 | */ | 87 | */ |
88 | #define FMODE_NOCMTIME ((__force fmode_t)2048) | 88 | #define FMODE_NOCMTIME ((__force fmode_t)0x800) |
89 | |||
90 | /* Expect random access pattern */ | ||
91 | #define FMODE_RANDOM ((__force fmode_t)0x1000) | ||
89 | 92 | ||
90 | /* | 93 | /* |
91 | * The below are the various read and write types that we support. Some of | 94 | * The below are the various read and write types that we support. Some of |
@@ -729,6 +732,7 @@ struct inode { | |||
729 | uid_t i_uid; | 732 | uid_t i_uid; |
730 | gid_t i_gid; | 733 | gid_t i_gid; |
731 | dev_t i_rdev; | 734 | dev_t i_rdev; |
735 | unsigned int i_blkbits; | ||
732 | u64 i_version; | 736 | u64 i_version; |
733 | loff_t i_size; | 737 | loff_t i_size; |
734 | #ifdef __NEED_I_SIZE_ORDERED | 738 | #ifdef __NEED_I_SIZE_ORDERED |
@@ -738,7 +742,6 @@ struct inode { | |||
738 | struct timespec i_mtime; | 742 | struct timespec i_mtime; |
739 | struct timespec i_ctime; | 743 | struct timespec i_ctime; |
740 | blkcnt_t i_blocks; | 744 | blkcnt_t i_blocks; |
741 | unsigned int i_blkbits; | ||
742 | unsigned short i_bytes; | 745 | unsigned short i_bytes; |
743 | umode_t i_mode; | 746 | umode_t i_mode; |
744 | spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ | 747 | spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ |
@@ -1305,6 +1308,8 @@ extern int send_sigurg(struct fown_struct *fown); | |||
1305 | #define MNT_FORCE 0x00000001 /* Attempt to forcibily umount */ | 1308 | #define MNT_FORCE 0x00000001 /* Attempt to forcibily umount */ |
1306 | #define MNT_DETACH 0x00000002 /* Just detach from the tree */ | 1309 | #define MNT_DETACH 0x00000002 /* Just detach from the tree */ |
1307 | #define MNT_EXPIRE 0x00000004 /* Mark for expiry */ | 1310 | #define MNT_EXPIRE 0x00000004 /* Mark for expiry */ |
1311 | #define UMOUNT_NOFOLLOW 0x00000008 /* Don't follow symlink on umount */ | ||
1312 | #define UMOUNT_UNUSED 0x80000000 /* Flag guaranteed to be unused */ | ||
1308 | 1313 | ||
1309 | extern struct list_head super_blocks; | 1314 | extern struct list_head super_blocks; |
1310 | extern spinlock_t sb_lock; | 1315 | extern spinlock_t sb_lock; |
@@ -1314,9 +1319,9 @@ extern spinlock_t sb_lock; | |||
1314 | struct super_block { | 1319 | struct super_block { |
1315 | struct list_head s_list; /* Keep this first */ | 1320 | struct list_head s_list; /* Keep this first */ |
1316 | dev_t s_dev; /* search index; _not_ kdev_t */ | 1321 | dev_t s_dev; /* search index; _not_ kdev_t */ |
1317 | unsigned long s_blocksize; | ||
1318 | unsigned char s_blocksize_bits; | ||
1319 | unsigned char s_dirt; | 1322 | unsigned char s_dirt; |
1323 | unsigned char s_blocksize_bits; | ||
1324 | unsigned long s_blocksize; | ||
1320 | loff_t s_maxbytes; /* Max file size */ | 1325 | loff_t s_maxbytes; /* Max file size */ |
1321 | struct file_system_type *s_type; | 1326 | struct file_system_type *s_type; |
1322 | const struct super_operations *s_op; | 1327 | const struct super_operations *s_op; |
@@ -1357,16 +1362,16 @@ struct super_block { | |||
1357 | void *s_fs_info; /* Filesystem private info */ | 1362 | void *s_fs_info; /* Filesystem private info */ |
1358 | fmode_t s_mode; | 1363 | fmode_t s_mode; |
1359 | 1364 | ||
1365 | /* Granularity of c/m/atime in ns. | ||
1366 | Cannot be worse than a second */ | ||
1367 | u32 s_time_gran; | ||
1368 | |||
1360 | /* | 1369 | /* |
1361 | * The next field is for VFS *only*. No filesystems have any business | 1370 | * The next field is for VFS *only*. No filesystems have any business |
1362 | * even looking at it. You had been warned. | 1371 | * even looking at it. You had been warned. |
1363 | */ | 1372 | */ |
1364 | struct mutex s_vfs_rename_mutex; /* Kludge */ | 1373 | struct mutex s_vfs_rename_mutex; /* Kludge */ |
1365 | 1374 | ||
1366 | /* Granularity of c/m/atime in ns. | ||
1367 | Cannot be worse than a second */ | ||
1368 | u32 s_time_gran; | ||
1369 | |||
1370 | /* | 1375 | /* |
1371 | * Filesystem subtype. If non-empty the filesystem type field | 1376 | * Filesystem subtype. If non-empty the filesystem type field |
1372 | * in /proc/mounts will be "type.subtype" | 1377 | * in /proc/mounts will be "type.subtype" |
@@ -1555,7 +1560,7 @@ struct super_operations { | |||
1555 | void (*destroy_inode)(struct inode *); | 1560 | void (*destroy_inode)(struct inode *); |
1556 | 1561 | ||
1557 | void (*dirty_inode) (struct inode *); | 1562 | void (*dirty_inode) (struct inode *); |
1558 | int (*write_inode) (struct inode *, int); | 1563 | int (*write_inode) (struct inode *, struct writeback_control *wbc); |
1559 | void (*drop_inode) (struct inode *); | 1564 | void (*drop_inode) (struct inode *); |
1560 | void (*delete_inode) (struct inode *); | 1565 | void (*delete_inode) (struct inode *); |
1561 | void (*put_super) (struct super_block *); | 1566 | void (*put_super) (struct super_block *); |
@@ -1794,7 +1799,8 @@ extern int may_umount(struct vfsmount *); | |||
1794 | extern long do_mount(char *, char *, char *, unsigned long, void *); | 1799 | extern long do_mount(char *, char *, char *, unsigned long, void *); |
1795 | extern struct vfsmount *collect_mounts(struct path *); | 1800 | extern struct vfsmount *collect_mounts(struct path *); |
1796 | extern void drop_collected_mounts(struct vfsmount *); | 1801 | extern void drop_collected_mounts(struct vfsmount *); |
1797 | 1802 | extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, | |
1803 | struct vfsmount *); | ||
1798 | extern int vfs_statfs(struct dentry *, struct kstatfs *); | 1804 | extern int vfs_statfs(struct dentry *, struct kstatfs *); |
1799 | 1805 | ||
1800 | extern int current_umask(void); | 1806 | extern int current_umask(void); |
@@ -2058,12 +2064,6 @@ extern int invalidate_inodes(struct super_block *); | |||
2058 | unsigned long invalidate_mapping_pages(struct address_space *mapping, | 2064 | unsigned long invalidate_mapping_pages(struct address_space *mapping, |
2059 | pgoff_t start, pgoff_t end); | 2065 | pgoff_t start, pgoff_t end); |
2060 | 2066 | ||
2061 | static inline unsigned long __deprecated | ||
2062 | invalidate_inode_pages(struct address_space *mapping) | ||
2063 | { | ||
2064 | return invalidate_mapping_pages(mapping, 0, ~0UL); | ||
2065 | } | ||
2066 | |||
2067 | static inline void invalidate_remote_inode(struct inode *inode) | 2067 | static inline void invalidate_remote_inode(struct inode *inode) |
2068 | { | 2068 | { |
2069 | if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || | 2069 | if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || |
@@ -2132,6 +2132,7 @@ extern struct file * open_exec(const char *); | |||
2132 | 2132 | ||
2133 | /* fs/dcache.c -- generic fs support functions */ | 2133 | /* fs/dcache.c -- generic fs support functions */ |
2134 | extern int is_subdir(struct dentry *, struct dentry *); | 2134 | extern int is_subdir(struct dentry *, struct dentry *); |
2135 | extern int path_is_under(struct path *, struct path *); | ||
2135 | extern ino_t find_inode_number(struct dentry *, struct qstr *); | 2136 | extern ino_t find_inode_number(struct dentry *, struct qstr *); |
2136 | 2137 | ||
2137 | #include <linux/err.h> | 2138 | #include <linux/err.h> |
@@ -2340,8 +2341,6 @@ extern int simple_rename(struct inode *, struct dentry *, struct inode *, struct | |||
2340 | extern int simple_sync_file(struct file *, struct dentry *, int); | 2341 | extern int simple_sync_file(struct file *, struct dentry *, int); |
2341 | extern int simple_empty(struct dentry *); | 2342 | extern int simple_empty(struct dentry *); |
2342 | extern int simple_readpage(struct file *file, struct page *page); | 2343 | extern int simple_readpage(struct file *file, struct page *page); |
2343 | extern int simple_prepare_write(struct file *file, struct page *page, | ||
2344 | unsigned offset, unsigned to); | ||
2345 | extern int simple_write_begin(struct file *file, struct address_space *mapping, | 2344 | extern int simple_write_begin(struct file *file, struct address_space *mapping, |
2346 | loff_t pos, unsigned len, unsigned flags, | 2345 | loff_t pos, unsigned len, unsigned flags, |
2347 | struct page **pagep, void **fsdata); | 2346 | struct page **pagep, void **fsdata); |