]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit84f1e956cfa642e0849a3d3ae6535e5d07863e63
tree87444ef5e796f080ab6e4044c63b1bc561034b4a
parenta2fd1b3d6ac5df326396e8ff3102ff3967edf241
libceph: wait for latest osdmap in ceph_monc_blacklist_add()

BugLink: https://bugs.launchpad.net/bugs/1838116
commit bb229bbb3bf63d23128e851a1f3b85c083178fa1 upstream.

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: 6305a3b41515 ("libceph: support for blacklisting clients")
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
include/linux/ceph/libceph.h
net/ceph/ceph_common.c
net/ceph/mon_client.c