diff --git a/doc/man/8/rbd.rst b/doc/man/8/rbd.rst index 7cecad5d31a..299e6410bc5 100644 --- a/doc/man/8/rbd.rst +++ b/doc/man/8/rbd.rst @@ -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). diff --git a/src/tools/rbd/action/Kernel.cc b/src/tools/rbd/action/Kernel.cc index 8d7f8af562e..3e866e976f2 100644 --- a/src/tools/rbd/action/Kernel.cc +++ b/src/tools/rbd/action/Kernel.cc @@ -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;