]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rbd: introduce abort_on_full option for rbd map
authorDongsheng Yang <dongsheng.yang@easystack.cn>
Wed, 19 Dec 2018 08:16:35 +0000 (03:16 -0500)
committerDongsheng Yang <dongsheng.yang@easystack.cn>
Sat, 12 Jan 2019 08:42:15 +0000 (03:42 -0500)
Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
doc/man/8/rbd.rst
src/tools/rbd/action/Kernel.cc

index e1a1e72864069ed20d38d063a3a8d54d2868d63d..b8fd324804c9bb4f6eb3e420c51cac3d5f4b5fdb 100644 (file)
@@ -747,6 +747,10 @@ Per mapping (block device) `rbd device map` options:
   requests will fail with -EOPNOTSUPP, write zeroes requests will fall back to
   manually zeroing.
 
+* abort_on_full - Fail write requests with -ENOSPC when the cluster is full or
+  the data pool reaches its quota (since 5.0).  The default behaviour is to
+  block until the full condition is cleared.
+
 `rbd device unmap` options:
 
 * force - Force the unmapping of a block device that is open (since 4.9).  The
index 2695fb16f3cbe59faead407b86a1fe145f6cf51b..f3e18f96a203f8126502ddf8af0b6b2629515807 100644 (file)
@@ -148,6 +148,8 @@ static int parse_map_options(const std::string &options_string)
       put_map_option("exclusive", this_char);
     } else if (!strcmp(this_char, "notrim")) {
       put_map_option("notrim", this_char);
+    } else if (!strcmp(this_char, "abort_on_full")) {
+      put_map_option("abort_on_full", this_char);
     } else {
       std::cerr << "rbd: unknown map option '" << this_char << "'" << std::endl;
       return -EINVAL;