]> www.infradead.org Git - users/hch/xfs.git/commitdiff
xfs: remove the xlog_op_header_t typedef
authorChristoph Hellwig <hch@lst.de>
Thu, 22 May 2025 18:05:43 +0000 (20:05 +0200)
committerChristoph Hellwig <hch@lst.de>
Fri, 23 May 2025 03:53:58 +0000 (05:53 +0200)
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>
fs/xfs/libxfs/xfs_log_format.h
fs/xfs/xfs_log.c

index 4f12664d1005f756092e122441f0c05c26f75db8..6cdcc6eef539102156af3418ecfbb0b442b0e2fa 100644 (file)
@@ -141,14 +141,13 @@ struct xfs_unmount_log_format {
 #define XLOG_END_TRANS         0x10    /* End a continued transaction */
 #define XLOG_UNMOUNT_TRANS     0x20    /* Unmount a filesystem transaction */
 
-
-typedef struct xlog_op_header {
+struct xlog_op_header {
        __be32     oh_tid;      /* transaction id of operation  :  4 b */
        __be32     oh_len;      /* bytes in data region         :  4 b */
        __u8       oh_clientid; /* who sent me this             :  1 b */
        __u8       oh_flags;    /*                              :  1 b */
        __u16      oh_res2;     /* 32 bit align                 :  2 b */
-} xlog_op_header_t;
+};
 
 /* valid values for h_fmt */
 #define XLOG_FMT_UNKNOWN  0
index be38d91d1e1b2ad38041c0f5911dbcca70c04a2a..126367f5f99126abbaa6f01c7b22724a10ad18f6 100644 (file)
@@ -2561,10 +2561,11 @@ restart:
         * until you know exactly how many bytes get copied.  Therefore, wait
         * until later to update ic_offset.
         *
-        * xlog_write() algorithm assumes that at least 2 xlog_op_header_t's
+        * xlog_write() algorithm assumes that at least 2 xlog_op_header's
         * can fit into remaining data section.
         */
-       if (iclog->ic_size - iclog->ic_offset < 2*sizeof(xlog_op_header_t)) {
+       if (iclog->ic_size - iclog->ic_offset <
+           2 * sizeof(struct xlog_op_header)) {
                int             error = 0;
 
                xlog_state_switch_iclogs(log, iclog, iclog->ic_size);
@@ -3059,11 +3060,11 @@ xlog_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
@@ -3086,12 +3087,12 @@ xlog_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 += log->l_iclog_hsize * num_headers;
@@ -3228,7 +3229,7 @@ xlog_verify_iclog(
        struct xlog_in_core     *iclog,
        int                     count)
 {
-       xlog_op_header_t        *ophead;
+       struct xlog_op_header   *ophead;
        xlog_in_core_t          *icptr;
        xlog_in_core_2_t        *xhdr;
        void                    *base_ptr, *ptr, *p;
@@ -3306,7 +3307,7 @@ xlog_verify_iclog(
                                op_len = be32_to_cpu(iclog->ic_header.h_cycle_data[idx]);
                        }
                }
-               ptr += sizeof(xlog_op_header_t) + op_len;
+               ptr += sizeof(struct xlog_op_header) + op_len;
        }
 }
 #endif