[PATCH] Rbd: support copy-on-read option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Min Chen <minchen@xxxxxxxxxxxxxxx>

Signed-off-by: Min Chen <minchen@xxxxxxxxxxxxxxx>
Reviewed-by: Li Wang <liwang@xxxxxxxxxxxxxxx>
---
 doc/man/8/rbd.rst | 1 +
 src/rbd.cc        | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/doc/man/8/rbd.rst b/doc/man/8/rbd.rst
index 4552951..3fb747f 100644
--- a/doc/man/8/rbd.rst
+++ b/doc/man/8/rbd.rst
@@ -430,6 +430,7 @@ the running kernel.
 
 * ro - Map the image read-only.  Equivalent to --read-only.
 
+* ro - Map the image with copy-on-read turned on.
 
 Examples
 ========
diff --git a/src/rbd.cc b/src/rbd.cc
index 4355c4f..fdc35ba 100644
--- a/src/rbd.cc
+++ b/src/rbd.cc
@@ -2545,6 +2545,8 @@ static int parse_map_options(char *options)
         return 1;
     } else if (!strcmp(this_char, "rw") || !strcmp(this_char, "ro")) {
       put_map_option("rw", this_char);
+    } else if (!strcmp(this_char, "cor")) {
+      put_map_option("cor", this_char);
     } else {
       cerr << "rbd: unknown map option '" << this_char << "'" << std::endl;
       return 1;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux