From: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
To: Alex Markuze <amarkuze@redhat.com>,
"ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>
Cc: Viacheslav Dubeyko <vdubeyko@redhat.com>,
"idryomov@gmail.com" <idryomov@gmail.com>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH v2 1/3] ceph: handle InodeStat v8 versioned field in reply parsing
Date: Tue, 2 Dec 2025 20:44:10 +0000 [thread overview]
Message-ID: <8e9ec4b352e3f0b67bc14ae9c78ee4f623a4900d.camel@ibm.com> (raw)
In-Reply-To: <20251202155750.2565696-2-amarkuze@redhat.com>
On Tue, 2025-12-02 at 15:57 +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 | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
> index 1740047aef0f..d7d8178e1f9a 100644
> --- a/fs/ceph/mds_client.c
> +++ b/fs/ceph/mds_client.c
> @@ -231,6 +231,26 @@ static int parse_reply_info_in(void **p, void *end,
> info->fscrypt_file_len, bad);
> }
> }
> +
> + /*
> + * InodeStat encoding versions:
> + * v1-v7: various fields added over time
> + * v8: added optmetadata (versioned sub-structure containing
> + * optional inode metadata like charmap for case-insensitive
> + * filesystems). The kernel client doesn't support
> + * case-insensitive lookups, so we skip this field.
> + * v9: added subvolume_id (parsed below)
> + */
> + if (struct_v >= 8) {
> + u32 v8_struct_len;
> +
> + /* skip optmetadata versioned sub-structure */
> + ceph_decode_skip_8(p, end, bad); /* struct_v */
> + ceph_decode_skip_8(p, end, bad); /* struct_compat */
> + 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 */
Looks good.
Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Thanks,
Slava.
next prev parent reply other threads:[~2025-12-02 20:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-02 15:57 [PATCH v2 0/3] ceph: add subvolume metrics reporting support Alex Markuze
2025-12-02 15:57 ` [PATCH v2 1/3] ceph: handle InodeStat v8 versioned field in reply parsing Alex Markuze
2025-12-02 20:44 ` Viacheslav Dubeyko [this message]
2025-12-02 15:57 ` [PATCH v2 2/3] ceph: parse subvolume_id from InodeStat v9 and store in inode Alex Markuze
2025-12-02 20:50 ` Viacheslav Dubeyko
2025-12-03 15:48 ` Alex Markuze
2025-12-02 15:57 ` [PATCH v2 3/3] ceph: add subvolume metrics collection and reporting Alex Markuze
2025-12-02 22:54 ` Viacheslav Dubeyko
2025-12-03 15:57 ` Alex Markuze
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=8e9ec4b352e3f0b67bc14ae9c78ee4f623a4900d.camel@ibm.com \
--to=slava.dubeyko@ibm.com \
--cc=amarkuze@redhat.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).