Whamcloud - gitweb
Updated parameters for obdfs_writepage() to use struct *dentry instead of
[fs/lustre-release.git] / lustre / include / linux / obd_raid1.h
1 #ifndef _OBD_RAID1
2 #define _OBD_RAID1
3
4 #include <linux/obd_class.h>
5
6 #define MAX_RAID1 16
7
8
9 struct raid1_obd {
10         unsigned int raid1_count; /* how many replicas */
11         /* devices to replicate on */
12         struct obd_device *raid1_devlist[MAX_RAID1];
13         /* connections we make */
14         struct obd_conn_info raid1_connections[MAX_RAID1];
15         struct list_head raid1_clients;  /* clients we have */
16 };
17
18
19 /* development definitions */
20 extern struct obdfs_sb_info *obd_sbi;
21 extern struct file_operations *obd_fso;
22
23 /* obd_raid1.c */
24 extern struct obd_ops raid1_obd_ops;
25 inline long ext2_block_map (struct inode * inode, long block);
26
27 /* balloc.c */
28 int ext2_new_block (const struct inode * inode, unsigned long goal,
29                    u32 * prealloc_count, u32 * prealloc_block, int * err);
30 void ext2_free_blocks (const struct inode * inode, unsigned long block,
31                       unsigned long count);
32 unsigned long ext2_count_free_blocks (struct super_block * sb);
33 int ext2_group_sparse(int group);
34 struct ext2_group_desc * ext2_get_group_desc(struct super_block * sb,
35                                              unsigned int block_group,
36                                              struct buffer_head ** bh);
37
38 /* bitmap.c */
39 unsigned long ext2_count_free(struct buffer_head * map, unsigned int numchars);
40
41 /* fsync.c */
42 extern int obd_sync_file(struct file * file, struct dentry *dentry);
43
44 /* ialloc.c */
45 extern void ext2_free_inode (struct inode * inode);
46 extern struct inode * ext2_new_inode (const struct inode * dir, int mode,
47                                      int * err);
48 extern unsigned long ext2_count_free_inodes (struct super_block * sb);
49 extern void ext2_check_inodes_bitmap (struct super_block * sb);
50 extern int load_inode_bitmap (struct super_block * sb,
51                               unsigned int block_group);
52
53 /* inode.c */
54 void obd_read_inode (struct inode * inode);
55 void obd_write_inode (struct inode * inode);
56 void obd_put_inode (struct inode * inode);
57 void obd_delete_inode (struct inode * inode);
58 void obd_discard_prealloc_blocks (struct inode * inode);
59 int obd_sync_inode (struct inode *inode);
60 struct buffer_head * obd_bread (struct inode * inode, int block, 
61                                 int create, int *err);
62 struct buffer_head * obd_getblk (struct inode * inode, long block,
63                                  int create, int * err);
64
65
66 /* super.c */
67 #define ext2_warning obd_warning
68 #undef ext2_error
69 #define ext2_error obd_warning
70 #define ext2_panic obd_warning
71 #ifdef EXT2FS_DEBUG
72 #  undef ext2_debug
73 #  define ext2_debug(format, a...) CDEBUG(D_EXT2, format, ## a)
74 #endif
75
76 #define obd_error obd_warning
77 #define obd_panic obd_warning
78 #define obd_warning(sb, func, format, a...) CDEBUG(D_WARNING, format, ## a)
79
80 int obd_remount (struct super_block * sb, int * flags, char * data);
81 struct super_block * ext2_read_super (struct super_block * sb, void * data,
82                                       int silent);
83
84 /* truncate.c */
85 void obd_truncate (struct inode * inode);
86
87 /* operations */
88 /* dir.c */
89 extern struct inode_operations ext2_dir_inode_operations;
90
91 /* file.c */
92 extern struct file_operations ext2_file_operations;
93 extern struct inode_operations ext2_file_inode_operations;
94
95 /* super.c */
96 extern struct super_operations ext2_sops;
97
98 #endif