[PATCH] x86-64 - new memory map handling
[linux-2.6/history.git] / fs / ext2 / ext2.h
blob3d2431e6b91a4875e7e66332d723052376e42233
1 #include <linux/fs.h>
2 #include <linux/ext2_fs.h>
4 /*
5 * second extended file system inode data in memory
6 */
7 struct ext2_inode_info {
8 __u32 i_data[15];
9 __u32 i_flags;
10 __u32 i_faddr;
11 __u8 i_frag_no;
12 __u8 i_frag_size;
13 __u32 i_file_acl;
14 __u32 i_dir_acl;
15 __u32 i_dtime;
16 __u32 i_block_group;
17 __u32 i_next_alloc_block;
18 __u32 i_next_alloc_goal;
19 __u32 i_prealloc_block;
20 __u32 i_prealloc_count;
21 __u32 i_dir_start_lookup;
22 rwlock_t i_meta_lock;
23 struct inode vfs_inode;
27 * Function prototypes
31 * Ok, these declarations are also in <linux/kernel.h> but none of the
32 * ext2 source programs needs to include it so they are duplicated here.
35 static inline struct ext2_inode_info *EXT2_I(struct inode *inode)
37 return container_of(inode, struct ext2_inode_info, vfs_inode);
40 /* balloc.c */
41 extern int ext2_bg_has_super(struct super_block *sb, int group);
42 extern unsigned long ext2_bg_num_gdb(struct super_block *sb, int group);
43 extern int ext2_new_block (struct inode *, unsigned long,
44 __u32 *, __u32 *, int *);
45 extern void ext2_free_blocks (struct inode *, unsigned long,
46 unsigned long);
47 extern unsigned long ext2_count_free_blocks (struct super_block *);
48 extern void ext2_check_blocks_bitmap (struct super_block *);
49 extern struct ext2_group_desc * ext2_get_group_desc(struct super_block * sb,
50 unsigned int block_group,
51 struct buffer_head ** bh);
53 /* dir.c */
54 extern int ext2_add_link (struct dentry *, struct inode *);
55 extern ino_t ext2_inode_by_name(struct inode *, struct dentry *);
56 extern int ext2_make_empty(struct inode *, struct inode *);
57 extern struct ext2_dir_entry_2 * ext2_find_entry (struct inode *,struct dentry *, struct page **);
58 extern int ext2_delete_entry (struct ext2_dir_entry_2 *, struct page *);
59 extern int ext2_empty_dir (struct inode *);
60 extern struct ext2_dir_entry_2 * ext2_dotdot (struct inode *, struct page **);
61 extern void ext2_set_link(struct inode *, struct ext2_dir_entry_2 *, struct page *, struct inode *);
63 /* fsync.c */
64 extern int ext2_sync_file (struct file *, struct dentry *, int);
66 /* ialloc.c */
67 extern struct inode * ext2_new_inode (struct inode *, int);
68 extern void ext2_free_inode (struct inode *);
69 extern unsigned long ext2_count_free_inodes (struct super_block *);
70 extern void ext2_check_inodes_bitmap (struct super_block *);
71 extern unsigned long ext2_count_free (struct buffer_head *, unsigned);
73 /* inode.c */
74 extern void ext2_read_inode (struct inode *);
75 extern void ext2_write_inode (struct inode *, int);
76 extern void ext2_put_inode (struct inode *);
77 extern void ext2_delete_inode (struct inode *);
78 extern int ext2_sync_inode (struct inode *);
79 extern void ext2_discard_prealloc (struct inode *);
80 extern void ext2_truncate (struct inode *);
82 /* ioctl.c */
83 extern int ext2_ioctl (struct inode *, struct file *, unsigned int,
84 unsigned long);
86 /* super.c */
87 extern void ext2_error (struct super_block *, const char *, const char *, ...)
88 __attribute__ ((format (printf, 3, 4)));
89 extern NORET_TYPE void ext2_panic (struct super_block *, const char *,
90 const char *, ...)
91 __attribute__ ((NORET_AND format (printf, 3, 4)));
92 extern void ext2_warning (struct super_block *, const char *, const char *, ...)
93 __attribute__ ((format (printf, 3, 4)));
94 extern void ext2_update_dynamic_rev (struct super_block *sb);
95 extern void ext2_write_super (struct super_block *);
98 * Inodes and files operations
101 /* dir.c */
102 extern struct file_operations ext2_dir_operations;
104 /* file.c */
105 extern struct inode_operations ext2_file_inode_operations;
106 extern struct file_operations ext2_file_operations;
108 /* inode.c */
109 extern struct address_space_operations ext2_aops;
111 /* namei.c */
112 extern struct inode_operations ext2_dir_inode_operations;
114 /* symlink.c */
115 extern struct inode_operations ext2_fast_symlink_inode_operations;