diff options
Diffstat (limited to 'include/linux/ext3_fs.h')
| -rw-r--r-- | include/linux/ext3_fs.h | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 6b049030fbe6..6ce1bca01724 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
| @@ -202,14 +202,6 @@ static inline __u32 ext3_mask_flags(umode_t mode, __u32 flags) | |||
| 202 | return flags & EXT3_OTHER_FLMASK; | 202 | return flags & EXT3_OTHER_FLMASK; |
| 203 | } | 203 | } |
| 204 | 204 | ||
| 205 | /* | ||
| 206 | * Inode dynamic state flags | ||
| 207 | */ | ||
| 208 | #define EXT3_STATE_JDATA 0x00000001 /* journaled data exists */ | ||
| 209 | #define EXT3_STATE_NEW 0x00000002 /* inode is newly created */ | ||
| 210 | #define EXT3_STATE_XATTR 0x00000004 /* has in-inode xattrs */ | ||
| 211 | #define EXT3_STATE_FLUSH_ON_CLOSE 0x00000008 | ||
| 212 | |||
| 213 | /* Used to pass group descriptor data when online resize is done */ | 205 | /* Used to pass group descriptor data when online resize is done */ |
| 214 | struct ext3_new_group_input { | 206 | struct ext3_new_group_input { |
| 215 | __u32 group; /* Group number for this data */ | 207 | __u32 group; /* Group number for this data */ |
| @@ -408,7 +400,6 @@ struct ext3_inode { | |||
| 408 | #define EXT3_MOUNT_POSIX_ACL 0x08000 /* POSIX Access Control Lists */ | 400 | #define EXT3_MOUNT_POSIX_ACL 0x08000 /* POSIX Access Control Lists */ |
| 409 | #define EXT3_MOUNT_RESERVATION 0x10000 /* Preallocation */ | 401 | #define EXT3_MOUNT_RESERVATION 0x10000 /* Preallocation */ |
| 410 | #define EXT3_MOUNT_BARRIER 0x20000 /* Use block barriers */ | 402 | #define EXT3_MOUNT_BARRIER 0x20000 /* Use block barriers */ |
| 411 | #define EXT3_MOUNT_NOBH 0x40000 /* No bufferheads */ | ||
| 412 | #define EXT3_MOUNT_QUOTA 0x80000 /* Some quota option set */ | 403 | #define EXT3_MOUNT_QUOTA 0x80000 /* Some quota option set */ |
| 413 | #define EXT3_MOUNT_USRQUOTA 0x100000 /* "old" user quota */ | 404 | #define EXT3_MOUNT_USRQUOTA 0x100000 /* "old" user quota */ |
| 414 | #define EXT3_MOUNT_GRPQUOTA 0x200000 /* "old" group quota */ | 405 | #define EXT3_MOUNT_GRPQUOTA 0x200000 /* "old" group quota */ |
| @@ -560,6 +551,31 @@ static inline int ext3_valid_inum(struct super_block *sb, unsigned long ino) | |||
| 560 | (ino >= EXT3_FIRST_INO(sb) && | 551 | (ino >= EXT3_FIRST_INO(sb) && |
| 561 | ino <= le32_to_cpu(EXT3_SB(sb)->s_es->s_inodes_count)); | 552 | ino <= le32_to_cpu(EXT3_SB(sb)->s_es->s_inodes_count)); |
| 562 | } | 553 | } |
| 554 | |||
| 555 | /* | ||
| 556 | * Inode dynamic state flags | ||
| 557 | */ | ||
| 558 | enum { | ||
| 559 | EXT3_STATE_JDATA, /* journaled data exists */ | ||
| 560 | EXT3_STATE_NEW, /* inode is newly created */ | ||
| 561 | EXT3_STATE_XATTR, /* has in-inode xattrs */ | ||
| 562 | EXT3_STATE_FLUSH_ON_CLOSE, /* flush dirty pages on close */ | ||
| 563 | }; | ||
| 564 | |||
| 565 | static inline int ext3_test_inode_state(struct inode *inode, int bit) | ||
| 566 | { | ||
| 567 | return test_bit(bit, &EXT3_I(inode)->i_state_flags); | ||
| 568 | } | ||
| 569 | |||
| 570 | static inline void ext3_set_inode_state(struct inode *inode, int bit) | ||
| 571 | { | ||
| 572 | set_bit(bit, &EXT3_I(inode)->i_state_flags); | ||
| 573 | } | ||
| 574 | |||
| 575 | static inline void ext3_clear_inode_state(struct inode *inode, int bit) | ||
| 576 | { | ||
| 577 | clear_bit(bit, &EXT3_I(inode)->i_state_flags); | ||
| 578 | } | ||
| 563 | #else | 579 | #else |
| 564 | /* Assume that user mode programs are passing in an ext3fs superblock, not | 580 | /* Assume that user mode programs are passing in an ext3fs superblock, not |
| 565 | * a kernel struct super_block. This will allow us to call the feature-test | 581 | * a kernel struct super_block. This will allow us to call the feature-test |
| @@ -851,7 +867,7 @@ extern int ext3_htree_store_dirent(struct file *dir_file, __u32 hash, | |||
| 851 | extern void ext3_htree_free_dir_info(struct dir_private_info *p); | 867 | extern void ext3_htree_free_dir_info(struct dir_private_info *p); |
| 852 | 868 | ||
| 853 | /* fsync.c */ | 869 | /* fsync.c */ |
| 854 | extern int ext3_sync_file (struct file *, struct dentry *, int); | 870 | extern int ext3_sync_file(struct file *, int); |
| 855 | 871 | ||
| 856 | /* hash.c */ | 872 | /* hash.c */ |
| 857 | extern int ext3fs_dirhash(const char *name, int len, struct | 873 | extern int ext3fs_dirhash(const char *name, int len, struct |
| @@ -877,9 +893,9 @@ int ext3_get_blocks_handle(handle_t *handle, struct inode *inode, | |||
| 877 | int create); | 893 | int create); |
| 878 | 894 | ||
| 879 | extern struct inode *ext3_iget(struct super_block *, unsigned long); | 895 | extern struct inode *ext3_iget(struct super_block *, unsigned long); |
| 880 | extern int ext3_write_inode (struct inode *, int); | 896 | extern int ext3_write_inode (struct inode *, struct writeback_control *); |
| 881 | extern int ext3_setattr (struct dentry *, struct iattr *); | 897 | extern int ext3_setattr (struct dentry *, struct iattr *); |
| 882 | extern void ext3_delete_inode (struct inode *); | 898 | extern void ext3_evict_inode (struct inode *); |
| 883 | extern int ext3_sync_inode (handle_t *, struct inode *); | 899 | extern int ext3_sync_inode (handle_t *, struct inode *); |
| 884 | extern void ext3_discard_reservation (struct inode *); | 900 | extern void ext3_discard_reservation (struct inode *); |
| 885 | extern void ext3_dirty_inode(struct inode *); | 901 | extern void ext3_dirty_inode(struct inode *); |
