Whamcloud - gitweb
include/linux/*.h: turn of debugging output, minor reorg
authoradilger <adilger>
Fri, 25 Feb 2000 06:37:25 +0000 (06:37 +0000)
committeradilger <adilger>
Fri, 25 Feb 2000 06:37:25 +0000 (06:37 +0000)
lustre/include/linux/obd_ext2.h
lustre/include/linux/obd_raid1.h
lustre/include/linux/obd_snap.h
lustre/include/linux/obd_support.h
lustre/include/linux/obdfs.h

index 4ced671..270364a 100644 (file)
@@ -5,6 +5,10 @@
 
 #include <linux/iobuf.h>
 
+#ifndef OBD_EXT2_DEVICENAME
+#define OBD_EXT2_DEVICENAME "obdext2"
+#endif
+
 struct ext2_obd {
        struct super_block * ext2_sb;
 };
@@ -31,6 +35,13 @@ struct ext2_group_desc * ext2_get_group_desc(struct super_block * 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);
 
@@ -57,12 +68,12 @@ inline long ext2_block_map (struct inode * inode, long block);
 #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);
@@ -70,17 +81,6 @@ struct super_block * ext2_read_super (struct super_block * sb, void * data,
 /* 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;
@@ -96,5 +96,4 @@ static inline struct page *addr_to_page(char *buf)
                return 0;
 }
 
-
 #endif
index 469f209..d668fca 100644 (file)
@@ -5,6 +5,9 @@
 
 #define MAX_RAID1 16
 
+#ifndef OBD_RAID1_DEVICENAME
+#define OBD_RAID1_DEVICENAME "obdraid1"
+#endif
 
 struct raid1_obd {
        unsigned int raid1_count; /* how many replicas */
index 9d1ba8c..74890c5 100644 (file)
@@ -3,6 +3,10 @@
 
 #define OBD_SNAP_MAGIC 0xfffffff3   /* an unlikely block number */
 
+#ifndef OBD_SNAP_DEVICENAME
+#define OBD_SNAP_DEVICENAME "obdsnap"
+#endif
+
 /* ioctls for manipulating snapshots 40 - 60 */
 #define OBD_SNAP_SETTABLE      _IOWR('f', 40, long)
 #define OBD_SNAP_PRINTTABLE    _IOWR('f', 41, long)
index ca9118a..2039928 100644 (file)
@@ -4,7 +4,7 @@
 #include <linux/malloc.h>
 #include <linux/vmalloc.h>
 
-#define EXT2_OBD_DEBUG
+#undef EXT2_OBD_DEBUG
 
 
 #define MIN(a,b) (((a)<(b)) ? (a): (b))
index 474a5e3..e1009fd 100644 (file)
 #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);
@@ -23,19 +58,6 @@ int obdfs_flushd_cleanup(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);
@@ -50,52 +72,32 @@ int obdfs_link(struct dentry *old_dentry, struct inode *dir,
 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)
 {
@@ -161,14 +163,6 @@ static inline void obdfs_print_plist(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);