]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: make rename request complete with filtered code
authorMykola Golub <mgolub@suse.com>
Wed, 21 Feb 2018 08:45:57 +0000 (10:45 +0200)
committerMykola Golub <mgolub@suse.com>
Wed, 21 Feb 2018 13:25:19 +0000 (15:25 +0200)
Fixes: http://tracker.ceph.com/issues/23068
Signed-off-by: Mykola Golub <mgolub@suse.com>
src/librbd/operation/RenameRequest.cc
src/librbd/operation/RenameRequest.h

index a4dbf1e52358b9ca590704a1d7b04e9143154949..1e837472948e067d9f59803967e293fcb4f50520 100644 (file)
@@ -64,7 +64,7 @@ bool RenameRequest<I>::should_complete(int r) {
   CephContext *cct = image_ctx.cct;
   ldout(cct, 5) << this << " " << __func__ << ": state=" << m_state << ", "
                 << "r=" << r << dendl;
-  r = filter_state_return_code(r);
+  r = filter_return_code(r);
   if (r < 0) {
     if (r == -EEXIST) {
       ldout(cct, 1) << "image already exists" << dendl;
@@ -100,7 +100,7 @@ bool RenameRequest<I>::should_complete(int r) {
 }
 
 template <typename I>
-int RenameRequest<I>::filter_state_return_code(int r) {
+int RenameRequest<I>::filter_return_code(int r) const {
   I &image_ctx = this->m_image_ctx;
   CephContext *cct = image_ctx.cct;
 
index 46a8dbcdfeee92e048fb176ebe7da57afc789620..6534d36c0986918b0ba1108c29c3efbf241ac248 100644 (file)
@@ -57,6 +57,7 @@ public:
 protected:
   void send_op() override;
   bool should_complete(int r) override;
+  int filter_return_code(int r) const override;
 
   journal::Event create_event(uint64_t op_tid) const override {
     return journal::RenameEvent(op_tid, m_dest_name);
@@ -72,8 +73,6 @@ private:
 
   bufferlist m_header_bl;
 
-  int filter_state_return_code(int r);
-
   void send_read_source_header();
   void send_write_destination_header();
   void send_update_directory();