Whamcloud - gitweb
d76b90f41136bec73e5a0f971c54f880c9d22dfb
[fs/lustre-release.git] / lustre / include / linux / obd_ext2.h
1 #ifndef _OBD_EXT2
2 #define _OBD_EXT2
3
4 #define OBD_EXT2_RUNIT           _IOWR('f', 61, long)
5
6
7 struct ext2_obd {
8         struct super_block * ext2_sb;
9 };
10
11
12 /* development definitions */
13 extern struct obdfs_sb_info *obd_sbi;
14 extern struct file_operations *obd_fso;
15
16 /* ext2_obd.c */
17 extern struct obd_ops ext2_obd_ops;
18
19 /* balloc.c */
20 int ext2_new_block (const struct inode * inode, unsigned long goal,
21                    u32 * prealloc_count, u32 * prealloc_block, int * err);
22 void ext2_free_blocks (const struct inode * inode, unsigned long block,
23                       unsigned long count);
24 unsigned long ext2_count_free_blocks (struct super_block * sb);
25 int ext2_group_sparse(int group);
26 struct ext2_group_desc * ext2_get_group_desc(struct super_block * sb,
27                                              unsigned int block_group,
28                                              struct buffer_head ** bh);
29
30 /* bitmap.c */
31 unsigned long ext2_count_free(struct buffer_head * map, unsigned int numchars);
32
33 /* fsync.c */
34 int ext2_sync_file(struct file * file, struct dentry *dentry);
35
36 /* ialloc.c */
37 void ext2_free_inode (struct inode * inode);
38 struct inode * ext2_new_inode (const struct inode * dir, int mode,
39                                      int * err);
40 unsigned long ext2_count_free_inodes (struct super_block * sb);
41 void ext2_check_inodes_bitmap (struct super_block * sb);
42 int load_inode_bitmap (struct super_block * sb,
43                               unsigned int block_group);
44
45 /* inode.c */
46 inline long ext2_block_map (struct inode * inode, long block);
47
48
49 /* super.c */
50 #define ext2_warning obd_warning
51 #undef ext2_error
52 #define ext2_error obd_warning
53 #define ext2_panic obd_warning
54 #ifdef EXT2FS_DEBUG
55 #  undef ext2_debug
56 #  define ext2_debug(format, a...) CDEBUG(D_EXT2, format, ## a)
57 #endif
58
59 #define obd_error obd_warning
60 #define obd_panic obd_warning
61 #define obd_warning(sb, func, format, a...) CDEBUG(D_WARNING, format, ## a)
62
63 int obd_remount (struct super_block * sb, int * flags, char * data);
64 struct super_block * ext2_read_super (struct super_block * sb, void * data,
65                                       int silent);
66
67 /* truncate.c */
68 void obd_truncate (struct inode * inode);
69
70 /* operations */
71 /* dir.c */
72 extern struct inode_operations ext2_dir_inode_operations;
73
74 /* file.c */
75 extern struct file_operations ext2_file_operations;
76 extern struct inode_operations ext2_file_inode_operations;
77
78 /* super.c */
79 extern struct super_operations ext2_sops;
80
81 #endif