OSDN Git Service

xfs: move _irec structs to xfs_types.h
authorDarrick J. Wong <djwong@kernel.org>
Mon, 10 Oct 2022 15:47:59 +0000 (08:47 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 31 Oct 2022 15:58:20 +0000 (08:58 -0700)
Structure definitions for incore objects do not belong in the ondisk
format header.  Move them to the incore types header where they belong.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/libxfs/xfs_format.h
fs/xfs/libxfs/xfs_types.h

index b55bdfa..005dd65 100644 (file)
@@ -1564,20 +1564,6 @@ struct xfs_rmap_rec {
 #define RMAPBT_UNUSED_OFFSET_BITLEN    7
 #define RMAPBT_OFFSET_BITLEN           54
 
-#define XFS_RMAP_ATTR_FORK             (1 << 0)
-#define XFS_RMAP_BMBT_BLOCK            (1 << 1)
-#define XFS_RMAP_UNWRITTEN             (1 << 2)
-#define XFS_RMAP_KEY_FLAGS             (XFS_RMAP_ATTR_FORK | \
-                                        XFS_RMAP_BMBT_BLOCK)
-#define XFS_RMAP_REC_FLAGS             (XFS_RMAP_UNWRITTEN)
-struct xfs_rmap_irec {
-       xfs_agblock_t   rm_startblock;  /* extent start block */
-       xfs_extlen_t    rm_blockcount;  /* extent length */
-       uint64_t        rm_owner;       /* extent owner */
-       uint64_t        rm_offset;      /* offset within the owner */
-       unsigned int    rm_flags;       /* state flags */
-};
-
 /*
  * Key structure
  *
@@ -1640,12 +1626,6 @@ struct xfs_refcount_key {
        __be32          rc_startblock;  /* starting block number */
 };
 
-struct xfs_refcount_irec {
-       xfs_agblock_t   rc_startblock;  /* starting block number */
-       xfs_extlen_t    rc_blockcount;  /* count of free blocks */
-       xfs_nlink_t     rc_refcount;    /* number of inodes linked here */
-};
-
 #define MAXREFCOUNT    ((xfs_nlink_t)~0U)
 #define MAXREFCEXTLEN  ((xfs_extlen_t)~0U)
 
index a6b7d98..2d9ebc7 100644 (file)
@@ -166,6 +166,26 @@ typedef struct xfs_bmbt_irec
        xfs_exntst_t    br_state;       /* extent state */
 } xfs_bmbt_irec_t;
 
+struct xfs_refcount_irec {
+       xfs_agblock_t   rc_startblock;  /* starting block number */
+       xfs_extlen_t    rc_blockcount;  /* count of free blocks */
+       xfs_nlink_t     rc_refcount;    /* number of inodes linked here */
+};
+
+#define XFS_RMAP_ATTR_FORK             (1 << 0)
+#define XFS_RMAP_BMBT_BLOCK            (1 << 1)
+#define XFS_RMAP_UNWRITTEN             (1 << 2)
+#define XFS_RMAP_KEY_FLAGS             (XFS_RMAP_ATTR_FORK | \
+                                        XFS_RMAP_BMBT_BLOCK)
+#define XFS_RMAP_REC_FLAGS             (XFS_RMAP_UNWRITTEN)
+struct xfs_rmap_irec {
+       xfs_agblock_t   rm_startblock;  /* extent start block */
+       xfs_extlen_t    rm_blockcount;  /* extent length */
+       uint64_t        rm_owner;       /* extent owner */
+       uint64_t        rm_offset;      /* offset within the owner */
+       unsigned int    rm_flags;       /* state flags */
+};
+
 /* per-AG block reservation types */
 enum xfs_ag_resv_type {
        XFS_AG_RESV_NONE = 0,