All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: alexjlzheng@gmail.com
Cc: cem@kernel.org, linux-xfs@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Jinliang Zheng <alexjlzheng@tencent.com>
Subject: Re: [PATCH] xfs: use xfs_csn_t for xlog_cil_push_now() push_seq parameter
Date: Thu, 2 Jul 2026 08:53:05 -0700	[thread overview]
Message-ID: <20260702155305.GD9392@frogsfrogsfrogs> (raw)
In-Reply-To: <20260702115611.3605810-1-alexjlzheng@tencent.com>

On Thu, Jul 02, 2026 at 07:56:11PM +0800, alexjlzheng@gmail.com wrote:
> From: Jinliang Zheng <alexjlzheng@tencent.com>
> 
> The push_seq argument to xlog_cil_push_now() carries a CIL checkpoint
> sequence number, not a log sequence number (LSN).
> 
> Change the parameter type from xfs_lsn_t to xfs_csn_t to correctly
> reflect its semantics and match the surrounding types. Both types are
> int64_t under the hood, so this is a type-annotation fix with no
> behavioural change.
> 
> Signed-off-by: Jinliang Zheng <alexjlzheng@tencent.com>

I wonder, did you find with some tool?  And would it be useful to add
__bitwise to the typedef so that static checkers will find the places
where we screw this up?

Regardless, this is correct so
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> ---
>  fs/xfs/xfs_log_cil.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_log_cil.c b/fs/xfs/xfs_log_cil.c
> index edc368938f30..639f875a8fb2 100644
> --- a/fs/xfs/xfs_log_cil.c
> +++ b/fs/xfs/xfs_log_cil.c
> @@ -1710,7 +1710,7 @@ xlog_cil_push_background(
>  static void
>  xlog_cil_push_now(
>  	struct xlog	*log,
> -	xfs_lsn_t	push_seq,
> +	xfs_csn_t	push_seq,
>  	bool		async)
>  {
>  	struct xfs_cil	*cil = log->l_cilp;
> -- 
> 2.43.7
> 
> 

  reply	other threads:[~2026-07-02 15:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-02 11:56 [PATCH] xfs: use xfs_csn_t for xlog_cil_push_now() push_seq parameter alexjlzheng
2026-07-02 15:53 ` Darrick J. Wong [this message]
2026-07-03  3:33   ` Jinliang Zheng

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=20260702155305.GD9392@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=alexjlzheng@gmail.com \
    --cc=alexjlzheng@tencent.com \
    --cc=cem@kernel.org \
    --cc=linux-kernel@vger.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.