]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/tools/rbd/action/Import.cc
update sources to v12.2.1
[ceph.git] / ceph / src / tools / rbd / action / Import.cc
index 0f31d810394bee1a8071142ca62605657265d63d..3c717855270574547b92b5b300aa2b0d37590cac 100644 (file)
@@ -37,7 +37,9 @@ struct ImportDiffContext {
   ImportDiffContext(librbd::Image *image, int fd, size_t size, bool no_progress)
     : image(image), fd(fd), size(size), pc("Importing image diff", no_progress),
       throttle((fd == STDIN_FILENO) ? 1 :
-               g_conf->rbd_concurrent_management_ops, false), last_offset(0) {
+                  g_conf->get_val<int64_t>("rbd_concurrent_management_ops"),
+               false),
+      last_offset(0) {
   }
 
   void update_size(size_t new_size)
@@ -653,7 +655,7 @@ static int do_import_v1(int fd, librbd::Image &image, uint64_t size,
     throttle.reset(new SimpleThrottle(1, false));
   } else {
     throttle.reset(new SimpleThrottle(
-                     g_conf->rbd_concurrent_management_ops, false));
+      g_conf->get_val<int64_t>("rbd_concurrent_management_ops"), false));
   }
 
   reqlen = min<uint64_t>(reqlen, size);
@@ -746,7 +748,7 @@ static int do_import(librados::Rados &rados, librbd::RBD &rbd,
 
   uint64_t order;
   if (opts.get(RBD_IMAGE_OPTION_ORDER, &order) != 0) {
-    order = g_conf->rbd_default_order;
+    order = g_conf->get_val<int64_t>("rbd_default_order");
   }
 
   // try to fill whole imgblklen blocks for sparsification