]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ECTransaction: fix projected_size for delete->create in get_write_plan
authorSamuel Just <sjust@redhat.com>
Tue, 29 Nov 2016 23:11:57 +0000 (15:11 -0800)
committerSamuel Just <sjust@redhat.com>
Fri, 2 Dec 2016 21:40:18 +0000 (13:40 -0800)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/ECTransaction.h
src/osd/PGTransaction.h

index e1a18b847631a08ec97b068d193f60710a06646c..4a92682ef052e7eb195cbb4a8fa800ca83321d05 100644 (file)
@@ -55,7 +55,7 @@ namespace ECTransaction {
          plan.invalidates_cache = true;
        }
 
-       if (i.second.is_delete()) {
+       if (i.second.deletes_first()) {
          ldpp_dout(dpp, 20) << __func__ << ": delete, setting projected size"
                             << " to 0" << dendl;
          projected_size = 0;
index a8c0608cc764fd52368cdf14ba3470a64dc25a24..bf8cb6a3f4898e0dcdbf35ec9fb4b006fec799f9 100644 (file)
@@ -83,6 +83,9 @@ public:
      * ECBackend transaction planning needs this context
      * to figure out how to perform the transaction.
      */
+    bool deletes_first() const {
+      return delete_first;
+    }
     bool is_delete() const {
       return boost::get<Init::None>(&init_type) != nullptr && delete_first;
     }