From fc036b6edd6ebc14424f770b465d3707fd585f57 Mon Sep 17 00:00:00 2001 From: Noah Watkins Date: Mon, 26 May 2014 11:38:46 -0700 Subject: [PATCH] lib: implement WaitForLatestOSDMap Signed-off-by: Noah Watkins --- conn.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/conn.go b/conn.go index 7b1222b..f23d0b7 100644 --- a/conn.go +++ b/conn.go @@ -118,3 +118,14 @@ func (c *Conn) SetConfigOption(option, value string) error { return nil } } + +// WaitForLatestOSDMap blocks the caller until the latest OSD map has been +// retrieved. It returns an error, if any. +func (c *Conn) WaitForLatestOSDMap() error { + ret := C.rados_wait_for_latest_osdmap(c.cluster) + if ret < 0 { + return RadosError(int(ret)) + } else { + return nil + } +}