From 5d872f3a28ce1bb44f31de4f017c7b1d7d4389f1 Mon Sep 17 00:00:00 2001 From: Mara Sophie Grosch Date: Mon, 29 Nov 2021 15:00:23 +0100 Subject: [PATCH] doc: add docs for rbd_default_order Adds documentation how to change default rbd object size. With the previous option `--order` it was easy to guess the config name for the default value, with the current option name `--object-size` thats hard to guess. Also extends the documentation for rbd_default_order to include * how object-size is derived from the configured value * allowed range of the value In the first version of this commit I also added min and max for this parameter (12/25, matching the object size range in `man 8 rbd`/Striping/object-size), but this made some tests fail, since some seem to set values outside this range (and probably are fine since included for some time already). To have this a doc-change only, I removed the range. Signed-off-by: Mara Sophie Grosch --- doc/man/8/rbd.rst | 3 +++ doc/rbd/rbd-config-ref.rst | 1 + src/common/options/rbd.yaml.in | 3 +++ 3 files changed, 7 insertions(+) diff --git a/doc/man/8/rbd.rst b/doc/man/8/rbd.rst index 93483586caf5a..1f6c841f5b6bc 100644 --- a/doc/man/8/rbd.rst +++ b/doc/man/8/rbd.rst @@ -81,6 +81,9 @@ Parameters nearest power of two; if no suffix is given, unit B is assumed. The default object size is 4M, smallest is 4K and maximum is 32M. + The default value can be changed with the configuration option ``rbd_default_order``, + which takes a power of two (default object size is ``2 ^ rbd_default_order``). + .. option:: --stripe-unit size-in-B/K/M Specifies the stripe unit size in B/K/M. If no suffix is given, unit B is diff --git a/doc/rbd/rbd-config-ref.rst b/doc/rbd/rbd-config-ref.rst index 2e391a217ca71..77e570de84f5b 100644 --- a/doc/rbd/rbd-config-ref.rst +++ b/doc/rbd/rbd-config-ref.rst @@ -9,6 +9,7 @@ Generic IO Settings .. confval:: rbd_compression_hint .. confval:: rbd_read_from_replica_policy +.. confval:: rbd_default_order Cache Settings ======================= diff --git a/src/common/options/rbd.yaml.in b/src/common/options/rbd.yaml.in index 14c782df9662c..328fa43d18c41 100644 --- a/src/common/options/rbd.yaml.in +++ b/src/common/options/rbd.yaml.in @@ -481,6 +481,9 @@ options: type: uint level: advanced desc: default order (data block object size) for new images + long_desc: This configures the default object size for new images. The value is used as a + power of two, meaning ``default_object_size = 2 ^ rbd_default_order``. Configure a value + between 12 and 25 (inclusive), translating to 4KiB lower and 32MiB upper limit. default: 22 services: - rbd -- 2.39.5