From: Pavel Reichl Date: Wed, 22 Jan 2020 16:29:45 +0000 (-0500) Subject: xfs: remove the xfs_disk_dquot_t and xfs_dquot_t X-Git-Tag: v5.5.0-rc0~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=527e257fc56e871fc65d16c1246d86608829555e;p=thirdparty%2Fxfsprogs-dev.git xfs: remove the xfs_disk_dquot_t and xfs_dquot_t Source kernel commit: aefe69a45d84901c702f87672ec1e93de1d03f73 Signed-off-by: Pavel Reichl Reviewed-by: Darrick J. Wong [darrick: fix some of the comments] Signed-off-by: Darrick J. Wong Signed-off-by: Eric Sandeen --- diff --git a/db/dquot.c b/db/dquot.c index dd9e83f32..8e91b4a07 100644 --- a/db/dquot.c +++ b/db/dquot.c @@ -44,7 +44,7 @@ const field_t dqblk_flds[] = { { NULL } }; -#define DOFF(f) bitize(offsetof(xfs_disk_dquot_t, d_ ## f)) +#define DOFF(f) bitize(offsetof(struct xfs_disk_dquot, d_ ## f)) const field_t disk_dquot_flds[] = { { "magic", FLDT_UINT16X, OI(DOFF(magic)), C1, 0, TYP_NONE }, { "version", FLDT_UINT8X, OI(DOFF(version)), C1, 0, TYP_NONE }, diff --git a/db/field.c b/db/field.c index 66fa37e85..aa0154d82 100644 --- a/db/field.c +++ b/db/field.c @@ -289,7 +289,7 @@ const ftattr_t ftattrtab[] = { { FLDT_DIRBLOCK, "dirblock", fp_num, "%u", SI(bitsz(uint32_t)), 0, fa_dirblock, NULL }, { FLDT_DISK_DQUOT, "disk_dquot", NULL, (char *)disk_dquot_flds, - SI(bitsz(xfs_disk_dquot_t)), 0, NULL, 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_DQID, "dqid", fp_num, "%d", SI(bitsz(xfs_dqid_t)), 0, NULL, diff --git a/libxfs/xfs_dquot_buf.c b/libxfs/xfs_dquot_buf.c index 97e3b31d9..4a175bc30 100644 --- a/libxfs/xfs_dquot_buf.c +++ b/libxfs/xfs_dquot_buf.c @@ -30,10 +30,10 @@ xfs_calc_dquots_per_chunk( xfs_failaddr_t xfs_dquot_verify( - struct xfs_mount *mp, - xfs_disk_dquot_t *ddq, - xfs_dqid_t id, - uint type) /* used only during quotacheck */ + struct xfs_mount *mp, + struct xfs_disk_dquot *ddq, + xfs_dqid_t id, + uint type) /* used only during quotacheck */ { /* * We can encounter an uninitialized dquot buffer for 2 reasons: diff --git a/libxfs/xfs_format.h b/libxfs/xfs_format.h index 144d71636..fc06b480d 100644 --- a/libxfs/xfs_format.h +++ b/libxfs/xfs_format.h @@ -1144,11 +1144,11 @@ static inline void xfs_dinode_put_rdev(struct xfs_dinode *dip, xfs_dev_t rdev) /* * This is the main portion of the on-disk representation of quota - * information for a user. This is the q_core of the xfs_dquot_t that + * information for a user. This is the q_core of the struct xfs_dquot that * is kept in kernel memory. We pad this with some more expansion room * to construct the on disk structure. */ -typedef struct xfs_disk_dquot { +struct xfs_disk_dquot { __be16 d_magic; /* dquot magic = XFS_DQUOT_MAGIC */ __u8 d_version; /* dquot version */ __u8 d_flags; /* XFS_DQ_USER/PROJ/GROUP */ @@ -1171,15 +1171,15 @@ typedef struct xfs_disk_dquot { __be32 d_rtbtimer; /* similar to above; for RT disk blocks */ __be16 d_rtbwarns; /* warnings issued wrt RT disk blocks */ __be16 d_pad; -} xfs_disk_dquot_t; +}; /* * 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 { - xfs_disk_dquot_t dd_diskdq; /* portion that lives incore as well */ - char dd_fill[4]; /* filling for posterity */ + struct xfs_disk_dquot dd_diskdq; /* portion living incore as well */ + char dd_fill[4];/* filling for posterity */ /* * These two are only present on filesystems with the CRC bits set. diff --git a/libxfs/xfs_trans_resv.c b/libxfs/xfs_trans_resv.c index 270e92a31..351b6b804 100644 --- a/libxfs/xfs_trans_resv.c +++ b/libxfs/xfs_trans_resv.c @@ -716,7 +716,7 @@ xfs_calc_clear_agi_bucket_reservation( /* * Adjusting quota limits. - * the xfs_disk_dquot_t: sizeof(struct xfs_disk_dquot) + * the disk quota buffer: sizeof(struct xfs_disk_dquot) */ STATIC uint xfs_calc_qm_setqlim_reservation(void) diff --git a/logprint/log_misc.c b/logprint/log_misc.c index 5b41bc8cb..45f697fc3 100644 --- a/logprint/log_misc.c +++ b/logprint/log_misc.c @@ -363,7 +363,7 @@ xlog_print_trans_buffer(char **ptr, int len, int *i, int num_ops) memmove(dq, *ptr, sizeof(struct xfs_disk_dquot)); printf(_("DQUOT Buffer: DQ ")); if (be32_to_cpu(head->oh_len) < - sizeof(xfs_disk_dquot_t)) { + sizeof(struct xfs_disk_dquot)) { printf(_("Out of space\n")); } else { @@ -652,11 +652,11 @@ xlog_print_trans_inode( static int xlog_print_trans_dquot(char **ptr, int len, int *i, int num_ops) { - xfs_dq_logformat_t *f; - xfs_dq_logformat_t lbuf = {0}; - xfs_disk_dquot_t ddq; - xlog_op_header_t *head = NULL; - int num, skip; + xfs_dq_logformat_t *f; + xfs_dq_logformat_t lbuf = {0}; + struct xfs_disk_dquot ddq; + xlog_op_header_t *head = NULL; + int num, skip; /* * print dquot header region @@ -692,8 +692,8 @@ xlog_print_trans_dquot(char **ptr, int len, int *i, int num_ops) while (num-- > 0) { head = (xlog_op_header_t *)*ptr; xlog_print_op_header(head, *i, ptr); - ASSERT(be32_to_cpu(head->oh_len) == sizeof(xfs_disk_dquot_t)); - memmove(&ddq, *ptr, sizeof(xfs_disk_dquot_t)); + ASSERT(be32_to_cpu(head->oh_len) == sizeof(struct xfs_disk_dquot)); + memmove(&ddq, *ptr, sizeof(struct xfs_disk_dquot)); printf(_("DQUOT: magic 0x%hx flags 0%ho\n"), be16_to_cpu(ddq.d_magic), ddq.d_flags); *ptr += be32_to_cpu(head->oh_len); diff --git a/logprint/log_print_all.c b/logprint/log_print_all.c index eafffe28d..5aec9df07 100644 --- a/logprint/log_print_all.c +++ b/logprint/log_print_all.c @@ -76,7 +76,7 @@ xlog_recover_print_buffer( char *p; int len, num, i; xfs_daddr_t blkno; - xfs_disk_dquot_t *ddq; + struct xfs_disk_dquot *ddq; f = (xfs_buf_log_format_t *)item->ri_buf[0].i_addr; printf(" "); @@ -165,7 +165,7 @@ xlog_recover_print_buffer( be32_to_cpu(agf->agf_freeblks), be32_to_cpu(agf->agf_longest)); } else if (*(uint *)p == XFS_DQUOT_MAGIC) { - ddq = (xfs_disk_dquot_t *)p; + ddq = (struct xfs_disk_dquot *)p; printf(_(" DQUOT Buffer:\n")); if (!print_buffer) continue; @@ -205,12 +205,12 @@ xlog_recover_print_dquot( xlog_recover_item_t *item) { xfs_dq_logformat_t *f; - xfs_disk_dquot_t *d; + struct xfs_disk_dquot *d; f = (xfs_dq_logformat_t *)item->ri_buf[0].i_addr; ASSERT(f); ASSERT(f->qlf_len == 1); - d = (xfs_disk_dquot_t *)item->ri_buf[1].i_addr; + d = (struct xfs_disk_dquot *)item->ri_buf[1].i_addr; printf(_("\tDQUOT: #regs:%d blkno:%lld boffset:%u id: %d\n"), f->qlf_size, (long long)f->qlf_blkno, f->qlf_boffset, f->qlf_id); if (!print_quota)