]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfsprogs-dev.git/commitdiff
xfs: convert xlog_op_header_t typedef to struct
authorAndrey Albershteyn <aalbersh@redhat.com>
Fri, 5 Dec 2025 15:01:45 +0000 (16:01 +0100)
committerAndrey Albershteyn <aalbersh@kernel.org>
Mon, 8 Dec 2025 17:03:15 +0000 (18:03 +0100)
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrey Albershteyn <aalbersh@kernel.org>
libxfs/rdwr.c
libxfs/util.c
libxlog/xfs_log_recover.c
logprint/log_redo.c
logprint/logprint.h

index 5c14dbb5c82b7c4b058616367e281a2bacad1635..500a8d815492095a2f89eeb0408c12c05e767984 100644 (file)
@@ -120,7 +120,7 @@ libxfs_device_zero(struct xfs_buftarg *btp, xfs_daddr_t start, uint len)
 
 static void unmount_record(void *p)
 {
-       xlog_op_header_t        *op = (xlog_op_header_t *)p;
+       struct xlog_op_header   *op = (struct xlog_op_header *)p;
        /* the data section must be 32 bit size aligned */
        struct {
            uint16_t magic;
@@ -137,7 +137,7 @@ static void unmount_record(void *p)
        op->oh_res2 = 0;
 
        /* and the data for this op */
-       memcpy((char *)p + sizeof(xlog_op_header_t), &magic, sizeof(magic));
+       memcpy((char *)p + sizeof(struct xlog_op_header), &magic, sizeof(magic));
 }
 
 static char *next(
index 334e88cd3fcb55fb0d94910ec2c16cf1a40bbc81..13b8297f73c97a0628593276d6c7bdfbf422ddb6 100644 (file)
@@ -85,11 +85,11 @@ xfs_log_calc_unit_res(
         */
 
        /* for trans header */
-       unit_bytes += sizeof(xlog_op_header_t);
+       unit_bytes += sizeof(struct xlog_op_header);
        unit_bytes += sizeof(xfs_trans_header_t);
 
        /* for start-rec */
-       unit_bytes += sizeof(xlog_op_header_t);
+       unit_bytes += sizeof(struct xlog_op_header);
 
        /*
         * for LR headers - the space for data in an iclog is the size minus
@@ -112,12 +112,12 @@ xfs_log_calc_unit_res(
        num_headers = howmany(unit_bytes, iclog_space);
 
        /* for split-recs - ophdrs added when data split over LRs */
-       unit_bytes += sizeof(xlog_op_header_t) * num_headers;
+       unit_bytes += sizeof(struct xlog_op_header) * num_headers;
 
        /* add extra header reservations if we overrun */
        while (!num_headers ||
               howmany(unit_bytes, iclog_space) > num_headers) {
-               unit_bytes += sizeof(xlog_op_header_t);
+               unit_bytes += sizeof(struct xlog_op_header);
                num_headers++;
        }
        unit_bytes += iclog_header_size * num_headers;
index 7ef43956e945532a8986c4f88f5582c05d027c1d..f46cb319779aec57afb34e0b0c1d3e51d8e819b1 100644 (file)
@@ -674,7 +674,7 @@ xlog_find_tail(
        xfs_daddr_t             *tail_blk)
 {
        xlog_rec_header_t       *rhead;
-       xlog_op_header_t        *op_head;
+       struct xlog_op_header   *op_head;
        char                    *offset = NULL;
        struct xfs_buf          *bp;
        int                     error, i, found;
@@ -808,7 +808,7 @@ xlog_find_tail(
                if (error)
                        goto done;
 
-               op_head = (xlog_op_header_t *)offset;
+               op_head = (struct xlog_op_header *)offset;
                if (op_head->oh_flags & XLOG_UNMOUNT_TRANS) {
                        /*
                         * Set tail and last sync so that newly written
@@ -1199,7 +1199,7 @@ xlog_recover_process_data(
 {
        char                    *lp;
        int                     num_logops;
-       xlog_op_header_t        *ohead;
+       struct xlog_op_header   *ohead;
        struct xlog_recover     *trans;
        xlog_tid_t              tid;
        int                     error;
@@ -1214,9 +1214,9 @@ xlog_recover_process_data(
                return (XFS_ERROR(EIO));
 
        while ((dp < lp) && num_logops) {
-               ASSERT(dp + sizeof(xlog_op_header_t) <= lp);
-               ohead = (xlog_op_header_t *)dp;
-               dp += sizeof(xlog_op_header_t);
+               ASSERT(dp + sizeof(struct xlog_op_header) <= lp);
+               ohead = (struct xlog_op_header *)dp;
+               dp += sizeof(struct xlog_op_header);
                if (ohead->oh_clientid != XFS_TRANSACTION &&
                    ohead->oh_clientid != XFS_LOG) {
                        xfs_warn(log->l_mp, "%s: bad clientid 0x%x",
index f5bac21d35c8808092a5eafd304fd13091948644..e442d6f7cd272082ec586f773d5d318ab1dfef94 100644 (file)
@@ -793,7 +793,7 @@ xlog_print_trans_attri(
        int                             *i)
 {
        struct xfs_attri_log_format     *src_f = NULL;
-       xlog_op_header_t                *head = NULL;
+       struct xlog_op_header           *head = NULL;
        void                            *name_ptr = NULL;
        void                            *new_name_ptr = NULL;
        void                            *value_ptr = NULL;
@@ -850,7 +850,7 @@ xlog_print_trans_attri(
        if (name_len > 0) {
                printf(_("\n"));
                (*i)++;
-               head = (xlog_op_header_t *)*ptr;
+               head = (struct xlog_op_header *)*ptr;
                xlog_print_op_header(head, *i, ptr);
                name_ptr = *ptr;
                error = xlog_print_trans_attri_name(ptr,
@@ -862,7 +862,7 @@ xlog_print_trans_attri(
        if (new_name_len > 0) {
                printf(_("\n"));
                (*i)++;
-               head = (xlog_op_header_t *)*ptr;
+               head = (struct xlog_op_header *)*ptr;
                xlog_print_op_header(head, *i, ptr);
                new_name_ptr = *ptr;
                error = xlog_print_trans_attri_name(ptr,
@@ -874,7 +874,7 @@ xlog_print_trans_attri(
        if (value_len > 0) {
                printf(_("\n"));
                (*i)++;
-               head = (xlog_op_header_t *)*ptr;
+               head = (struct xlog_op_header *)*ptr;
                xlog_print_op_header(head, *i, ptr);
                value_ptr = *ptr;
                error = xlog_print_trans_attri_value(ptr,
@@ -886,7 +886,7 @@ xlog_print_trans_attri(
        if (new_value_len > 0) {
                printf(_("\n"));
                (*i)++;
-               head = (xlog_op_header_t *)*ptr;
+               head = (struct xlog_op_header *)*ptr;
                xlog_print_op_header(head, *i, ptr);
                new_value_ptr = *ptr;
                error = xlog_print_trans_attri_value(ptr,
index 8a997fe1150e873a5437c5fd2c2fda6b1e9a30c2..aa90068c8a2af140f39dbdf03b58309a671de0e3 100644 (file)
@@ -65,7 +65,7 @@ int xlog_print_trans_attri_value(char **ptr, uint src_len, int value_len,
 extern void xlog_recover_print_attri(struct xlog_recover_item *item);
 extern int xlog_print_trans_attrd(char **ptr, uint len);
 extern void xlog_recover_print_attrd(struct xlog_recover_item *item);
-extern void xlog_print_op_header(xlog_op_header_t *op_head, int i, char **ptr);
+extern void xlog_print_op_header(struct xlog_op_header *op_head, int i, char **ptr);
 
 int xlog_print_trans_xmi(char **ptr, uint src_len, int continued);
 void xlog_recover_print_xmi(struct xlog_recover_item *item);