summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2019-03-20 09:46:58 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-27 14:14:39 +0900
commit9cae232a8706875b4cdbe8fc4756aef616b8c7ba (patch)
tree4359d8b412d66c5d297fc61df1e598f9435f5c92 /include/linux
parent869157135003f40529b7e0e5f2ef4a970ac56424 (diff)
downloadlinux-stable-9cae232a8706875b4cdbe8fc4756aef616b8c7ba.tar.gz
linux-stable-9cae232a8706875b4cdbe8fc4756aef616b8c7ba.tar.bz2
linux-stable-9cae232a8706875b4cdbe8fc4756aef616b8c7ba.zip
libceph: wait for latest osdmap in ceph_monc_blacklist_add()
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>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ceph/libceph.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h
index 68bb09c29ce8..0b589e684554 100644
--- a/include/linux/ceph/libceph.h
+++ b/include/linux/ceph/libceph.h
@@ -292,6 +292,8 @@ extern void ceph_destroy_client(struct ceph_client *client);
extern int __ceph_open_session(struct ceph_client *client,
unsigned long started);
extern int ceph_open_session(struct ceph_client *client);
+int ceph_wait_for_latest_osdmap(struct ceph_client *client,
+ unsigned long timeout);
/* pagevec.c */
extern void ceph_release_page_vector(struct page **pages, int num_pages);