5 extern struct obd_ops sim_obd_ops;
6 inline long ext2_block_map (struct inode * inode, long block);
9 int ext2_new_block (const struct inode * inode, unsigned long goal,
10 u32 * prealloc_count, u32 * prealloc_block, int * err);
11 void ext2_free_blocks (const struct inode * inode, unsigned long block,
13 unsigned long ext2_count_free_blocks (struct super_block * sb);
14 int ext2_group_sparse(int group);
15 struct ext2_group_desc * ext2_get_group_desc(struct super_block * sb,
16 unsigned int block_group,
17 struct buffer_head ** bh);
20 unsigned long ext2_count_free(struct buffer_head * map, unsigned int numchars);
23 extern int obd_sync_file(struct file * file, struct dentry *dentry);
26 extern void ext2_free_inode (struct inode * inode);
27 extern struct inode * ext2_new_inode (const struct inode * dir, int mode,
29 extern unsigned long ext2_count_free_inodes (struct super_block * sb);
30 extern void ext2_check_inodes_bitmap (struct super_block * sb);
31 extern int load_inode_bitmap (struct super_block * sb,
32 unsigned int block_group);
35 void obd_read_inode (struct inode * inode);
36 void obd_write_inode (struct inode * inode);
37 void obd_put_inode (struct inode * inode);
38 void obd_delete_inode (struct inode * inode);
39 void obd_discard_prealloc_blocks (struct inode * inode);
40 int obd_sync_inode (struct inode *inode);
41 struct buffer_head * obd_bread (struct inode * inode, int block,
42 int create, int *err);
43 struct buffer_head * obd_getblk (struct inode * inode, long block,
44 int create, int * err);
47 void obd_cleanup_device(int dev);
48 extern int obd_create (struct obd_device *, int inode_hint, int * err);
49 extern void obd_unlink (struct inode * inode);
50 extern struct obd_client * obd_client(int cli_id);
51 extern void obd_cleanup_client (struct obd_device * obddev,
52 struct obd_client * cli);
53 void obd_cleanup_device(int dev);
54 int obd_cleanup_super(struct obd_device * obddev);
55 int obd_setup_super(struct obd_device * obddev, void *data);
56 long obd_preallocate_inodes(unsigned int conn_id,
57 int req, long inodes[32], int * err);
58 long obd_preallocate_quota(struct super_block * sb, struct obd_client * cli,
59 unsigned long req, int * err);
60 int obd_connect (int minor, struct obd_conn_info * conninfo);
61 int obd_disconnect (unsigned int conn_id);
62 int obd_setattr(unsigned int conn_id, unsigned long ino, struct iattr * iattr);
63 int obd_getattr(unsigned int conn_id, unsigned long ino, struct iattr * iattr);
64 int obd_destroy(unsigned int conn_id, unsigned long ino);
65 int obd_statfs(unsigned int conn_id, struct statfs * statfs);
66 unsigned long obd_read(unsigned int conn_id, unsigned long ino, char * buf,
67 unsigned long count, loff_t offset, int * err);
68 unsigned long obd_write (unsigned int conn_id, unsigned long ino, char * buf,
69 unsigned long count, loff_t offset, int * err);
73 #define ext2_warning obd_warning
75 #define ext2_error obd_warning
76 #define ext2_panic obd_warning
79 # define ext2_debug(format, a...) CDEBUG(D_EXT2, format, ## a)
82 #define obd_error obd_warning
83 #define obd_panic obd_warning
84 #define obd_warning(sb, func, format, a...) CDEBUG(D_WARNING, format, ## a)
86 int obd_remount (struct super_block * sb, int * flags, char * data);
87 struct super_block * ext2_read_super (struct super_block * sb, void * data,
91 void obd_truncate (struct inode * inode);
95 extern struct inode_operations ext2_dir_inode_operations;
98 extern struct file_operations ext2_file_operations;
99 extern struct inode_operations ext2_file_inode_operations;
102 extern struct super_operations ext2_sops;