From: Christoph Hellwig Date: Thu, 28 Apr 2022 19:39:02 +0000 (-0400) Subject: xfs: remove the xfs_dqblk_t typedef X-Git-Tag: v5.16.0-rc0~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bf0f6e1704f93fa491832568406ba08dcd8c31e6;p=thirdparty%2Fxfsprogs-dev.git xfs: remove the xfs_dqblk_t typedef Source kernel commit: 11a83f4c393040dc3a6a368c6399785dbfae7602 Remove the few leftover instances of the xfs_dinode_t typedef. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Signed-off-by: Eric Sandeen --- diff --git a/db/check.c b/db/check.c index decfafc57..a9c6e632e 100644 --- a/db/check.c +++ b/db/check.c @@ -3455,21 +3455,21 @@ process_leaf_node_dir_v2_int( static void process_quota( - qtype_t qtype, - inodata_t *id, - blkmap_t *blkmap) + qtype_t qtype, + inodata_t *id, + blkmap_t *blkmap) { - xfs_fsblock_t bno; - int cb; - xfs_dqblk_t *dqb; - xfs_dqid_t dqid; - uint8_t exp_flags = 0; - uint i; - uint perblock; - xfs_fileoff_t qbno; - char *s = NULL; - int scicb; - int t = 0; + xfs_fsblock_t bno; + int cb; + struct xfs_dqblk *dqb; + xfs_dqid_t dqid; + uint8_t exp_flags = 0; + uint i; + uint perblock; + xfs_fileoff_t qbno; + char *s = NULL; + int scicb; + int t = 0; switch (qtype) { case IS_USER_QUOTA: diff --git a/db/dquot.c b/db/dquot.c index e52000f2e..76853a725 100644 --- a/db/dquot.c +++ b/db/dquot.c @@ -32,8 +32,8 @@ const field_t dqblk_hfld[] = { { NULL } }; -#define DDOFF(f) bitize(offsetof(xfs_dqblk_t, dd_ ## f)) -#define DDSZC(f) szcount(xfs_dqblk_t, dd_ ## f) +#define DDOFF(f) bitize(offsetof(struct xfs_dqblk, dd_ ## f)) +#define DDSZC(f) szcount(struct xfs_dqblk, dd_ ## f) const field_t dqblk_flds[] = { { "diskdq", FLDT_DISK_DQUOT, OI(DDOFF(diskdq)), C1, 0, TYP_NONE }, { "fill", FLDT_CHARS, OI(DDOFF(fill)), CI(DDSZC(fill)), FLD_SKIPALL, @@ -138,7 +138,7 @@ dquot_f( dbprintf(_("bad %s id for dquot %s\n"), s, argv[optind]); return 0; } - perblock = (int)(mp->m_sb.sb_blocksize / sizeof(xfs_dqblk_t)); + perblock = (int)(mp->m_sb.sb_blocksize / sizeof(struct xfs_dqblk)); qbno = (xfs_fileoff_t)id / perblock; qoff = (int)(id % perblock); push_cur(); @@ -153,7 +153,7 @@ dquot_f( set_cur(&typtab[TYP_DQBLK], XFS_FSB_TO_DADDR(mp, bm.startblock), blkbb, DB_RING_IGN, NULL); iocur_top->dquot_buf = 1; - off_cur(qoff * (int)sizeof(xfs_dqblk_t), sizeof(xfs_dqblk_t)); + off_cur(qoff * (int)sizeof(struct xfs_dqblk), sizeof(struct xfs_dqblk)); ring_add(); return 0; } diff --git a/db/field.c b/db/field.c index 90d3609a0..1d873d518 100644 --- a/db/field.c +++ b/db/field.c @@ -290,8 +290,8 @@ const ftattr_t ftattrtab[] = { fa_dirblock, NULL }, { FLDT_DISK_DQUOT, "disk_dquot", NULL, (char *)disk_dquot_flds, SI(bitsz(struct xfs_disk_dquot)), 0, NULL, disk_dquot_flds }, - { FLDT_DQBLK, "dqblk", NULL, (char *)dqblk_flds, SI(bitsz(xfs_dqblk_t)), - 0, NULL, dqblk_flds }, + { FLDT_DQBLK, "dqblk", NULL, (char *)dqblk_flds, + SI(bitsz(struct xfs_dqblk)), 0, NULL, dqblk_flds }, { FLDT_DQID, "dqid", fp_num, "%d", SI(bitsz(xfs_dqid_t)), 0, NULL, NULL }, { FLDT_DRFSBNO, "drfsbno", fp_num, "%llu", SI(bitsz(xfs_rfsblock_t)), diff --git a/libxfs/xfs_dquot_buf.c b/libxfs/xfs_dquot_buf.c index ecb4a0027..db603cab9 100644 --- a/libxfs/xfs_dquot_buf.c +++ b/libxfs/xfs_dquot_buf.c @@ -20,7 +20,7 @@ xfs_calc_dquots_per_chunk( unsigned int nbblks) /* basic block units */ { ASSERT(nbblks > 0); - return BBTOB(nbblks) / sizeof(xfs_dqblk_t); + return BBTOB(nbblks) / sizeof(struct xfs_dqblk); } /* @@ -125,7 +125,7 @@ xfs_dqblk_repair( * Typically, a repair is only requested by quotacheck. */ ASSERT(id != -1); - memset(dqb, 0, sizeof(xfs_dqblk_t)); + memset(dqb, 0, sizeof(struct xfs_dqblk)); dqb->dd_diskdq.d_magic = cpu_to_be16(XFS_DQUOT_MAGIC); dqb->dd_diskdq.d_version = XFS_DQUOT_VERSION; diff --git a/libxfs/xfs_format.h b/libxfs/xfs_format.h index 10f38541f..d665c04e6 100644 --- a/libxfs/xfs_format.h +++ b/libxfs/xfs_format.h @@ -1215,7 +1215,7 @@ struct xfs_disk_dquot { * This is what goes on disk. This is separated from the xfs_disk_dquot because * carrying the unnecessary padding would be a waste of memory. */ -typedef struct xfs_dqblk { +struct xfs_dqblk { struct xfs_disk_dquot dd_diskdq; /* portion living incore as well */ char dd_fill[4];/* filling for posterity */ @@ -1225,7 +1225,7 @@ typedef struct xfs_dqblk { __be32 dd_crc; /* checksum */ __be64 dd_lsn; /* last modification in log */ uuid_t dd_uuid; /* location information */ -} xfs_dqblk_t; +}; #define XFS_DQUOT_CRC_OFF offsetof(struct xfs_dqblk, dd_crc) diff --git a/logprint/log_print_all.c b/logprint/log_print_all.c index c9c453f60..182b9d53a 100644 --- a/logprint/log_print_all.c +++ b/logprint/log_print_all.c @@ -172,7 +172,7 @@ xlog_recover_print_buffer( printf(_(" UIDs 0x%lx-0x%lx\n"), (unsigned long)be32_to_cpu(ddq->d_id), (unsigned long)be32_to_cpu(ddq->d_id) + - (BBTOB(f->blf_len) / sizeof(xfs_dqblk_t)) - 1); + (BBTOB(f->blf_len) / sizeof(struct xfs_dqblk)) - 1); } else { printf(_(" BUF DATA\n")); if (!print_buffer) continue; diff --git a/repair/dinode.c b/repair/dinode.c index 5600ab32b..8ea919698 100644 --- a/repair/dinode.c +++ b/repair/dinode.c @@ -1151,8 +1151,8 @@ process_quota_inode( qbno = NULLFILEOFF; while ((qbno = blkmap_next_off(blkmap, qbno, &t)) != NULLFILEOFF) { - xfs_dqblk_t *dqb; - int writebuf = 0; + struct xfs_dqblk *dqb; + int writebuf = 0; fsbno = blkmap_get(blkmap, qbno); dqid = (xfs_dqid_t)qbno * dqperchunk;