mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Viacheslav Dubeyko <vdubeyko@redhat.com>
To: Alex Markuze <amarkuze@redhat.com>, ceph-devel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, idryomov@gmail.com
Subject: Re: [EXTERNAL] [PATCH v2 2/7] ceph: use proper endian conversion for flock_len in reconnect
Date: Wed, 15 Apr 2026 12:57:41 -0700	[thread overview]
Message-ID: <e912c9fe27f9254b570178615a2f5248dea8acc5.camel@redhat.com> (raw)
In-Reply-To: <20260415170043.3882912-3-amarkuze@redhat.com>

On Wed, 2026-04-15 at 17:00 +0000, Alex Markuze wrote:
> Replace the __force __le32 cast with cpu_to_le32() for the flock_len field
> in reconnect_caps_cb(). The old code used a type-system bypass to silence
> sparse; the new form uses the proper endian conversion macro.
> 
> Also switch from a raw bitmask test against i_ceph_flags to test_bit() on
> the named CEPH_I_ERROR_FILELOCK_BIT, which is the correct accessor for the
> unsigned long flags field after the bit-position conversion.
> 
> Signed-off-by: Alex Markuze <amarkuze@redhat.com>
> ---
>  fs/ceph/mds_client.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
> index ccf0d53dde2b..871f0eef468d 100644
> --- a/fs/ceph/mds_client.c
> +++ b/fs/ceph/mds_client.c
> @@ -4693,8 +4693,9 @@ static int reconnect_caps_cb(struct inode *inode, int mds, void *arg)
>  		rec.v2.issued = cpu_to_le32(cap->issued);
>  		rec.v2.snaprealm = cpu_to_le64(ci->i_snap_realm->ino);
>  		rec.v2.pathbase = cpu_to_le64(path_info.vino.ino);
> -		rec.v2.flock_len = (__force __le32)
> -			((ci->i_ceph_flags & CEPH_I_ERROR_FILELOCK) ? 0 : 1);
> +		rec.v2.flock_len = cpu_to_le32(
> +			test_bit(CEPH_I_ERROR_FILELOCK_BIT,
> +				 &ci->i_ceph_flags) ? 0 : 1);
>  	} else {
>  		struct timespec64 ts;
>  

Makes sense.

Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>

Thanks,
Slava.


  reply	other threads:[~2026-04-15 19:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-15 17:00 [PATCH v2 0/7] ceph: manual client session reset Alex Markuze
2026-04-15 17:00 ` [PATCH v2 1/7] ceph: convert inode flags to named bit positions and atomic bitops Alex Markuze
2026-04-15 19:54   ` [EXTERNAL] " Viacheslav Dubeyko
2026-04-16 12:46     ` Alex Markuze
2026-04-15 17:00 ` [PATCH v2 2/7] ceph: use proper endian conversion for flock_len in reconnect Alex Markuze
2026-04-15 19:57   ` Viacheslav Dubeyko [this message]
2026-04-15 17:00 ` [PATCH v2 3/7] ceph: harden send_mds_reconnect and handle active-MDS peer reset Alex Markuze
2026-04-16 19:33   ` [EXTERNAL] " Viacheslav Dubeyko
2026-04-15 17:00 ` [PATCH v2 4/7] ceph: add diagnostic timeout loop to wait_caps_flush() Alex Markuze
2026-04-16 19:55   ` [EXTERNAL] " Viacheslav Dubeyko
2026-04-15 17:00 ` [PATCH v2 5/7] ceph: add client reset state machine and session teardown Alex Markuze
2026-04-16 21:50   ` [EXTERNAL] " Viacheslav Dubeyko
2026-04-15 17:00 ` [PATCH v2 6/7] ceph: add manual reset debugfs control and tracepoints Alex Markuze
2026-04-17 18:41   ` [EXTERNAL] " Viacheslav Dubeyko
2026-04-15 17:00 ` [PATCH v2 7/7] ceph: add manual reset selftests and validation harness Alex Markuze
2026-04-17 18:48   ` [EXTERNAL] " Viacheslav Dubeyko

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=e912c9fe27f9254b570178615a2f5248dea8acc5.camel@redhat.com \
    --to=vdubeyko@redhat.com \
    --cc=amarkuze@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®