]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/librbd/LibrbdAdminSocketHook.cc
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / librbd / LibrbdAdminSocketHook.cc
index bda734ca948ea5a9ae8c1018bc039bbc685b86a7..15b8fb970294e45240655316cbee99025f1ea183 100644 (file)
@@ -6,6 +6,7 @@
 #include "librbd/ImageCtx.h"
 #include "librbd/LibrbdAdminSocketHook.h"
 #include "librbd/internal.h"
+#include "librbd/io/ImageRequestWQ.h"
 
 #define dout_subsys ceph_subsys_rbd
 #undef dout_prefix
@@ -24,7 +25,7 @@ public:
   explicit FlushCacheCommand(ImageCtx *ictx) : ictx(ictx) {}
 
   bool call(stringstream *ss) override {
-    int r = flush(ictx);
+    int r = ictx->io_work_queue->flush();
     if (r < 0) {
       *ss << "flush: " << cpp_strerror(r);
       return false;
@@ -87,10 +88,12 @@ LibrbdAdminSocketHook::~LibrbdAdminSocketHook() {
   }
 }
 
-bool LibrbdAdminSocketHook::call(std::string command, cmdmap_t& cmdmap,
-                                std::string format, bufferlist& out) {
+bool LibrbdAdminSocketHook::call(std::string_view command,
+                                const cmdmap_t& cmdmap,
+                                std::string_view format,
+                                bufferlist& out) {
   Commands::const_iterator i = commands.find(command);
-  assert(i != commands.end());
+  ceph_assert(i != commands.end());
   stringstream ss;
   bool r = i->second->call(&ss);
   out.append(ss);