Commit f2f7ba52 authored by Steven Whitehouse's avatar Steven Whitehouse

[GFS2] Make headers compile on their own

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: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent 2bdbc5d7
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#ifndef __ACL_DOT_H__ #ifndef __ACL_DOT_H__
#define __ACL_DOT_H__ #define __ACL_DOT_H__
#include "incore.h"
#define GFS2_POSIX_ACL_ACCESS "posix_acl_access" #define GFS2_POSIX_ACL_ACCESS "posix_acl_access"
#define GFS2_POSIX_ACL_ACCESS_LEN 16 #define GFS2_POSIX_ACL_ACCESS_LEN 16
#define GFS2_POSIX_ACL_DEFAULT "posix_acl_default" #define GFS2_POSIX_ACL_DEFAULT "posix_acl_default"
......
...@@ -10,6 +10,10 @@ ...@@ -10,6 +10,10 @@
#ifndef __BMAP_DOT_H__ #ifndef __BMAP_DOT_H__
#define __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_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_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); int gfs2_extent_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, unsigned *extlen);
......
...@@ -10,6 +10,12 @@ ...@@ -10,6 +10,12 @@
#ifndef __DIR_DOT_H__ #ifndef __DIR_DOT_H__
#define __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() * gfs2_filldir_t - Report a directory entry to the caller of gfs2_dir_read()
* @opaque: opaque data used by the function * @opaque: opaque data used by the function
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#define __EAOPS_DOT_H__ #define __EAOPS_DOT_H__
struct gfs2_ea_request; struct gfs2_ea_request;
struct gfs2_inode;
struct gfs2_eattr_operations { struct gfs2_eattr_operations {
int (*eo_get) (struct gfs2_inode *ip, struct gfs2_ea_request *er); int (*eo_get) (struct gfs2_inode *ip, struct gfs2_ea_request *er);
......
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
#ifndef __EATTR_DOT_H__ #ifndef __EATTR_DOT_H__
#define __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_REC_LEN(ea) be32_to_cpu((ea)->ea_rec_len)
#define GFS2_EA_DATA_LEN(ea) be32_to_cpu((ea)->ea_data_len) #define GFS2_EA_DATA_LEN(ea) be32_to_cpu((ea)->ea_data_len)
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#ifndef __GLOCK_DOT_H__ #ifndef __GLOCK_DOT_H__
#define __GLOCK_DOT_H__ #define __GLOCK_DOT_H__
#include "incore.h"
/* Flags for lock requests; used in gfs2_holder gh_flag field. /* Flags for lock requests; used in gfs2_holder gh_flag field.
From lm_interface.h: From lm_interface.h:
#define LM_FLAG_TRY 0x00000001 #define LM_FLAG_TRY 0x00000001
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#ifndef __GLOPS_DOT_H__ #ifndef __GLOPS_DOT_H__
#define __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_meta_glops;
extern const struct gfs2_glock_operations gfs2_inode_glops; extern const struct gfs2_glock_operations gfs2_inode_glops;
extern const struct gfs2_glock_operations gfs2_rgrp_glops; extern const struct gfs2_glock_operations gfs2_rgrp_glops;
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#ifndef __INCORE_DOT_H__ #ifndef __INCORE_DOT_H__
#define __INCORE_DOT_H__ #define __INCORE_DOT_H__
#include <linux/fs.h>
#define DIO_FORCE 0x00000001 #define DIO_FORCE 0x00000001
#define DIO_CLEAN 0x00000002 #define DIO_CLEAN 0x00000002
#define DIO_DIRTY 0x00000004 #define DIO_DIRTY 0x00000004
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#ifndef __LM_DOT_H__ #ifndef __LM_DOT_H__
#define __LM_DOT_H__ #define __LM_DOT_H__
struct gfs2_sbd;
#define GFS2_MIN_LVB_SIZE 32 #define GFS2_MIN_LVB_SIZE 32
int gfs2_lm_mount(struct gfs2_sbd *sdp, int silent); int gfs2_lm_mount(struct gfs2_sbd *sdp, int silent);
......
...@@ -10,6 +10,10 @@ ...@@ -10,6 +10,10 @@
#ifndef __LOG_DOT_H__ #ifndef __LOG_DOT_H__
#define __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 * gfs2_log_lock - acquire the right to mess with the log manager
* @sdp: the filesystem * @sdp: the filesystem
......
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
#ifndef __LOPS_DOT_H__ #ifndef __LOPS_DOT_H__
#define __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_glock_lops;
extern const struct gfs2_log_operations gfs2_buf_lops; extern const struct gfs2_log_operations gfs2_buf_lops;
extern const struct gfs2_log_operations gfs2_revoke_lops; extern const struct gfs2_log_operations gfs2_revoke_lops;
......
...@@ -10,6 +10,10 @@ ...@@ -10,6 +10,10 @@
#ifndef __DIO_DOT_H__ #ifndef __DIO_DOT_H__
#define __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) static inline void gfs2_buffer_clear(struct buffer_head *bh)
{ {
memset(bh->b_data, 0, bh->b_size); memset(bh->b_data, 0, bh->b_size);
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#ifndef __MOUNT_DOT_H__ #ifndef __MOUNT_DOT_H__
#define __MOUNT_DOT_H__ #define __MOUNT_DOT_H__
struct gfs2_sbd;
int gfs2_mount_args(struct gfs2_sbd *sdp, char *data_arg, int remount); int gfs2_mount_args(struct gfs2_sbd *sdp, char *data_arg, int remount);
#endif /* __MOUNT_DOT_H__ */ #endif /* __MOUNT_DOT_H__ */
...@@ -10,6 +10,10 @@ ...@@ -10,6 +10,10 @@
#ifndef __OPS_ADDRESS_DOT_H__ #ifndef __OPS_ADDRESS_DOT_H__
#define __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 const struct address_space_operations gfs2_file_aops;
extern int gfs2_get_block(struct inode *inode, sector_t lblock, extern int gfs2_get_block(struct inode *inode, sector_t lblock,
struct buffer_head *bh_result, int create); struct buffer_head *bh_result, int create);
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#ifndef __OPS_DENTRY_DOT_H__ #ifndef __OPS_DENTRY_DOT_H__
#define __OPS_DENTRY_DOT_H__ #define __OPS_DENTRY_DOT_H__
#include <linux/dcache.h>
extern struct dentry_operations gfs2_dops; extern struct dentry_operations gfs2_dops;
#endif /* __OPS_DENTRY_DOT_H__ */ #endif /* __OPS_DENTRY_DOT_H__ */
...@@ -9,6 +9,10 @@ ...@@ -9,6 +9,10 @@
#ifndef __OPS_FILE_DOT_H__ #ifndef __OPS_FILE_DOT_H__
#define __OPS_FILE_DOT_H__ #define __OPS_FILE_DOT_H__
#include <linux/fs.h>
struct gfs2_inode;
extern struct file gfs2_internal_file_sentinel; extern struct file gfs2_internal_file_sentinel;
extern int gfs2_internal_read(struct gfs2_inode *ip, extern int gfs2_internal_read(struct gfs2_inode *ip,
struct file_ra_state *ra_state, struct file_ra_state *ra_state,
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#ifndef __OPS_FSTYPE_DOT_H__ #ifndef __OPS_FSTYPE_DOT_H__
#define __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 gfs2_fs_type;
extern struct file_system_type gfs2meta_fs_type; extern struct file_system_type gfs2meta_fs_type;
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#ifndef __OPS_INODE_DOT_H__ #ifndef __OPS_INODE_DOT_H__
#define __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_file_iops;
extern struct inode_operations gfs2_dir_iops; extern struct inode_operations gfs2_dir_iops;
extern struct inode_operations gfs2_symlink_iops; extern struct inode_operations gfs2_symlink_iops;
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#ifndef __OPS_SUPER_DOT_H__ #ifndef __OPS_SUPER_DOT_H__
#define __OPS_SUPER_DOT_H__ #define __OPS_SUPER_DOT_H__
#include <linux/fs.h>
extern struct super_operations gfs2_super_ops; extern struct super_operations gfs2_super_ops;
#endif /* __OPS_SUPER_DOT_H__ */ #endif /* __OPS_SUPER_DOT_H__ */
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#ifndef __OPS_VM_DOT_H__ #ifndef __OPS_VM_DOT_H__
#define __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_private;
extern struct vm_operations_struct gfs2_vm_ops_sharewrite; extern struct vm_operations_struct gfs2_vm_ops_sharewrite;
......
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
#ifndef __QUOTA_DOT_H__ #ifndef __QUOTA_DOT_H__
#define __QUOTA_DOT_H__ #define __QUOTA_DOT_H__
struct gfs2_inode;
struct gfs2_sbd;
#define NO_QUOTA_CHANGE ((u32)-1) #define NO_QUOTA_CHANGE ((u32)-1)
int gfs2_quota_hold(struct gfs2_inode *ip, u32 uid, u32 gid); int gfs2_quota_hold(struct gfs2_inode *ip, u32 uid, u32 gid);
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#ifndef __RECOVERY_DOT_H__ #ifndef __RECOVERY_DOT_H__
#define __RECOVERY_DOT_H__ #define __RECOVERY_DOT_H__
#include "incore.h"
static inline void gfs2_replay_incr_blk(struct gfs2_sbd *sdp, unsigned int *blk) static inline void gfs2_replay_incr_blk(struct gfs2_sbd *sdp, unsigned int *blk)
{ {
if (++*blk == sdp->sd_jdesc->jd_blocks) if (++*blk == sdp->sd_jdesc->jd_blocks)
......
...@@ -10,6 +10,10 @@ ...@@ -10,6 +10,10 @@
#ifndef __RGRP_DOT_H__ #ifndef __RGRP_DOT_H__
#define __RGRP_DOT_H__ #define __RGRP_DOT_H__
struct gfs2_rgrpd;
struct gfs2_sbd;
struct gfs2_holder;
void gfs2_rgrp_verify(struct gfs2_rgrpd *rgd); void gfs2_rgrp_verify(struct gfs2_rgrpd *rgd);
struct gfs2_rgrpd *gfs2_blk2rgrpd(struct gfs2_sbd *sdp, u64 blk); struct gfs2_rgrpd *gfs2_blk2rgrpd(struct gfs2_sbd *sdp, u64 blk);
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#ifndef __SUPER_DOT_H__ #ifndef __SUPER_DOT_H__
#define __SUPER_DOT_H__ #define __SUPER_DOT_H__
#include "incore.h"
void gfs2_tune_init(struct gfs2_tune *gt); void gfs2_tune_init(struct gfs2_tune *gt);
int gfs2_check_sb(struct gfs2_sbd *sdp, struct gfs2_sb *sb, int silent); int gfs2_check_sb(struct gfs2_sbd *sdp, struct gfs2_sb *sb, int silent);
......
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
#ifndef __SYS_DOT_H__ #ifndef __SYS_DOT_H__
#define __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 */ /* Allow args to be passed to GFS2 when using an initial ram disk */
extern char *gfs2_sys_margs; extern char *gfs2_sys_margs;
extern spinlock_t gfs2_sys_margs_lock; extern spinlock_t gfs2_sys_margs_lock;
......
...@@ -10,6 +10,11 @@ ...@@ -10,6 +10,11 @@
#ifndef __TRANS_DOT_H__ #ifndef __TRANS_DOT_H__
#define __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_DINODE 1
#define RES_INDIRECT 1 #define RES_INDIRECT 1
#define RES_JDATA 1 #define RES_JDATA 1
...@@ -20,8 +25,8 @@ ...@@ -20,8 +25,8 @@
#define RES_STATFS 1 #define RES_STATFS 1
#define RES_QUOTA 2 #define RES_QUOTA 2
int gfs2_trans_begin(struct gfs2_sbd *sdp, int gfs2_trans_begin(struct gfs2_sbd *sdp, unsigned int blocks,
unsigned int blocks, unsigned int revokes); unsigned int revokes);
void gfs2_trans_end(struct gfs2_sbd *sdp); void gfs2_trans_end(struct gfs2_sbd *sdp);
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#ifndef __UTIL_DOT_H__ #ifndef __UTIL_DOT_H__
#define __UTIL_DOT_H__ #define __UTIL_DOT_H__
#include "incore.h"
#define fs_printk(level, fs, fmt, arg...) \ #define fs_printk(level, fs, fmt, arg...) \
printk(level "GFS2: fsid=%s: " fmt , (fs)->sd_fsname , ## arg) printk(level "GFS2: fsid=%s: " fmt , (fs)->sd_fsname , ## arg)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment