1
0
mirror of https://github.com/ceph/ceph synced 2025-03-30 23:40:09 +00:00

rbd: recognize alloc_size map option

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
Ilya Dryomov 2019-01-31 16:59:11 +01:00
parent e124ad72cf
commit fa32d97a9f
2 changed files with 10 additions and 0 deletions
doc/man/8
src/tools/rbd/action

View File

@ -751,6 +751,13 @@ Per mapping (block device) `rbd device map` options:
the data pool reaches its quota (since 5.0). The default behaviour is to
block until the full condition is cleared.
* alloc_size - Minimum allocation unit of the underlying OSD object store
backend (since 5.1, default is 64K bytes). This is used to round off and
drop discards that are too small. For bluestore, the recommended setting is
bluestore_min_alloc_size (typically 64K for hard disk drives and 16K for
solid-state drives). For filestore with filestore_punch_hole = false, the
recommended setting is image object size (typically 4M).
`rbd device unmap` options:
* force - Force the unmapping of a block device that is open (since 4.9). The

View File

@ -150,6 +150,9 @@ static int parse_map_options(const std::string &options_string)
put_map_option("notrim", this_char);
} else if (!strcmp(this_char, "abort_on_full")) {
put_map_option("abort_on_full", this_char);
} else if (!strcmp(this_char, "alloc_size")) {
if (put_map_option_value("alloc_size", value_char, map_option_int_cb))
return -EINVAL;
} else {
std::cerr << "rbd: unknown map option '" << this_char << "'" << std::endl;
return -EINVAL;