]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: defer swapping the newmap to mdsmap
authorXiubo Li <xiubli@redhat.com>
Wed, 15 Jul 2020 02:40:35 +0000 (10:40 +0800)
committerXiubo Li <xiubli@redhat.com>
Tue, 20 Oct 2020 12:14:48 +0000 (08:14 -0400)
commitb835cad14d031faefad2ceb1651de9be49134f65
tree5890207a4e8ff0441453682e4ebc2dbc7107f63f
parent931ba6a4417d8707898450c37dc03932d7df1933
client: defer swapping the newmap to mdsmap

This is preparing for adding the command lock support.

For the new mds map we could access it without the client_lock, so
before swaping it to the `mdsmap` member, it will be safe to access.

With this we can defer to hold the client_lock and it will be safe
for the new command_lock to avoid possible dead lock in future or
something else.

Fixes: https://tracker.ceph.com/issues/46620
Signed-off-by: Xiubo Li <xiubli@redhat.com>
src/client/Client.cc