Merge pull request #21344 from yangdongsheng/lock_timeout

rbd: support lock_timeout in rbd mapping

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
Ilya Dryomov 2018-04-19 10:26:09 +02:00 committed by GitHub
commit d0ccfb4026
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View 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).

View 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;