From f37ae96fa7ea316a2578c81355be7e7f87b87e57 Mon Sep 17 00:00:00 2001 From: Dongsheng Yang Date: Thu, 8 Mar 2018 02:35:38 -0500 Subject: [PATCH] rbd: support osd_request_timeout in rbd map command Default of osd_request_timeout in krbd is 0 means no timeout, but we sometimes need to set this value by rbd command. then pass osd_request_timeout to kernel rbd in rbd mapping. Fixes: http://tracker.ceph.com/issues/23073 Signed-off-by: Dongsheng Yang --- src/tools/rbd/action/Kernel.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tools/rbd/action/Kernel.cc b/src/tools/rbd/action/Kernel.cc index 6f60ec02bce..b134a674187 100644 --- a/src/tools/rbd/action/Kernel.cc +++ b/src/tools/rbd/action/Kernel.cc @@ -125,6 +125,9 @@ static int parse_map_options(const std::string &options_string) } else if (!strcmp(this_char, "mount_timeout")) { if (put_map_option_value("mount_timeout", value_char, map_option_int_cb)) return -EINVAL; + } else if (!strcmp(this_char, "osd_request_timeout")) { + if (put_map_option_value("osd_request_timeout", value_char, map_option_int_cb)) + return -EINVAL; } else if (!strcmp(this_char, "osdkeepalive")) { if (put_map_option_value("osdkeepalive", value_char, map_option_int_cb)) return -EINVAL; -- 2.39.5