]> git.baikalelectronics.ru Git - kernel.git/commit
libceph: wait for latest osdmap in ceph_monc_blacklist_add()
authorIlya Dryomov <idryomov@gmail.com>
Wed, 20 Mar 2019 08:46:58 +0000 (09:46 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 20 Mar 2019 15:27:40 +0000 (16:27 +0100)
commitca191c1fd23092b746aa99be80bd46b022c68dae
tree5b6b57fc2acdb4c09fd034e23c4930eb2ec2043a
parent90a5873b5024296b6adf15a8a5d5a8af6ec7d8de
libceph: wait for latest osdmap in ceph_monc_blacklist_add()

Because map updates are distributed lazily, an OSD may not know about
the new blacklist for quite some time after "osd blacklist add" command
is completed.  This makes it possible for a blacklisted but still alive
client to overwrite a post-blacklist update, resulting in data
corruption.

Waiting for latest osdmap in ceph_monc_blacklist_add() and thus using
the post-blacklist epoch for all post-blacklist requests ensures that
all such requests "wait" for the blacklist to come into force on their
respective OSDs.

Cc: stable@vger.kernel.org
Fixes: ca5ceca80c7a ("libceph: support for blacklisting clients")
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
include/linux/ceph/libceph.h
net/ceph/ceph_common.c
net/ceph/mon_client.c