4 #define OBD_EXT2_RUNIT _IOWR('f', 61, long)
6 #include <linux/iobuf.h>
9 struct super_block * ext2_sb;
13 /* development definitions */
14 extern struct obdfs_sb_info *obd_sbi;
15 extern struct file_operations *obd_fso;
18 extern struct obd_ops ext2_obd_ops;
21 int ext2_new_block (const struct inode * inode, unsigned long goal,
22 u32 * prealloc_count, u32 * prealloc_block, int * err);
23 void ext2_free_blocks (const struct inode * inode, unsigned long block,
25 unsigned long ext2_count_free_blocks (struct super_block * sb);
26 int ext2_group_sparse(int group);
27 struct ext2_group_desc * ext2_get_group_desc(struct super_block * sb,
28 unsigned int block_group,
29 struct buffer_head ** bh);
32 unsigned long ext2_count_free(struct buffer_head * map, unsigned int numchars);
35 int ext2_sync_file(struct file * file, struct dentry *dentry);
38 void ext2_free_inode (struct inode * inode);
39 struct inode * ext2_new_inode (const struct inode * dir, int mode,
41 unsigned long ext2_count_free_inodes (struct super_block * sb);
42 void ext2_check_inodes_bitmap (struct super_block * sb);
43 int load_inode_bitmap (struct super_block * sb,
44 unsigned int block_group);
47 inline long ext2_block_map (struct inode * inode, long block);
51 #define ext2_warning obd_warning
53 #define ext2_error obd_warning
54 #define ext2_panic obd_warning
57 # define ext2_debug(format, a...) CDEBUG(D_EXT2, format, ## a)
60 #define obd_error obd_warning
61 #define obd_panic obd_warning
62 #define obd_warning(sb, func, format, a...) CDEBUG(D_WARNING, format, ## a)
64 int obd_remount (struct super_block * sb, int * flags, char * data);
65 struct super_block * ext2_read_super (struct super_block * sb, void * data,
69 void obd_truncate (struct inode * inode);
73 extern struct inode_operations ext2_dir_inode_operations;
76 extern struct file_operations ext2_file_operations;
77 extern struct inode_operations ext2_file_inode_operations;
80 extern struct super_operations ext2_sops;
82 static inline struct page *addr_to_page(char *buf)
84 unsigned long addr = (unsigned long)buf;
87 #ifdef CONFIG_DISCONTIGMEM
88 if (addr == 0) return;
90 map_nr = MAP_NR(addr);
91 if (map_nr < max_mapnr)
92 return mem_map + map_nr;