[GFS2] Make headers compile on their own
authorSteven Whitehouse <swhiteho@redhat.com>
Tue, 5 Sep 2006 14:39:21 +0000 (10:39 -0400)
committerSteven Whitehouse <swhiteho@redhat.com>
Tue, 5 Sep 2006 14:39:21 +0000 (10:39 -0400)
As per Jan Engelhardt's comments, this should make all the headers
compile on their own by including and/or declaring structures
early.

Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
27 files changed:
fs/gfs2/acl.h
fs/gfs2/bmap.h
fs/gfs2/dir.h
fs/gfs2/eaops.h
fs/gfs2/eattr.h
fs/gfs2/glock.h
fs/gfs2/glops.h
fs/gfs2/incore.h
fs/gfs2/lm.h
fs/gfs2/log.h
fs/gfs2/lops.h
fs/gfs2/meta_io.h
fs/gfs2/mount.h
fs/gfs2/ops_address.h
fs/gfs2/ops_dentry.h
fs/gfs2/ops_file.h
fs/gfs2/ops_fstype.h
fs/gfs2/ops_inode.h
fs/gfs2/ops_super.h
fs/gfs2/ops_vm.h
fs/gfs2/quota.h
fs/gfs2/recovery.h
fs/gfs2/rgrp.h
fs/gfs2/super.h
fs/gfs2/sys.h
fs/gfs2/trans.h
fs/gfs2/util.h

index 5856ba7..05c294f 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef __ACL_DOT_H__
 #define __ACL_DOT_H__
 
+#include "incore.h"
+
 #define GFS2_POSIX_ACL_ACCESS          "posix_acl_access"
 #define GFS2_POSIX_ACL_ACCESS_LEN      16
 #define GFS2_POSIX_ACL_DEFAULT         "posix_acl_default"
index cb3b624..503f1cd 100644 (file)
 #ifndef __BMAP_DOT_H__
 #define __BMAP_DOT_H__
 
+struct inode;
+struct gfs2_inode;
+struct page;
+
 int gfs2_unstuff_dinode(struct gfs2_inode *ip, struct page *page);
 int gfs2_block_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, int *boundary);
 int gfs2_extent_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, unsigned *extlen);
index d32449f..3712334 100644 (file)
 #ifndef __DIR_DOT_H__
 #define __DIR_DOT_H__
 
+#include <linux/dcache.h>
+
+struct inode;
+struct gfs2_inode;
+struct gfs2_inum;
+
 /**
  * gfs2_filldir_t - Report a directory entry to the caller of gfs2_dir_read()
  * @opaque: opaque data used by the function
index 1c27700..b045897 100644 (file)
@@ -11,6 +11,7 @@
 #define __EAOPS_DOT_H__
 
 struct gfs2_ea_request;
+struct gfs2_inode;
 
 struct gfs2_eattr_operations {
        int (*eo_get) (struct gfs2_inode *ip, struct gfs2_ea_request *er);
index 85c70c3..cb7c2d8 100644 (file)
@@ -10,6 +10,9 @@
 #ifndef __EATTR_DOT_H__
 #define __EATTR_DOT_H__
 
+struct gfs2_inode;
+struct iattr;
+
 #define GFS2_EA_REC_LEN(ea) be32_to_cpu((ea)->ea_rec_len)
 #define GFS2_EA_DATA_LEN(ea) be32_to_cpu((ea)->ea_data_len)
 
index 4762cdb..2e1d328 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef __GLOCK_DOT_H__
 #define __GLOCK_DOT_H__
 
+#include "incore.h"
+
 /* Flags for lock requests; used in gfs2_holder gh_flag field.
    From lm_interface.h:
 #define LM_FLAG_TRY            0x00000001
index ba943e4..a1d9b5b 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef __GLOPS_DOT_H__
 #define __GLOPS_DOT_H__
 
+#include "incore.h"
+
 extern const struct gfs2_glock_operations gfs2_meta_glops;
 extern const struct gfs2_glock_operations gfs2_inode_glops;
 extern const struct gfs2_glock_operations gfs2_rgrp_glops;
index 407afd1..225924c 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef __INCORE_DOT_H__
 #define __INCORE_DOT_H__
 
+#include <linux/fs.h>
+
 #define DIO_FORCE      0x00000001
 #define DIO_CLEAN      0x00000002
 #define DIO_DIRTY      0x00000004
index dbef888..6b890e7 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef __LM_DOT_H__
 #define __LM_DOT_H__
 
+struct gfs2_sbd;
+
 #define GFS2_MIN_LVB_SIZE 32
 
 int gfs2_lm_mount(struct gfs2_sbd *sdp, int silent);
index 80764e3..7f5737d 100644 (file)
 #ifndef __LOG_DOT_H__
 #define __LOG_DOT_H__
 
+#include <linux/list.h>
+#include <linux/spinlock.h>
+#include "incore.h"
+
 /**
  * gfs2_log_lock - acquire the right to mess with the log manager
  * @sdp: the filesystem
index 2e3365c..5839c05 100644 (file)
@@ -10,6 +10,9 @@
 #ifndef __LOPS_DOT_H__
 #define __LOPS_DOT_H__
 
+#include <linux/list.h>
+#include "incore.h"
+
 extern const struct gfs2_log_operations gfs2_glock_lops;
 extern const struct gfs2_log_operations gfs2_buf_lops;
 extern const struct gfs2_log_operations gfs2_revoke_lops;
index 9a9acc9..086a472 100644 (file)
 #ifndef __DIO_DOT_H__
 #define __DIO_DOT_H__
 
+#include <linux/buffer_head.h>
+#include <linux/string.h>
+#include "incore.h"
+
 static inline void gfs2_buffer_clear(struct buffer_head *bh)
 {
        memset(bh->b_data, 0, bh->b_size);
index 8a21897..401288a 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef __MOUNT_DOT_H__
 #define __MOUNT_DOT_H__
 
+struct gfs2_sbd;
+
 int gfs2_mount_args(struct gfs2_sbd *sdp, char *data_arg, int remount);
 
 #endif /* __MOUNT_DOT_H__ */
index 6c07aa2..35aaee4 100644 (file)
 #ifndef __OPS_ADDRESS_DOT_H__
 #define __OPS_ADDRESS_DOT_H__
 
+#include <linux/fs.h>
+#include <linux/buffer_head.h>
+#include <linux/mm.h>
+
 extern const struct address_space_operations gfs2_file_aops;
 extern int gfs2_get_block(struct inode *inode, sector_t lblock,
                          struct buffer_head *bh_result, int create);
index e7b05e5..5caa3db 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef __OPS_DENTRY_DOT_H__
 #define __OPS_DENTRY_DOT_H__
 
+#include <linux/dcache.h>
+
 extern struct dentry_operations gfs2_dops;
 
 #endif /* __OPS_DENTRY_DOT_H__ */
index b1c1bf8..ce319f8 100644 (file)
@@ -9,6 +9,10 @@
 
 #ifndef __OPS_FILE_DOT_H__
 #define __OPS_FILE_DOT_H__
+
+#include <linux/fs.h>
+struct gfs2_inode;
+
 extern struct file gfs2_internal_file_sentinel;
 extern int gfs2_internal_read(struct gfs2_inode *ip,
                              struct file_ra_state *ra_state,
index b85ecce..7cc2c29 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef __OPS_FSTYPE_DOT_H__
 #define __OPS_FSTYPE_DOT_H__
 
+#include <linux/fs.h>
+
 extern struct file_system_type gfs2_fs_type;
 extern struct file_system_type gfs2meta_fs_type;
 
index 6f4b547..b15acb4 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef __OPS_INODE_DOT_H__
 #define __OPS_INODE_DOT_H__
 
+#include <linux/fs.h>
+
 extern struct inode_operations gfs2_file_iops;
 extern struct inode_operations gfs2_dir_iops;
 extern struct inode_operations gfs2_symlink_iops;
index cbc4f73..9de73f0 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef __OPS_SUPER_DOT_H__
 #define __OPS_SUPER_DOT_H__
 
+#include <linux/fs.h>
+
 extern struct super_operations gfs2_super_ops;
 
 #endif /* __OPS_SUPER_DOT_H__ */
index d5ba4b9..4ae8f43 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef __OPS_VM_DOT_H__
 #define __OPS_VM_DOT_H__
 
+#include <linux/mm.h>
+
 extern struct vm_operations_struct gfs2_vm_ops_private;
 extern struct vm_operations_struct gfs2_vm_ops_sharewrite;
 
index d93c61c..a8be141 100644 (file)
@@ -10,6 +10,9 @@
 #ifndef __QUOTA_DOT_H__
 #define __QUOTA_DOT_H__
 
+struct gfs2_inode;
+struct gfs2_sbd;
+
 #define NO_QUOTA_CHANGE ((u32)-1)
 
 int gfs2_quota_hold(struct gfs2_inode *ip, u32 uid, u32 gid);
index 1b35516..961feed 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef __RECOVERY_DOT_H__
 #define __RECOVERY_DOT_H__
 
+#include "incore.h"
+
 static inline void gfs2_replay_incr_blk(struct gfs2_sbd *sdp, unsigned int *blk)
 {
        if (++*blk == sdp->sd_jdesc->jd_blocks)
index 3d6ae37..3558957 100644 (file)
 #ifndef __RGRP_DOT_H__
 #define __RGRP_DOT_H__
 
+struct gfs2_rgrpd;
+struct gfs2_sbd;
+struct gfs2_holder;
+
 void gfs2_rgrp_verify(struct gfs2_rgrpd *rgd);
 
 struct gfs2_rgrpd *gfs2_blk2rgrpd(struct gfs2_sbd *sdp, u64 blk);
index b073300..5fa5119 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef __SUPER_DOT_H__
 #define __SUPER_DOT_H__
 
+#include "incore.h"
+
 void gfs2_tune_init(struct gfs2_tune *gt);
 
 int gfs2_check_sb(struct gfs2_sbd *sdp, struct gfs2_sb *sb, int silent);
index f8c01b5..1ca8cda 100644 (file)
@@ -10,6 +10,9 @@
 #ifndef __SYS_DOT_H__
 #define __SYS_DOT_H__
 
+#include <linux/spinlock.h>
+struct gfs2_sbd;
+
 /* Allow args to be passed to GFS2 when using an initial ram disk */
 extern char *gfs2_sys_margs;
 extern spinlock_t gfs2_sys_margs_lock;
index 6550d3d..23d4cbe 100644 (file)
 #ifndef __TRANS_DOT_H__
 #define __TRANS_DOT_H__
 
+#include <linux/buffer_head.h>
+struct gfs2_sbd;
+struct gfs2_rgrpd;
+struct gfs2_glock;
+
 #define RES_DINODE     1
 #define RES_INDIRECT   1
 #define RES_JDATA      1
@@ -20,8 +25,8 @@
 #define RES_STATFS     1
 #define RES_QUOTA      2
 
-int gfs2_trans_begin(struct gfs2_sbd *sdp,
-                     unsigned int blocks, unsigned int revokes);
+int gfs2_trans_begin(struct gfs2_sbd *sdp, unsigned int blocks,
+                    unsigned int revokes);
 
 void gfs2_trans_end(struct gfs2_sbd *sdp);
 
index 204fdb8..76a5089 100644 (file)
@@ -10,6 +10,7 @@
 #ifndef __UTIL_DOT_H__
 #define __UTIL_DOT_H__
 
+#include "incore.h"
 
 #define fs_printk(level, fs, fmt, arg...) \
        printk(level "GFS2: fsid=%s: " fmt , (fs)->sd_fsname , ## arg)