All of lore.kernel.org
 help / color / mirror / Atom feed
From: cem@kernel.org
To: linux-xfs@vger.kernel.org
Cc: hch@lst.de, david@fromorbit.com, djwong@kernel.org
Subject: [PATCH 2/2] xfs: kill xlog_in_core_2_t typedef
Date: Fri, 20 Jun 2025 09:08:00 +0200	[thread overview]
Message-ID: <20250620070813.919516-3-cem@kernel.org> (raw)
In-Reply-To: <20250620070813.919516-1-cem@kernel.org>

From: Carlos Maiolino <cem@kernel.org>

Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
---
 fs/xfs/libxfs/xfs_log_format.h | 4 ++--
 fs/xfs/xfs_log.c               | 4 ++--
 fs/xfs/xfs_log_priv.h          | 2 +-
 fs/xfs/xfs_log_recover.c       | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/fs/xfs/libxfs/xfs_log_format.h b/fs/xfs/libxfs/xfs_log_format.h
index 0d637c276db0..050df089e324 100644
--- a/fs/xfs/libxfs/xfs_log_format.h
+++ b/fs/xfs/libxfs/xfs_log_format.h
@@ -188,11 +188,11 @@ typedef struct xlog_rec_ext_header {
 /*
  * Quite misnamed, because this union lays out the actual on-disk log buffer.
  */
-typedef union xlog_in_core2 {
+union xlog_in_core2 {
 	xlog_rec_header_t	hic_header;
 	xlog_rec_ext_header_t	hic_xheader;
 	char			hic_sector[XLOG_HEADER_SIZE];
-} xlog_in_core_2_t;
+};
 
 /* not an on-disk structure, but needed by log recovery in userspace */
 typedef struct xfs_log_iovec {
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index dbd8c50d01fd..9e293f943e08 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -1530,7 +1530,7 @@ xlog_pack_data(
 	}
 
 	if (xfs_has_logv2(log->l_mp)) {
-		xlog_in_core_2_t *xhdr = iclog->ic_data;
+		union xlog_in_core2	*xhdr = iclog->ic_data;
 
 		for ( ; i < BTOBB(size); i++) {
 			j = i / (XLOG_HEADER_CYCLE_SIZE / BBSIZE);
@@ -3310,7 +3310,7 @@ xlog_verify_iclog(
 {
 	xlog_op_header_t	*ophead;
 	struct xlog_in_core	*icptr;
-	xlog_in_core_2_t	*xhdr;
+	union xlog_in_core2	*xhdr;
 	void			*base_ptr, *ptr, *p;
 	ptrdiff_t		field_offset;
 	uint8_t			clientid;
diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h
index 27912a9b7340..e8f07e9c223b 100644
--- a/fs/xfs/xfs_log_priv.h
+++ b/fs/xfs/xfs_log_priv.h
@@ -197,7 +197,7 @@ struct xlog_in_core {
 
 	/* reference counts need their own cacheline */
 	atomic_t		ic_refcnt ____cacheline_aligned_in_smp;
-	xlog_in_core_2_t	*ic_data;
+	union xlog_in_core2	*ic_data;
 #define ic_header	ic_data->hic_header
 #ifdef DEBUG
 	bool			ic_fail_crc : 1;
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index 2f76531842f8..51cfc97aad23 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -2872,7 +2872,7 @@ xlog_unpack_data(
 	}
 
 	if (xfs_has_logv2(log->l_mp)) {
-		xlog_in_core_2_t *xhdr = (xlog_in_core_2_t *)rhead;
+		union xlog_in_core2 *xhdr = (union xlog_in_core2 *)rhead;
 		for ( ; i < BTOBB(be32_to_cpu(rhead->h_len)); i++) {
 			j = i / (XLOG_HEADER_CYCLE_SIZE / BBSIZE);
 			k = i % (XLOG_HEADER_CYCLE_SIZE / BBSIZE);
-- 
2.49.0


  parent reply	other threads:[~2025-06-20  7:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-20  7:07 [PATCH 0/2] xfs: iclog small cleanup cem
2025-06-20  7:07 ` [PATCH 1/2] xfs: replace iclogs circular list with a list_head cem
2025-06-24  2:16   ` Dave Chinner
2025-06-24  4:43     ` Carlos Maiolino
2025-06-24 13:57     ` Christoph Hellwig
2025-06-24 18:17       ` Carlos Maiolino
2025-06-25  6:21         ` Christoph Hellwig
2025-06-25  8:20           ` Carlos Maiolino
2025-06-25 11:22             ` Christoph Hellwig
2025-06-20  7:08 ` cem [this message]
2025-06-24 13:59   ` [PATCH 2/2] xfs: kill xlog_in_core_2_t typedef Christoph Hellwig
2025-06-25  8:21     ` Carlos Maiolino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250620070813.919516-3-cem@kernel.org \
    --to=cem@kernel.org \
    --cc=david@fromorbit.com \
    --cc=djwong@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.