From: Dongsheng Yang Date: Mon, 11 Jul 2016 11:44:00 +0000 (-0400) Subject: tools/rbd: set order to default value if it is not specified in options. X-Git-Tag: ses5-milestone5~281^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a187b346d7731b78e286a56e3cb14cc1399c5199;p=ceph.git tools/rbd: set order to default value if it is not specified in options. Signed-off-by: Dongsheng Yang --- diff --git a/src/tools/rbd/action/Import.cc b/src/tools/rbd/action/Import.cc index 2eee2e8c4131..b69bd48e776a 100644 --- a/src/tools/rbd/action/Import.cc +++ b/src/tools/rbd/action/Import.cc @@ -74,8 +74,9 @@ static int do_import(librbd::RBD &rbd, librados::IoCtx& io_ctx, assert(imgname); uint64_t order; - r = opts.get(RBD_IMAGE_OPTION_ORDER, &order); - assert(r == 0); + if (opts.get(RBD_IMAGE_OPTION_ORDER, &order) != 0) { + order = g_conf->rbd_default_order; + } // try to fill whole imgblklen blocks for sparsification uint64_t image_pos = 0;