2 #include <linux/ext2_fs.h>
5 * second extended file system inode data in memory
7 struct ext2_inode_info
{
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
;
23 struct inode vfs_inode
;
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
);
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,
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
);
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
*);
64 extern int ext2_sync_file (struct file
*, struct dentry
*, int);
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);
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
*);
83 extern int ext2_ioctl (struct inode
*, struct file
*, unsigned int,
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 *,
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
102 extern struct file_operations ext2_dir_operations
;
105 extern struct inode_operations ext2_file_inode_operations
;
106 extern struct file_operations ext2_file_operations
;
109 extern struct address_space_operations ext2_aops
;
112 extern struct inode_operations ext2_dir_inode_operations
;
115 extern struct inode_operations ext2_fast_symlink_inode_operations
;