linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Markuze <amarkuze@redhat.com>
To: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Cc: "ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>,
	Viacheslav Dubeyko <vdubeyko@redhat.com>,
	 "idryomov@gmail.com" <idryomov@gmail.com>,
	 "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH 1/3] ceph: handle InodeStat v8 versioned field in reply parsing
Date: Tue, 2 Dec 2025 12:39:09 +0200	[thread overview]
Message-ID: <CAO8a2Sge5iS7ZezQ09PoKZBGdScJ3nQe0i-+FeCMgYA+16K5ZA@mail.gmail.com> (raw)
In-Reply-To: <06142f77a8091d5ed7c1523495f6e0ebb33ad83d.camel@ibm.com>

v8 was added for case insensitive file systems, not relevant to Linux,
I can add a comment saying that.

On Mon, Dec 1, 2025 at 10:20 PM Viacheslav Dubeyko
<Slava.Dubeyko@ibm.com> wrote:
>
> On Thu, 2025-11-27 at 13:46 +0000, Alex Markuze wrote:
> > Add forward-compatible handling for the new versioned field introduced
> > in InodeStat v8. This patch only skips the field without using it,
> > preparing for future protocol extensions.
> >
> > The v8 encoding adds a versioned sub-structure that needs to be properly
> > decoded and skipped to maintain compatibility with newer MDS versions.
> >
> > Signed-off-by: Alex Markuze <amarkuze@redhat.com>
> > ---
> >  fs/ceph/mds_client.c | 12 ++++++++++++
> >  1 file changed, 12 insertions(+)
> >
> > diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
> > index 1740047aef0f..32561fc701e5 100644
> > --- a/fs/ceph/mds_client.c
> > +++ b/fs/ceph/mds_client.c
> > @@ -231,6 +231,18 @@ static int parse_reply_info_in(void **p, void *end,
> >                                                     info->fscrypt_file_len, bad);
> >                       }
> >               }
> > +
> > +             /* struct_v 8 added a versioned field - skip it */
> > +             if (struct_v >= 8) {
> > +                     u8 v8_struct_v, v8_struct_compat;
> > +                     u32 v8_struct_len;
> > +
>
> Probably, we need to have warning here that, currently, this protocol is not
> supported yet.
>
> Thanks,
> Slava.
>
> > +                     ceph_decode_8_safe(p, end, v8_struct_v, bad);
> > +                     ceph_decode_8_safe(p, end, v8_struct_compat, bad);
> > +                     ceph_decode_32_safe(p, end, v8_struct_len, bad);
> > +                     ceph_decode_skip_n(p, end, v8_struct_len, bad);
> > +             }
> > +
> >               *p = end;
> >       } else {
> >               /* legacy (unversioned) struct */


  reply	other threads:[~2025-12-02 10:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-27 13:46 [PATCH 0/3] ceph: add subvolume metrics reporting support Alex Markuze
2025-11-27 13:46 ` [PATCH 1/3] ceph: handle InodeStat v8 versioned field in reply parsing Alex Markuze
2025-11-28  1:48   ` kernel test robot
2025-12-01 20:20   ` Viacheslav Dubeyko
2025-12-02 10:39     ` Alex Markuze [this message]
2025-11-27 13:46 ` [PATCH 2/3] ceph: parse subvolume_id from InodeStat v9 and store in inode Alex Markuze
2025-12-01 23:27   ` Viacheslav Dubeyko
2025-11-27 13:46 ` [PATCH 3/3] ceph: add subvolume metrics collection and reporting Alex Markuze
2025-11-29 16:51   ` Dan Carpenter
2025-12-01 20:14 ` [PATCH 0/3] ceph: add subvolume metrics reporting support 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=CAO8a2Sge5iS7ZezQ09PoKZBGdScJ3nQe0i-+FeCMgYA+16K5ZA@mail.gmail.com \
    --to=amarkuze@redhat.com \
    --cc=Slava.Dubeyko@ibm.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=vdubeyko@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).