]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ceph: switch to corrected encoding of max_xattr_size in mdsmap
authorXiubo Li <xiubli@redhat.com>
Mon, 19 Feb 2024 05:14:32 +0000 (13:14 +0800)
committerSasha Levin <sashal@kernel.org>
Fri, 15 Mar 2024 14:48:13 +0000 (10:48 -0400)
commit641eb2d9ab1efe79b08fadc87709eb5308bef92e
tree0f906ed180ca65c8c00e839527205d16d7967e8b
parent3b897ea5ee7583bc45a75360c6724481da9fb6f9
ceph: switch to corrected encoding of max_xattr_size in mdsmap

[ Upstream commit 51d31149a88b5c5a8d2d33f06df93f6187a25b4c ]

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: Sasha Levin <sashal@kernel.org>
fs/ceph/mdsmap.c
include/linux/ceph/mdsmap.h