1 #ifndef __LINUX_SYM_OBD_H
2 #define __LINUX_SYM_OBD_H
5 #include <linux/ext2_fs.h>
13 # define obd_debug(f, a...) { \
14 printk ("SYM OBD DEBUG (%s, %d): %s:", \
15 __FILE__, __LINE__, __FUNCTION__); \
19 # define obd_debug(f, a...) /**/
25 #define OBD_IOC_CREATE _IOR('f', 3, long)
26 #define OBD_IOC_SETUP _IOW('f', 4, long)
27 #define OBD_IOC_SYNC _IOR('f', 5, long)
30 int obd_new_block (const struct inode * inode, unsigned long goal,
31 u32 * prealloc_count, u32 * prealloc_block, int * err);
32 void obd_free_blocks (const struct inode * inode, unsigned long block,
34 unsigned long obd_count_free_blocks (struct super_block * sb);
35 int ext2_group_sparse(int group);
38 int obd_sync_file(struct file * file, struct dentry *dentry);
41 void obd_read_inode (struct inode * inode);
42 void obd_write_inode (struct inode * inode);
43 void obd_put_inode (struct inode * inode);
44 void obd_delete_inode (struct inode * inode);
45 void obd_discard_prealloc_blocks (struct inode * inode);
46 int obd_sync_inode (struct inode *inode);
47 struct buffer_head * obd_bread (struct inode * inode, int block,
48 int create, int *err);
49 struct buffer_head * obd_getblk (struct inode * inode, long block,
50 int create, int * err);
53 extern struct inode * obd_inode_new (int inode_hint, int * err);
54 extern void obd_inode_destroy (struct inode * inode);
55 extern unsigned long obd_count_free_inodes (struct super_block * sb);
56 extern void obd_check_inodes_bitmap (struct super_block * sb);
57 unsigned long obd_count_free_inodes (struct super_block * sb);
60 int obd_ioctl (struct inode * inode, struct file * filp, unsigned int cmd,
64 #define obd_error obd_warning
65 #define obd_panic obd_warning
66 extern void obd_warning (struct super_block *, const char *, const char *, ...)
67 __attribute__ ((format (printf, 3, 4)));
68 int obd_remount (struct super_block * sb, int * flags, char * data);
69 struct super_block * obd_read_super (struct super_block * sb, void * data,
73 void obd_truncate (struct inode * inode);
77 extern struct inode_operations obd_dir_inode_operations;
80 extern struct inode_operations obd_file_inode_operations;
82 #endif /* __LINUX_SYM_OBD_H */