]> git.apps.os.sepia.ceph.com Git - ceph-client.git/commit
ceph: use correct index when encoding client supported features
authorLuís Henriques <lhenriques@suse.de>
Tue, 24 May 2022 16:06:27 +0000 (17:06 +0100)
committerJeff Layton <jlayton@kernel.org>
Tue, 31 May 2022 14:44:35 +0000 (10:44 -0400)
commita6fffc8db39689a5c06a86aa27899e5fd87a5ec0
tree2ba6c142de6d6dca004edc02b0fe70a51045c1fb
parenta4bc836e217ae981d01c3eb9e54a03f75cb3c3f6
ceph: use correct index when encoding client supported features

Feature bits have to be encoded into the correct locations.  This hasn't
been an issue so far because the only hole in the feature bits was in bit
10 (CEPHFS_FEATURE_RECLAIM_CLIENT), which is located in the 2nd byte.  When
adding more bits that go beyond the this 2nd byte, the bug will show up.

[xiubli: remove the incorrect comment for CEPHFS_FEATURES_CLIENT_SUPPORTED]

Fixes: 9ba1e224538a ("ceph: allocate the correct amount of extra bytes for the session features")
Signed-off-by: Luís Henriques <lhenriques@suse.de>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Xiubo Li <xiubli@redhat.com>
fs/ceph/mds_client.c
fs/ceph/mds_client.h