]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: remove inode log format typedef
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 17 Nov 2017 04:11:34 +0000 (22:11 -0600)
committerEric Sandeen <sandeen@redhat.com>
Fri, 17 Nov 2017 04:11:34 +0000 (22:11 -0600)
Source kernel commit: 06b1132120d446bbaf844cbbae51f0afd3baacb8

Remove xfs_inode_log_format_t now that xfs_inode_log_format is
explicitly padded and therefore is a real on-disk structure.  This
enables xfs/122 to check the size of the structure.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
[sandeen: same treatment in libxlog & logprint/ ]
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_log_format.h
libxlog/xfs_log_recover.c
logprint/log_misc.c
logprint/log_print_all.c
logprint/logprint.h

index 93dcaa78bd1cdf85d904c6876663f266d2b974fc..c6d3b0a77e91d728e0719a0e312a5acc5f4f5b97 100644 (file)
@@ -264,7 +264,7 @@ typedef struct xfs_trans_header {
  * (if any) is indicated in the ilf_dsize field.  Changes to this structure
  * must be added on to the end.
  */
-typedef struct xfs_inode_log_format {
+struct xfs_inode_log_format {
        uint16_t                ilf_type;       /* inode log item type */
        uint16_t                ilf_size;       /* size of this item */
        uint32_t                ilf_fields;     /* flags for fields logged */
@@ -279,7 +279,7 @@ typedef struct xfs_inode_log_format {
        int64_t                 ilf_blkno;      /* blkno of inode buffer */
        int32_t                 ilf_len;        /* len of inode buffer */
        int32_t                 ilf_boffset;    /* off of inode in buffer */
-} xfs_inode_log_format_t;
+};
 
 /*
  * Old 32 bit systems will log in this format without the 64 bit
index 6cd77d5e268c3f3fb5202613db4d5db9b5c625c4..6bd000c0712d2071178669feb9238ab342fb66bb 100644 (file)
@@ -1090,7 +1090,7 @@ xlog_recover_add_to_trans(
        char                    *dp,
        int                     len)
 {
-       xfs_inode_log_format_t  *in_f;                  /* any will do */
+       struct xfs_inode_log_format     *in_f;                  /* any will do */
        xlog_recover_item_t     *item;
        char                    *ptr;
 
@@ -1112,7 +1112,7 @@ xlog_recover_add_to_trans(
 
        ptr = kmem_alloc(len, KM_SLEEP);
        memcpy(ptr, dp, len);
-       in_f = (xfs_inode_log_format_t *)ptr;
+       in_f = (struct xfs_inode_log_format *)ptr;
 
        /* take the tail entry */
        item = list_entry(trans->r_itemq.prev, xlog_recover_item_t, ri_list);
index 15166d3b27f40995296673594cc1955bc7cf2454..fd46cc3a00e5ebc5ab5b994ddd995a2b8ed678c9 100644 (file)
@@ -530,9 +530,9 @@ xlog_print_trans_inode(
      * print inode type header region
      *
      * memmove to ensure 8-byte alignment for the long longs in
-     * xfs_inode_log_format_t structure
+     * struct xfs_inode_log_format structure
      *
-     * len can be smaller than xfs_inode_log_format_t
+     * len can be smaller than struct xfs_inode_log_format
      * if format data is split over operations
      */
     memmove(&src_lbuf, *ptr, MIN(sizeof(src_lbuf), len));
@@ -550,7 +550,7 @@ xlog_print_trans_inode(
               (long long)f->ilf_blkno, f->ilf_len, f->ilf_boffset);
     } else {
        ASSERT(len >= 4);       /* must have at least 4 bytes if != 0 */
-       f = (xfs_inode_log_format_t *)&src_lbuf;
+       f = (struct xfs_inode_log_format *)&src_lbuf;
        printf(_("INODE: #regs: %d   Not printing rest of data\n"),
               f->ilf_size);
        return f->ilf_size;
@@ -1480,14 +1480,14 @@ end:
  * if necessary, convert an xfs_inode_log_format struct from the old 32bit version
  * (which can have different field alignments) to the native 64 bit version
  */
-xfs_inode_log_format_t *
-xfs_inode_item_format_convert(char *src_buf, uint len, xfs_inode_log_format_t *in_f)
+struct xfs_inode_log_format *
+xfs_inode_item_format_convert(char *src_buf, uint len, struct xfs_inode_log_format *in_f)
 {
        struct xfs_inode_log_format_32  *in_f32;
 
        /* if we have native format then just return buf without copying data */
-       if (len == sizeof(xfs_inode_log_format_t)) {
-               return (xfs_inode_log_format_t *)src_buf;
+       if (len == sizeof(struct xfs_inode_log_format)) {
+               return (struct xfs_inode_log_format *)src_buf;
        }
 
        in_f32 = (struct xfs_inode_log_format_32 *)src_buf;
index c3112ceba0defc563dbc11dc1f659c92fd956b97..c80bf3478ad9b060bb640d8fe3edb28191b338cc 100644 (file)
@@ -282,8 +282,8 @@ STATIC void
 xlog_recover_print_inode(
        xlog_recover_item_t     *item)
 {
-       xfs_inode_log_format_t  f_buf;
-       xfs_inode_log_format_t  *f;
+       struct xfs_inode_log_format     f_buf;
+       struct xfs_inode_log_format     *f;
        int                     attr_index;
        int                     hasdata;
        int                     hasattr;
index fc10e16ca5cb2b9a392c20d167d45f569359aac7..20f1be4e597ddd5d31a556996cb908f64f6d8d77 100644 (file)
@@ -41,8 +41,8 @@ extern void print_xlog_record_line(void);
 extern void print_xlog_op_line(void);
 extern void print_stars(void);
 
-extern xfs_inode_log_format_t *
-       xfs_inode_item_format_convert(char *, uint, xfs_inode_log_format_t *);
+extern struct xfs_inode_log_format *
+       xfs_inode_item_format_convert(char *, uint, struct xfs_inode_log_format *);
 
 extern int xlog_print_trans_efi(char **ptr, uint src_len, int continued);
 extern void xlog_recover_print_efi(xlog_recover_item_t *item);