Skip to content

Commit 9d4a227

Browse files
committed
rbd: drop wait_for_latest_osdmap()
Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Jason Dillaman <dillaman@redhat.com>
1 parent bb229bb commit 9d4a227

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

drivers/block/rbd.c

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -924,23 +924,6 @@ static void rbd_put_client(struct rbd_client *rbdc)
924924
kref_put(&rbdc->kref, rbd_client_release);
925925
}
926926

927-
static int wait_for_latest_osdmap(struct ceph_client *client)
928-
{
929-
u64 newest_epoch;
930-
int ret;
931-
932-
ret = ceph_monc_get_version(&client->monc, "osdmap", &newest_epoch);
933-
if (ret)
934-
return ret;
935-
936-
if (client->osdc.osdmap->epoch >= newest_epoch)
937-
return 0;
938-
939-
ceph_osdc_maybe_request_map(&client->osdc);
940-
return ceph_monc_wait_osdmap(&client->monc, newest_epoch,
941-
client->options->mount_timeout);
942-
}
943-
944927
/*
945928
* Get a ceph client with specific addr and configuration, if one does
946929
* not exist create it. Either way, ceph_opts is consumed by this
@@ -960,7 +943,8 @@ static struct rbd_client *rbd_get_client(struct ceph_options *ceph_opts)
960943
* Using an existing client. Make sure ->pg_pools is up to
961944
* date before we look up the pool id in do_rbd_add().
962945
*/
963-
ret = wait_for_latest_osdmap(rbdc->client);
946+
ret = ceph_wait_for_latest_osdmap(rbdc->client,
947+
rbdc->client->options->mount_timeout);
964948
if (ret) {
965949
rbd_warn(NULL, "failed to get latest osdmap: %d", ret);
966950
rbd_put_client(rbdc);

0 commit comments

Comments
 (0)