[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 5856ba764680dbfebf4f8d7fe5b5503ec2babe9a..05c294fe0d780f9c28a4cef0d8ebdcfa2a5deffc 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 cb3b624fea3132a54666766da3d50043cc4d99ef..503f1cdda29097f548390adefc6197c41a124b49 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 d32449f0839c83be1644247459357720061d8a04..371233419b073026eb1a96e0066368d3bde6b0df 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 1c27700ee8b86813fb9c281f7f54e648ce21521b..b045897e1e838bc2f41a5c00a1f1aff199bd2e20 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 85c70c335c59c481af5858f3af34388f5129136d..cb7c2d846765db35a0dbae0aa0f252dbb18cbb6f 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 4762cdb04f64ac3c6bead5d7e6ec5988db1e6c54..2e1d32866321011e97b5a5cc266aceafbefab43e 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 ba943e4736658b212e70fa0979d88db01c9f0ad0..a1d9b5b024e633af2a95069e4ba12c3a36268a68 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 407afd18fa2eef289386c7c1f4c5c5cf5bbb849a..225924ca6b3ef604b8a3fc8a7129bba6d008c095 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 dbef88852ef300a69bde1c3aeb3f6aa4a290a2ec..6b890e73e6c1c7a43d4f9e7d05ded950cf956b0c 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 80764e388bb2cb7ee448d2b493e1a5cc5bb691d4..7f5737d55612883e5de8bb922d34d9e9053245bc 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 2e3365c2b1019fd04a4c1e1e5b357edf47d4473e..5839c05ae6be29cfc7fe692c2c8f1028aaead2dd 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 9a9acc94029282dcb62aef185bb1d5ca7a74ebe0..086a472df3f1afca1d6dc63eb3d4aa9553bc73a9 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 8a21897b63e58ca9c14977107c97b1960616e498..401288acfdf315f5dd6cefa136b96be6911279f1 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 6c07aa2bd98a72b22d5c68dc20e0bf3aff90400b..35aaee4aa7e1323aea5824948c6ee99529ac2184 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 e7b05e5c62ec51761d35f3ac1619851f54b36ded..5caa3db4d3f555c8d094c20ee7777e95fe5a6e9c 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 b1c1bf838ec931aa8cfca2b6a137e2d3a4e858fa..ce319f89ec8e9ae95c64469a678a713465b28c76 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 b85ecce3ca6beac14ff1a946c6b18f3c140734d9..7cc2c296271be2d7930879a981013c85c90c49a9 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 6f4b54783d29bd7bde383803653ff91e32a8252f..b15acb4fd34c9bbda673e345c066d74396c2ebb4 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 cbc4f73e9a926bed63f95b8d851092dd18dfa4f1..9de73f042f78a53d87449bdbe421413e86fa2eb7 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 d5ba4b9c50fdf46a450087381a16bab62239db61..4ae8f43ed5e35d3bdf5b74c2e22e9d4e5e04e9db 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 d93c61c99365efff7bd1fccc18bca1dd99e1d29f..a8be1417051f9bf07823c3b885a94b3f0e4e9aa4 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 1b35516b7591eb1eb4aa5a47d91e901a3f41991e..961feedf4d8bb026949d8bac19542c2c651281a2 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 3d6ae37e85df26c81f5fdddd247622b485b5d5d2..3558957673876fc870df04e1aaeefb0d9e19f6e0 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 b073300a93e812ead030c509c629278454eebf64..5fa5119cfba653c23a0c13e4dcd8efdc18f07411 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 f8c01b50bfba3f788d82281cc4cade2e100df0d3..1ca8cdac5304bbf50682db1b9abf7ea5afd34e8d 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 6550d3d18263fdee4dc5feaff56b57e1ad4f924a..23d4cbe1de5b7b81b0c5e460bc7578704f8efece 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 204fdb81e34de5c7d9aa7aa8f25232dfdaa0ac2f..76a50899fe9e2252074a3aa844723d545802581c 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)