]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: use order-agnostic default stripe parameters
authorJosh Durgin <josh.durgin@inktank.com>
Wed, 16 Jul 2014 20:29:29 +0000 (13:29 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Wed, 16 Jul 2014 21:34:14 +0000 (14:34 -0700)
This way the default striping style of splitting into
object-sized chunks still works with non-default orders
specified.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
src/common/config_opts.h
src/test/pybind/test_rbd.py

index c0d4a104ac513bd3ba0ac7347f005bcf53d7ecfe..6d70fec2213382e64acc2c94e9d71886810ca188 100644 (file)
@@ -745,8 +745,8 @@ OPTION(rbd_localize_parent_reads, OPT_BOOL, true)
  */
 OPTION(rbd_default_format, OPT_INT, 1)
 OPTION(rbd_default_order, OPT_INT, 22)
-OPTION(rbd_default_stripe_count, OPT_U64, 1) // changing requires stripingv2 feature
-OPTION(rbd_default_stripe_unit, OPT_U64, 4194304) // changing to non-object size requires stripingv2 feature
+OPTION(rbd_default_stripe_count, OPT_U64, 0) // changing requires stripingv2 feature
+OPTION(rbd_default_stripe_unit, OPT_U64, 0) // changing to non-object size requires stripingv2 feature
 OPTION(rbd_default_features, OPT_INT, 3) // 1 for layering, 3 for layering+stripingv2. only applies to format 2 images
 
 OPTION(nss_db_path, OPT_STR, "") // path to nss db
index 11591820641d5c3e5ec4903760c8b28a43aeddde..6036b527531ae325d3258ccbddf94db2a82d5c31 100644 (file)
@@ -145,8 +145,8 @@ def test_create_defaults():
     check_default_params(2, 20, RBD_FEATURE_STRIPINGV2, 1, 1 << 16)
     check_default_params(2, 20, RBD_FEATURE_STRIPINGV2, 10, 1 << 20)
     check_default_params(2, 20, RBD_FEATURE_STRIPINGV2, 10, 1 << 16)
+    check_default_params(2, 20, RBD_FEATURE_STRIPINGV2, 0, 0)
     # make sure invalid combinations of stripe unit and order are still invalid
-    check_default_params(2, 20, RBD_FEATURE_STRIPINGV2, exception=InvalidArgument)
     check_default_params(2, 22, RBD_FEATURE_STRIPINGV2, 10, 1 << 50, exception=InvalidArgument)
     check_default_params(2, 22, RBD_FEATURE_STRIPINGV2, 10, 100, exception=InvalidArgument)
     check_default_params(2, 22, RBD_FEATURE_STRIPINGV2, 0, 1, exception=InvalidArgument)