Skip to content

Commit

Permalink
rbd: introduce abort_on_full option for rbd map
Browse files Browse the repository at this point in the history
Signed-off-by: Dongsheng Yang <[email protected]>
  • Loading branch information
yangdongsheng committed Jan 12, 2019
1 parent 3b49700 commit 5639a8b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/man/8/rbd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/tools/rbd/action/Kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5639a8b

Please sign in to comment.