]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfsprogs-dev.git/commitdiff
xfs: remove the xlog_rec_header_t typedef
authorChristoph Hellwig <hch@lst.de>
Sun, 22 Feb 2026 22:41:00 +0000 (14:41 -0800)
committerAndrey Albershteyn <aalbersh@kernel.org>
Mon, 2 Mar 2026 09:54:27 +0000 (10:54 +0100)
Source kernel commit: ef1e275638fe6f6d54c18a770c138e4d5972b280

There are almost no users of the typedef left, kill it and switch the
remaining users to use the underlying struct.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
include/libxlog.h
libxfs/rdwr.c
libxfs/xfs_log_format.h
libxlog/util.c
libxlog/xfs_log_recover.c
logprint/log_dump.c

index 3948c0b8d19b1dc12f31d3cfb4bc9be13ec89022..cf39e7402d1378be5262de77c842ab219036ed58 100644 (file)
@@ -99,9 +99,9 @@ extern int    xlog_do_recovery_pass(struct xlog *log, xfs_daddr_t head_blk,
 extern int     xlog_recover_do_trans(struct xlog *log, struct xlog_recover *trans,
                                int pass);
 extern int     xlog_header_check_recover(xfs_mount_t *mp,
-                               xlog_rec_header_t *head);
+                               struct xlog_rec_header *head);
 extern int     xlog_header_check_mount(xfs_mount_t *mp,
-                               xlog_rec_header_t *head);
+                               struct xlog_rec_header *head);
 
 #define xlog_assign_atomic_lsn(l,a,b) ((void) 0)
 #define xlog_assign_grant_head(l,a,b) ((void) 0)
index 500a8d815492095a2f89eeb0408c12c05e767984..3419e821ef0a2948959391cdc2815f9672a584ba 100644 (file)
@@ -1297,7 +1297,7 @@ libxfs_log_header(
        libxfs_get_block_t      *nextfunc,
        void                    *private)
 {
-       xlog_rec_header_t       *head = (xlog_rec_header_t *)caddr;
+       struct xlog_rec_header  *head = (struct xlog_rec_header *)caddr;
        char                    *p = caddr;
        __be32                  cycle_lsn;
        int                     i, len;
index 4cb69bd285ca13cc29cf7de6e07beb016f41688b..908e7060428ccb4528703b2080530c8cf788a6d4 100644 (file)
@@ -136,7 +136,7 @@ struct xlog_rec_ext_header {
 #define XLOG_REC_EXT_SIZE \
        offsetofend(struct xlog_rec_ext_header, xh_cycle_data)
 
-typedef struct xlog_rec_header {
+struct xlog_rec_header {
        __be32    h_magicno;    /* log record (LR) identifier           :  4 */
        __be32    h_cycle;      /* write cycle of log                   :  4 */
        __be32    h_version;    /* LR version                           :  4 */
@@ -174,7 +174,7 @@ typedef struct xlog_rec_header {
 
        __u8      h_reserved[184];
        struct xlog_rec_ext_header h_ext[];
-} xlog_rec_header_t;
+};
 
 #ifdef __i386__
 #define XLOG_REC_SIZE          offsetofend(struct xlog_rec_header, h_size)
index 6e21f1a895d30a4468fd80178015954d1be19178..3cfaeb511adaa485caad26bd30aab862c7d6bdcb 100644 (file)
@@ -67,7 +67,7 @@ xlog_is_dirty(
 }
 
 static int
-header_check_uuid(xfs_mount_t *mp, xlog_rec_header_t *head)
+header_check_uuid(xfs_mount_t *mp, struct xlog_rec_header *head)
 {
     char uu_log[64], uu_sb[64];
 
@@ -89,7 +89,7 @@ header_check_uuid(xfs_mount_t *mp, xlog_rec_header_t *head)
 }
 
 int
-xlog_header_check_recover(xfs_mount_t *mp, xlog_rec_header_t *head)
+xlog_header_check_recover(xfs_mount_t *mp, struct xlog_rec_header *head)
 {
     if (print_record_header)
        printf(_("\nLOG REC AT LSN cycle %d block %d (0x%x, 0x%x)\n"),
@@ -125,7 +125,7 @@ xlog_header_check_recover(xfs_mount_t *mp, xlog_rec_header_t *head)
 }
 
 int
-xlog_header_check_mount(xfs_mount_t *mp, xlog_rec_header_t *head)
+xlog_header_check_mount(xfs_mount_t *mp, struct xlog_rec_header *head)
 {
     if (platform_uuid_is_null(&head->h_fs_uuid)) return 0;
     if (header_check_uuid(mp, head)) {
index 843b8e9c47a4551e32289469b73f5d66ded61c57..65e3c782d59674fc16296fe5b15001f2568ede4f 100644 (file)
@@ -296,7 +296,7 @@ xlog_find_verify_log_record(
        xfs_daddr_t             i;
        struct xfs_buf          *bp;
        char                    *offset = NULL;
-       xlog_rec_header_t       *head = NULL;
+       struct xlog_rec_header  *head = NULL;
        int                     error = 0;
        int                     smallmem = 0;
        int                     num_blks = *last_blk - start_blk;
@@ -331,7 +331,7 @@ xlog_find_verify_log_record(
                                goto out;
                }
 
-               head = (xlog_rec_header_t *)offset;
+               head = (struct xlog_rec_header *)offset;
 
                if (head->h_magicno == cpu_to_be32(XLOG_HEADER_MAGIC_NUM))
                        break;
@@ -673,7 +673,7 @@ xlog_find_tail(
        xfs_daddr_t             *head_blk,
        xfs_daddr_t             *tail_blk)
 {
-       xlog_rec_header_t       *rhead;
+       struct xlog_rec_header  *rhead;
        struct xlog_op_header   *op_head;
        char                    *offset = NULL;
        struct xfs_buf          *bp;
@@ -747,7 +747,7 @@ xlog_find_tail(
        }
 
        /* find blk_no of tail of log */
-       rhead = (xlog_rec_header_t *)offset;
+       rhead = (struct xlog_rec_header *)offset;
        *tail_blk = BLOCK_LSN(be64_to_cpu(rhead->h_tail_lsn));
 
        /*
@@ -1413,7 +1413,7 @@ xlog_do_recovery_pass(
        xfs_daddr_t             tail_blk,
        int                     pass)
 {
-       xlog_rec_header_t       *rhead;
+       struct xlog_rec_header  *rhead;
        xfs_daddr_t             blk_no;
        char                    *offset;
        struct xfs_buf          *hbp, *dbp;
@@ -1442,7 +1442,7 @@ xlog_do_recovery_pass(
                if (error)
                        goto bread_err1;
 
-               rhead = (xlog_rec_header_t *)offset;
+               rhead = (struct xlog_rec_header *)offset;
                error = xlog_valid_rec_header(log, rhead, tail_blk);
                if (error)
                        goto bread_err1;
@@ -1479,7 +1479,7 @@ xlog_do_recovery_pass(
                        if (error)
                                goto bread_err2;
 
-                       rhead = (xlog_rec_header_t *)offset;
+                       rhead = (struct xlog_rec_header *)offset;
                        error = xlog_valid_rec_header(log, rhead, blk_no);
                        if (error)
                                goto bread_err2;
@@ -1554,7 +1554,7 @@ xlog_do_recovery_pass(
                                if (error)
                                        goto bread_err2;
                        }
-                       rhead = (xlog_rec_header_t *)offset;
+                       rhead = (struct xlog_rec_header *)offset;
                        error = xlog_valid_rec_header(log, rhead,
                                                split_hblks ? blk_no : 0);
                        if (error)
@@ -1628,7 +1628,7 @@ xlog_do_recovery_pass(
                        if (error)
                                goto bread_err2;
 
-                       rhead = (xlog_rec_header_t *)offset;
+                       rhead = (struct xlog_rec_header *)offset;
                        error = xlog_valid_rec_header(log, rhead, blk_no);
                        if (error)
                                goto bread_err2;
index 1de0206af94a9e81118d9aa10a031a9da289e1b2..b403c01e99e839fe0c8dcc15e6cc611e21782464 100644 (file)
@@ -21,11 +21,11 @@ xfs_log_dump(
        int                     r;
        uint                    last_cycle = -1;
        xfs_daddr_t             blkno, dupblkno;
-       xlog_rec_header_t       *hdr;
+       struct xlog_rec_header  *hdr;
        char                    buf[XLOG_HEADER_SIZE];
 
        dupblkno = 0;
-       hdr = (xlog_rec_header_t *)buf;
+       hdr = (struct xlog_rec_header *)buf;
        xlog_print_lseek(log, fd, 0, SEEK_SET);
        for (blkno = 0; blkno < log->l_logBBsize; blkno++) {
                r = read(fd, buf, sizeof(buf));