]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: support osd_request_timeout in rbd map command 20792/head
authorDongsheng Yang <dongsheng.yang@easystack.cn>
Thu, 8 Mar 2018 07:35:38 +0000 (02:35 -0500)
committerDongsheng Yang <dongsheng.yang@easystack.cn>
Thu, 8 Mar 2018 09:12:41 +0000 (04:12 -0500)
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 <dongsheng.yang@easystack.cn>
src/tools/rbd/action/Kernel.cc

index 6f60ec02bce1faa9f6592f30ed7314cf124447e9..b134a674187fc264b836a2bdae411719d1bb0019 100644 (file)
@@ -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;