Merge pull request #21056 from hitoshikamei/rbdmap-notrim

rbd: add notrim option to rbd map

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
Ilya Dryomov 2018-04-19 08:51:57 +02:00 committed by GitHub
commit 6931ab7ec9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -664,6 +664,11 @@ Per mapping (block device) `rbd device map` options:
* exclusive - Disable automatic exclusive lock transitions (since 4.12).
* notrim - Turn off discard and write zeroes offload support to avoid
deprovisioning a fully provisioned image (since 4.17). When enabled, discard
requests will fail with -EOPNOTSUPP, write zeroes requests will fall back to
manually zeroing.
`rbd device unmap` options:
* force - Force the unmapping of a block device that is open (since 4.9). The

View File

@ -143,6 +143,8 @@ static int parse_map_options(const std::string &options_string)
put_map_option("lock_on_read", this_char);
} else if (!strcmp(this_char, "exclusive")) {
put_map_option("exclusive", this_char);
} else if (!strcmp(this_char, "notrim")) {
put_map_option("notrim", this_char);
} else {
std::cerr << "rbd: unknown map option '" << this_char << "'" << std::endl;
return -EINVAL;