Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 70a9883c authored by Dave Chinner's avatar Dave Chinner Committed by Ben Myers
Browse files

xfs: create a shared header file for format-related information



All of the buffer operations structures are needed to be exported
for xfs_db, so move them all to a common location rather than
spreading them all over the place. They are verifying the on-disk
format, so while xfs_format.h might be a good place, it is not part
of the on disk format.

Hence we need to create a new header file that we centralise these
related definitions. Start by moving the bffer operations
structures, and then also move all the other definitions that have
crept into xfs_log_format.h and xfs_format.h as there was no other
shared header file to put them in.

Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarBen Myers <bpm@sgi.com>
parent 865e9446
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -128,8 +128,6 @@ typedef struct xfs_agf {
extern int xfs_read_agf(struct xfs_mount *mp, struct xfs_trans *tp,
			xfs_agnumber_t agno, int flags, struct xfs_buf **bpp);

extern const struct xfs_buf_ops xfs_agf_buf_ops;

/*
 * Size of the unlinked inode hash table in the agi.
 */
@@ -191,8 +189,6 @@ typedef struct xfs_agi {
extern int xfs_read_agi(struct xfs_mount *mp, struct xfs_trans *tp,
				xfs_agnumber_t agno, struct xfs_buf **bpp);

extern const struct xfs_buf_ops xfs_agi_buf_ops;

/*
 * The third a.g. block contains the a.g. freelist, an array
 * of block pointers to blocks owned by the allocation btree code.
+2 −1
Original line number Diff line number Diff line
@@ -17,7 +17,8 @@
 */
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_types.h"
#include "xfs_format.h"
#include "xfs_shared.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_trans.h"
+0 −3
Original line number Diff line number Diff line
@@ -231,7 +231,4 @@ xfs_alloc_get_rec(
	xfs_extlen_t		*len,	/* output: length of extent */
	int			*stat);	/* output: success/failure */

extern const struct xfs_buf_ops xfs_agf_buf_ops;
extern const struct xfs_buf_ops xfs_agfl_buf_ops;

#endif	/* __XFS_ALLOC_H__ */
+0 −2
Original line number Diff line number Diff line
@@ -95,6 +95,4 @@ extern struct xfs_btree_cur *xfs_allocbt_init_cursor(struct xfs_mount *,
		xfs_agnumber_t, xfs_btnum_t);
extern int xfs_allocbt_maxrecs(struct xfs_mount *, int, int);

extern const struct xfs_buf_ops xfs_allocbt_buf_ops;

#endif	/* __XFS_ALLOC_BTREE_H__ */
+3 −1
Original line number Diff line number Diff line
@@ -16,9 +16,11 @@
 * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
#include "xfs.h"
#include "xfs_log.h"
#include "xfs_format.h"
#include "xfs_shared.h"
#include "xfs_sb.h"
#include "xfs_ag.h"
#include "xfs_log.h"
#include "xfs_trans.h"
#include "xfs_mount.h"
#include "xfs_bmap_btree.h"
Loading