From: Christoph Hellwig Date: Fri, 1 May 2020 21:37:08 +0000 (-0400) Subject: xfs: remove the xfs_agfl_t typedef X-Git-Tag: v5.7.0-rc0~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=342f8badfc48b55b65eb27c13bb343212a0920a8;p=thirdparty%2Fxfsprogs-dev.git xfs: remove the xfs_agfl_t typedef Source kernel commit: 4b97510859b22e0db5edf104096af1132daeea9a There is just a single user left, so remove it. Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Signed-off-by: Eric Sandeen --- diff --git a/copy/xfs_copy.c b/copy/xfs_copy.c index c4f9f3498..72ce3fe79 100644 --- a/copy/xfs_copy.c +++ b/copy/xfs_copy.c @@ -454,7 +454,7 @@ read_ag_header(int fd, xfs_agnumber_t agno, wbuf *buf, ag_header_t *ag, ASSERT(be32_to_cpu(ag->xfs_agf->agf_magicnum) == XFS_AGF_MAGIC); ag->xfs_agi = (xfs_agi_t *) (buf->data + diff + 2 * sectorsize); ASSERT(be32_to_cpu(ag->xfs_agi->agi_magicnum) == XFS_AGI_MAGIC); - ag->xfs_agfl = (xfs_agfl_t *) (buf->data + diff + 3 * sectorsize); + ag->xfs_agfl = (struct xfs_agfl *) (buf->data + diff + 3 * sectorsize); } diff --git a/copy/xfs_copy.h b/copy/xfs_copy.h index 534b63e56..0b0ec0ea6 100644 --- a/copy/xfs_copy.h +++ b/copy/xfs_copy.h @@ -21,7 +21,7 @@ typedef struct ag_header { xfs_dsb_t *xfs_sb; /* superblock for filesystem or AG */ xfs_agf_t *xfs_agf; /* free space info */ xfs_agi_t *xfs_agi; /* free inode info */ - xfs_agfl_t *xfs_agfl; /* AG freelist */ + struct xfs_agfl *xfs_agfl; /* AG freelist */ char *residue; int residue_length; } ag_header_t; diff --git a/db/agfl.c b/db/agfl.c index 984849370..45e4d6f9c 100644 --- a/db/agfl.c +++ b/db/agfl.c @@ -34,7 +34,7 @@ const field_t agfl_crc_hfld[] = { { { NULL } }; -#define OFF(f) bitize(offsetof(xfs_agfl_t, agfl_ ## f)) +#define OFF(f) bitize(offsetof(struct xfs_agfl, agfl_ ## f)) const field_t agfl_flds[] = { { "bno", FLDT_AGBLOCKNZ, OI(OFF(magicnum)), agfl_bno_size, FLD_ARRAY|FLD_COUNT, TYP_DATA }, diff --git a/libxfs/xfs_format.h b/libxfs/xfs_format.h index c1c69a4c8..32b1651de 100644 --- a/libxfs/xfs_format.h +++ b/libxfs/xfs_format.h @@ -783,15 +783,15 @@ typedef struct xfs_agi { */ #define XFS_AGFL_DADDR(mp) ((xfs_daddr_t)(3 << (mp)->m_sectbb_log)) #define XFS_AGFL_BLOCK(mp) XFS_HDR_BLOCK(mp, XFS_AGFL_DADDR(mp)) -#define XFS_BUF_TO_AGFL(bp) ((xfs_agfl_t *)((bp)->b_addr)) +#define XFS_BUF_TO_AGFL(bp) ((struct xfs_agfl *)((bp)->b_addr)) -typedef struct xfs_agfl { +struct xfs_agfl { __be32 agfl_magicnum; __be32 agfl_seqno; uuid_t agfl_uuid; __be64 agfl_lsn; __be32 agfl_crc; -} __attribute__((packed)) xfs_agfl_t; +} __attribute__((packed)); #define XFS_AGFL_CRC_OFF offsetof(struct xfs_agfl, agfl_crc) diff --git a/repair/phase5.c b/repair/phase5.c index a07dfbf38..f219c026f 100644 --- a/repair/phase5.c +++ b/repair/phase5.c @@ -441,7 +441,7 @@ calculate_freespace_cursor(xfs_mount_t *mp, xfs_agnumber_t agno, * as they will be *after* accounting for the free space * we've used up will need fewer blocks to to represent * than we've allocated. We can use the AGFL to hold - * xfs_agfl_size (sector/xfs_agfl_t) blocks but that's it. + * xfs_agfl_size (sector/struct xfs_agfl) blocks but that's it. * Thus we limit things to xfs_agfl_size/2 for each of the 2 btrees. * if the number of extra blocks is more than that, * we'll have to be called again.