Skip to content

ceph: switch to corrected encoding of max_xattr_size in mdsmap

Xiubo Li requested to merge xiubli/centos-stream-9:RHEL-26722 into main

JIRA: https://issues.redhat.com/browse/RHEL-26722 Upstream Status: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git Conflicts:

  • minor mismatches due to missing commit 522dc5108f07 ("libceph, ceph: move mdsmap.h to fs/ceph")

commit 51d31149a88b5c5a8d2d33f06df93f6187a25b4c Author: Xiubo Li xiubli@redhat.com Date: Mon Feb 19 13:14:32 2024 +0800

ceph: switch to corrected encoding of max_xattr_size in mdsmap

The addition of bal_rank_mask with encoding version 17 was merged
into ceph.git in Oct 2022 and made it into v18.2.0 release normally.
A few months later, the much delayed addition of max_xattr_size got
merged, also with encoding version 17, placed before bal_rank_mask
in the encoding -- but it didn't make v18.2.0 release.

The way this ended up being resolved on the MDS side is that
bal_rank_mask will continue to be encoded in version 17 while
max_xattr_size is now encoded in version 18.  This does mean that
older kernels will misdecode version 17, but this is also true for
v18.2.0 and v18.2.1 clients in userspace.

The best we can do is backport this adjustment -- see ceph.git
commit 78abfeaff27fee343fb664db633de5b221699a73 for details.

[ idryomov: changelog ]

Cc: stable@vger.kernel.org
Link: https://tracker.ceph.com/issues/64440
Fixes: d93231a6bc8a ("ceph: prevent a client from exceeding the MDS maximum xattr size")
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@ibm.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>

Signed-off-by: Xiubo Li xiubli@redhat.com

Closes RHEL-26722

Edited by Xiubo Li

Merge request reports