]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: support lock_timeout in rbd mapping 21344/head
authorDongsheng Yang <dongsheng.yang@easystack.cn>
Wed, 11 Apr 2018 02:28:15 +0000 (22:28 -0400)
committerDongsheng Yang <dongsheng.yang@easystack.cn>
Thu, 19 Apr 2018 06:59:21 +0000 (02:59 -0400)
Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
doc/man/8/rbd.rst
src/tools/rbd/action/Kernel.cc

index 623e0ddfdd90b2b7bca2dbbad29a20a88027e371..eca1d6d93e1c577d269877222d9dda0c13c9aef7 100644 (file)
@@ -647,6 +647,9 @@ Per client instance `rbd device map` options:
   since 4.2 this can be used to ensure that `rbd device unmap` eventually
   times out when there is no network connection to a cluster.
 
+* lock_timeout=x - A timeout on waiting for the acquisition of exclusive lock
+  (since 4.17, default is 0 seconds, meaning no timeout).
+
 * osdkeepalive=x - OSD keepalive timeout (default is 5 seconds).
 
 * osd_idle_ttl=x - OSD idle TTL (default is 60 seconds).
index cbcff9c76a3406eb1f58aacb242577dcc048da4d..bc8e583d848d43356d07623ab4a0b4c891e2501c 100644 (file)
@@ -128,6 +128,9 @@ static int parse_map_options(const std::string &options_string)
     } 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, "lock_timeout")) {
+      if (put_map_option_value("lock_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;