All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Carlos Maiolino <cem@kernel.org>
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH 01/15] xfs: don't bother setting oh_tid in callers of xlog_write
Date: Wed, 25 Nov 2026 15:42:22 +0100	[thread overview]
Message-ID: <20261125144430.728485-2-hch@lst.de> (raw)
In-Reply-To: <20261125144430.728485-1-hch@lst.de>

xlog_write always stamps oh_tid into the ophdr written to the log, so
don't bother setting in the callers as those values will always be
overwritten.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/xfs_log.c     | 1 -
 fs/xfs/xfs_log_cil.c | 4 ----
 2 files changed, 5 deletions(-)

diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 74b324f915a1..9029e7856f1c 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -841,7 +841,6 @@ xlog_write_unmount_record(
 	} unmount_rec = {
 		.ophdr = {
 			.oh_clientid = XFS_LOG,
-			.oh_tid = cpu_to_be32(ticket->t_tid),
 			.oh_flags = XLOG_UNMOUNT_TRANS,
 		},
 		.ulf = {
diff --git a/fs/xfs/xfs_log_cil.c b/fs/xfs/xfs_log_cil.c
index b54a421cab63..7ba4ef32479c 100644
--- a/fs/xfs/xfs_log_cil.c
+++ b/fs/xfs/xfs_log_cil.c
@@ -1189,7 +1189,6 @@ xlog_cil_write_commit_record(
 	struct xlog		*log = ctx->cil->xc_log;
 	struct xlog_op_header	ophdr = {
 		.oh_clientid = XFS_TRANSACTION,
-		.oh_tid = cpu_to_be32(ctx->ticket->t_tid),
 		.oh_flags = XLOG_COMMIT_TRANS,
 	};
 	struct xfs_log_iovec	reg = {
@@ -1237,12 +1236,10 @@ xlog_cil_build_trans_hdr(
 	int			num_iovecs)
 {
 	struct xlog_ticket	*tic = ctx->ticket;
-	__be32			tid = cpu_to_be32(tic->t_tid);
 
 	memset(hdr, 0, sizeof(*hdr));
 
 	/* Log start record */
-	hdr->oph[0].oh_tid = tid;
 	hdr->oph[0].oh_clientid = XFS_TRANSACTION;
 	hdr->oph[0].oh_flags = XLOG_START_TRANS;
 
@@ -1252,7 +1249,6 @@ xlog_cil_build_trans_hdr(
 	hdr->lhdr[0].i_type = XLOG_REG_TYPE_LRHEADER;
 
 	/* log opheader */
-	hdr->oph[1].oh_tid = tid;
 	hdr->oph[1].oh_clientid = XFS_TRANSACTION;
 	hdr->oph[1].oh_len = cpu_to_be32(sizeof(struct xfs_trans_header));
 
-- 
2.53.0


  reply	other threads:[~2026-11-25 14:44 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 14:42 handle ophdr formatting entirely in xlog_write Christoph Hellwig
2026-11-25 14:42 ` Christoph Hellwig [this message]
2026-11-26 18:29   ` [PATCH 01/15] xfs: don't bother setting oh_tid in callers of xlog_write Carlos Maiolino
2026-11-25 14:42 ` [PATCH 02/15] xfs: always set oh_len in xlog_write Christoph Hellwig
2026-11-26 18:51   ` Carlos Maiolino
2026-11-25 14:42 ` [PATCH 03/15] xfs: refactor the continuation loop in xlog_write_partial Christoph Hellwig
2026-11-26 18:51   ` Carlos Maiolino
2026-11-25 14:42 ` [PATCH 04/15] xfs: factor out a xlog_write_ophdr helper Christoph Hellwig
2026-11-26 18:51   ` Carlos Maiolino
2026-11-25 14:42 ` [PATCH 05/15] xfs: factor out a xlog_write_cont_ophdr helper Christoph Hellwig
2026-11-26 18:51   ` Carlos Maiolino
2026-11-30 13:03     ` Christoph Hellwig
2026-11-25 14:42 ` [PATCH 06/15] xfs: factor out a xlog_write_region helper Christoph Hellwig
2026-11-25 14:42 ` [PATCH 07/15] xfs: remove xlog_write_{partial,full} Christoph Hellwig
2026-11-25 14:42 ` [PATCH 08/15] xfs: build the entire ophdr in xlog_write_ophdr Christoph Hellwig
2026-11-25 14:42 ` [PATCH 09/15] xfs: directly format ophdrs into the iclog Christoph Hellwig
2026-11-25 14:42 ` [PATCH 10/15] xfs: make the i_len field in xfs_log_iovec an uint32_t Christoph Hellwig
2026-11-25 14:42 ` [PATCH 11/15] xfs: improve an assert in xlog_format_commit Christoph Hellwig
2026-11-25 14:42 ` [PATCH 12/15] xfs: remove the lv_bytes field from struct xfs_log_vec Christoph Hellwig
2026-11-25 14:42 ` [PATCH 13/15] xfs: create ophdrs on the fly in xlog_write Christoph Hellwig
2026-11-25 14:42 ` [PATCH 14/15] xfs: move building the checkpoint header into xlog_cil_write_chain Christoph Hellwig
2026-11-25 14:42 ` [PATCH 15/15] xfs: cleanup log vec used tracking Christoph Hellwig
2026-11-25 20:18 ` handle ophdr formatting entirely in xlog_write Dave Chinner

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=20261125144430.728485-2-hch@lst.de \
    --to=hch@lst.de \
    --cc=cem@kernel.org \
    --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.