#include <linux/iobuf.h>
+#ifndef OBD_EXT2_DEVICENAME
+#define OBD_EXT2_DEVICENAME "obdext2"
+#endif
+
struct ext2_obd {
struct super_block * ext2_sb;
};
/* bitmap.c */
unsigned long ext2_count_free(struct buffer_head * map, unsigned int numchars);
+/* dir.c */
+extern struct inode_operations ext2_dir_inode_operations;
+
+/* file.c */
+extern struct file_operations ext2_file_operations;
+extern struct inode_operations ext2_file_inode_operations;
+
/* fsync.c */
int ext2_sync_file(struct file * file, struct dentry *dentry);
#else
# undef ext2_debug
# define ext2_debug(format, a...) {}
-# define ext2_error(sb, func, format, a...) printk(KERN_ERR "%s: " format, func, ## a);
-# define ext2_panic(sb, func, format, a...) printk(KERN_CRIT "%s: " format, func, ## a);
-# define ext2_warning(sb, func, format, a...) printk(KERN_WARNING "%s: " format, func, ## a);
+# define ext2_error(sb, func, format, a...) printk(KERN_ERR "%s: " format, func, ## a)
+# define ext2_panic(sb, func, format, a...) printk(KERN_CRIT "%s: " format, func, ## a)
+# define ext2_warning(sb, func, format, a...) printk(KERN_WARNING "%s: " format, func, ## a)
#endif
-
+extern struct super_operations ext2_sops;
int obd_remount (struct super_block * sb, int * flags, char * data);
struct super_block * ext2_read_super (struct super_block * sb, void * data,
int silent);
/* truncate.c */
void obd_truncate (struct inode * inode);
-/* operations */
-/* dir.c */
-extern struct inode_operations ext2_dir_inode_operations;
-
-/* file.c */
-extern struct file_operations ext2_file_operations;
-extern struct inode_operations ext2_file_inode_operations;
-
-/* super.c */
-extern struct super_operations ext2_sops;
-
static inline struct page *addr_to_page(char *buf)
{
unsigned long addr = (unsigned long)buf;
return 0;
}
-
#endif
#include <linux/obd_class.h>
#include <linux/list.h>
-/* super.c */
-void obdfs_read_inode(struct inode *inode);
+struct obdfs_pgrq {
+ struct list_head rq_plist; /* linked list of req's */
+ unsigned long rq_jiffies;
+ struct page *rq_page; /* page to be written */
+};
+
+struct list_head obdfs_super_list; /* list of all OBDFS superblocks */
+
+struct obdfs_sb_info {
+ struct list_head osi_list; /* list of supers */
+ struct obd_conn osi_conn;
+ struct super_block *osi_super;
+ struct obd_device *osi_obd;
+ struct obd_ops *osi_ops;
+ ino_t osi_rootino; /* number of root inode */
+ int osi_minor; /* minor of /dev/obdX */
+ struct list_head osi_inodes; /* list of dirty inodes */
+ struct semaphore osi_list_mutex;
+};
+
+struct obdfs_inode_info {
+ int oi_flags;
+ struct list_head oi_inodes;
+ struct list_head oi_pages;
+ char oi_inline[OBD_INLINESZ];
+};
+
+/* dir.c */
+int obdfs_check_dir_entry (const char * function, struct inode * dir,
+ struct ext2_dir_entry_2 * de, struct page * page,
+ unsigned long offset);
+extern struct file_operations obdfs_dir_operations;
+extern struct inode_operations obdfs_dir_inode_operations;
+
+/* file.c */
+extern struct file_operations obdfs_file_operations;
+extern struct inode_operations obdfs_file_inode_operations;
/* flush.c */
int obdfs_flushd_init(void);
int obdfs_flush_reqs(struct list_head *inode_list, int check_time);
void obdfs_flush_dirty_pages(int check_time);
-/* rw.c */
-int obdfs_do_writepage(struct inode *, struct page *, int sync);
-int obdfs_init_pgrqcache(void);
-void obdfs_cleanup_pgrqcache(void);
-int obdfs_readpage(struct dentry *dentry, struct page *page);
-int obdfs_writepage(struct dentry *dentry, struct page *page);
-struct page *obdfs_getpage(struct inode *inode, unsigned long offset,
- int create, int locked);
-int obdfs_write_one_page(struct file *file, struct page *page,
- unsigned long offset, unsigned long bytes,
- const char * buf);
-void obdfs_dequeue_reqs(struct inode *inode);
-
/* namei.c */
struct dentry *obdfs_lookup(struct inode * dir, struct dentry *dentry);
int obdfs_create (struct inode * dir, struct dentry * dentry, int mode);
int obdfs_rename(struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry);
-/* dir.c */
-int obdfs_check_dir_entry (const char * function, struct inode * dir,
- struct ext2_dir_entry_2 * de, struct page * page,
- unsigned long offset);
-
-/* symlink.c */
-int obdfs_readlink (struct dentry *, char *, int);
-struct dentry *obdfs_follow_link(struct dentry *, struct dentry *,
- unsigned int);
-
-
-/* list of all OBDFS super blocks */
-struct list_head obdfs_super_list;
-
-struct obdfs_pgrq {
- struct list_head rq_plist; /* linked list of req's */
- unsigned long rq_jiffies;
- struct page *rq_page; /* page to be written */
-};
-
-
+/* rw.c */
+int obdfs_do_writepage(struct inode *, struct page *, int sync);
+int obdfs_init_pgrqcache(void);
+void obdfs_cleanup_pgrqcache(void);
inline void obdfs_pgrq_del(struct obdfs_pgrq *pgrq);
+int obdfs_readpage(struct dentry *dentry, struct page *page);
+int obdfs_writepage(struct dentry *dentry, struct page *page);
+struct page *obdfs_getpage(struct inode *inode, unsigned long offset,
+ int create, int locked);
+int obdfs_write_one_page(struct file *file, struct page *page,
+ unsigned long offset, unsigned long bytes,
+ const char * buf);
int obdfs_do_vec_wr(struct inode **inodes, obd_count num_io, obd_count num_oa,
struct obdo **obdos, obd_count *oa_bufs,
struct page **pages, char **bufs, obd_size *counts,
obd_off *offsets, obd_flag *flags);
+/* super.c */
-struct obdfs_sb_info {
- struct list_head osi_list; /* list of supers */
- struct obd_conn osi_conn;
- struct super_block *osi_super;
- struct obd_device *osi_obd;
- struct obd_ops *osi_ops;
- ino_t osi_rootino; /* number of root inode */
- int osi_minor; /* minor of /dev/obdX */
- struct list_head osi_inodes; /* list of dirty inodes */
- struct semaphore osi_list_mutex;
-};
+/* symlink.c */
+extern struct inode_operations obdfs_symlink_inode_operations;
+
+/* sysctl.c */
+void obdfs_sysctl_init(void);
+void obdfs_sysctl_clean(void);
-struct obdfs_inode_info {
- int oi_flags;
- struct list_head oi_inodes;
- struct list_head oi_pages;
- char oi_inline[OBD_INLINESZ];
-};
static inline struct obdfs_inode_info *obdfs_i2info(struct inode *inode)
{
/* obd_up(&obdfs_i2sbi(inode)->osi_list_mutex); */
}
-void obdfs_sysctl_init(void);
-void obdfs_sysctl_clean(void);
-
-extern struct file_operations obdfs_file_operations;
-extern struct inode_operations obdfs_file_inode_operations;
-extern struct inode_operations obdfs_dir_inode_operations;
-extern struct inode_operations obdfs_symlink_inode_operations;
-
static inline int obdfs_has_inline(struct inode *inode)
{
return (obdfs_i2info(inode)->oi_flags & OBD_FL_INLINEDATA);