]> git.baikalelectronics.ru Git - kernel.git/commit
libceph: set global_id as soon as we get an auth ticket
authorIlya Dryomov <idryomov@gmail.com>
Mon, 21 Jun 2021 10:17:40 +0000 (12:17 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 24 Jun 2021 19:03:17 +0000 (21:03 +0200)
commitc9296264a2da34cb786c284d0ff3a27db9005925
treeacc80188616ede6bd9488eb29601f41a1e0c0d44
parent5b9d21d9a90d485388b2cd4e4f9b479348d0edc3
libceph: set global_id as soon as we get an auth ticket

Commit f6e3f914899e ("libceph: don't set global_id until we get an
auth ticket") delayed the setting of global_id too much.  It is set
only after all tickets are received, but in pre-nautilus clusters an
auth ticket and the service tickets are obtained in separate steps
(for a total of three MAuth replies).  When the service tickets are
requested, global_id is used to build an authorizer; if global_id is
still 0 we never get them and fail to establish the session.

Moving the setting of global_id into protocol implementations.  This
way global_id can be set exactly when an auth ticket is received, not
sooner nor later.

Fixes: f6e3f914899e ("libceph: don't set global_id until we get an auth ticket")
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
include/linux/ceph/auth.h
net/ceph/auth.c
net/ceph/auth_none.c
net/ceph/auth_x.c