]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: remove the xfs_disk_dquot_t and xfs_dquot_t
authorPavel Reichl <preichl@redhat.com>
Wed, 22 Jan 2020 16:29:45 +0000 (11:29 -0500)
committerEric Sandeen <sandeen@redhat.com>
Wed, 22 Jan 2020 16:29:45 +0000 (11:29 -0500)
Source kernel commit: aefe69a45d84901c702f87672ec1e93de1d03f73

Signed-off-by: Pavel Reichl <preichl@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
[darrick: fix some of the comments]
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
db/dquot.c
db/field.c
libxfs/xfs_dquot_buf.c
libxfs/xfs_format.h
libxfs/xfs_trans_resv.c
logprint/log_misc.c
logprint/log_print_all.c

index dd9e83f328e0988865bf48831ca7d6106e943826..8e91b4a07a175eefd4c80da30952631dbc1ea91e 100644 (file)
@@ -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 },
index 66fa37e85be4601e2d9cfba3f93b7c9c2fbb5591..aa0154d82eb792da4f3be823766a938829495521 100644 (file)
@@ -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,
index 97e3b31d9afdb6f46cbe6675d6eda7c4c9a1c37e..4a175bc307cd0297db7eeef3c30c8fdb5deaa220 100644 (file)
@@ -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:
index 144d716367c07f31d35a1f58d27d96a9451f8f02..fc06b480da4287dac17f4b746f6757f179df04a4 100644 (file)
@@ -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.
index 270e92a31ba621eb3a9b6ad5d9427ad9ab1a493f..351b6b804142e91c2eb44515b3942f8543835ae7 100644 (file)
@@ -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)
index 5b41bc8cbd6a1c6533f9ef5949ccb3ffe87c00ce..45f697fc3ec2fab1c726aee54df04f89408903ed 100644 (file)
@@ -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);
index eafffe28d1124f4a15e043611c7b664ff7b91845..5aec9df07510dae956c13ebbd410f338af838378 100644 (file)
@@ -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)