4 #define OBD_EXT2_RUNIT _IOWR('f', 61, long)
6 #include <linux/iobuf.h>
8 #ifndef OBD_EXT2_DEVICENAME
9 #define OBD_EXT2_DEVICENAME "obdext2"
13 struct super_block * ext2_sb;
17 /* development definitions */
18 extern struct obdfs_sb_info *obd_sbi;
19 extern struct file_operations *obd_fso;
22 extern struct obd_ops ext2_obd_ops;
25 int ext2_new_block (const struct inode * inode, unsigned long goal,
26 u32 * prealloc_count, u32 * prealloc_block, int * err);
27 void ext2_free_blocks (const struct inode * inode, unsigned long block,
29 unsigned long ext2_count_free_blocks (struct super_block * sb);
30 int ext2_group_sparse(int group);
31 struct ext2_group_desc * ext2_get_group_desc(struct super_block * sb,
32 unsigned int block_group,
33 struct buffer_head ** bh);
36 unsigned long ext2_count_free(struct buffer_head * map, unsigned int numchars);
39 extern struct inode_operations ext2_dir_inode_operations;
42 extern struct file_operations ext2_file_operations;
43 extern struct inode_operations ext2_file_inode_operations;
46 int ext2_sync_file(struct file * file, struct dentry *dentry);
49 void ext2_free_inode (struct inode * inode);
50 struct inode * ext2_new_inode (const struct inode * dir, int mode,
52 unsigned long ext2_count_free_inodes (struct super_block * sb);
53 void ext2_check_inodes_bitmap (struct super_block * sb);
54 int load_inode_bitmap (struct super_block * sb,
55 unsigned int block_group);
58 inline long ext2_block_map (struct inode * inode, long block);
64 # define ext2_debug(format, a...) CDEBUG(D_EXT2, format, ## a)
65 # define ext2_error ext2_warning
66 # define ext2_panic ext2_warning
67 # define ext2_warning(sb, func, format, a...) CDEBUG(D_WARNING, format, ## a)
70 # define ext2_debug(format, a...) {}
71 # define ext2_error(sb, func, format, a...) printk(KERN_ERR "%s: " format, func, ## a)
72 # define ext2_panic(sb, func, format, a...) printk(KERN_CRIT "%s: " format, func, ## a)
73 # define ext2_warning(sb, func, format, a...) printk(KERN_WARNING "%s: " format, func, ## a)
76 extern struct super_operations ext2_sops;
77 int obd_remount (struct super_block * sb, int * flags, char * data);
78 struct super_block * ext2_read_super (struct super_block * sb, void * data,
82 void obd_truncate (struct inode * inode);
84 static inline struct page *addr_to_page(char *buf)
86 unsigned long addr = (unsigned long)buf;
89 #ifdef CONFIG_DISCONTIGMEM
90 if (addr == 0) return;
92 map_nr = MAP_NR(addr);
93 if (map_nr < max_mapnr)
94 return mem_map + map_nr;