From: Ilya Dryomov Date: Mon, 3 Oct 2016 12:09:11 +0000 (+0200) Subject: rbd: recognize lock_on_read option X-Git-Tag: v11.0.1~14^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F11313%2Fhead;p=ceph.git rbd: recognize lock_on_read option Signed-off-by: Ilya Dryomov --- diff --git a/doc/man/8/rbd.rst b/doc/man/8/rbd.rst index 904cafb27703..3ceefc4d3ff9 100644 --- a/doc/man/8/rbd.rst +++ b/doc/man/8/rbd.rst @@ -474,6 +474,9 @@ Mapping (per block device) options: * queue_depth=x - queue depth (since 4.2, default is 128 requests). +* lock_on_read - Acquire exclusive lock on reads, in addition to writes and + discards (since 4.9). + Examples ======== diff --git a/src/tools/rbd/action/Kernel.cc b/src/tools/rbd/action/Kernel.cc index 9b9400714c1c..05430bae109a 100644 --- a/src/tools/rbd/action/Kernel.cc +++ b/src/tools/rbd/action/Kernel.cc @@ -129,6 +129,8 @@ static int parse_map_options(char *options) } else if (!strcmp(this_char, "queue_depth")) { if (put_map_option_value("queue_depth", value_char, map_option_int_cb)) return -EINVAL; + } else if (!strcmp(this_char, "lock_on_read")) { + put_map_option("lock_on_read", this_char); } else { std::cerr << "rbd: unknown map option '" << this_char << "'" << std::endl; return -EINVAL;