]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: recognize lock_on_read option
authorIlya Dryomov <idryomov@gmail.com>
Mon, 3 Oct 2016 12:09:11 +0000 (14:09 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 11 Oct 2016 08:52:34 +0000 (10:52 +0200)
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit e857b7896527b676155d6e01c78567337dc33b1c)

doc/man/8/rbd.rst
src/tools/rbd/action/Kernel.cc

index 6ec325454c76ff4f4726bf001342d8f9c4c481da..218b41d3b31b45c9dc20b575982cda697539ca96 100644 (file)
@@ -464,6 +464,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
 ========
index f8fc413e7569882d84ab24b184799c279f698ba6..a488b9beec274db10b8c70c4f9287312ac370c34 100644 (file)
@@ -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;