From: Samuel Just Date: Tue, 29 Nov 2016 23:11:57 +0000 (-0800) Subject: ECTransaction: fix projected_size for delete->create in get_write_plan X-Git-Tag: v11.1.0~59^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9001154320efcfefd60dda4006f1d0c6eec59c6d;p=ceph.git ECTransaction: fix projected_size for delete->create in get_write_plan Signed-off-by: Samuel Just --- diff --git a/src/osd/ECTransaction.h b/src/osd/ECTransaction.h index e1a18b847631a..4a92682ef052e 100644 --- a/src/osd/ECTransaction.h +++ b/src/osd/ECTransaction.h @@ -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; diff --git a/src/osd/PGTransaction.h b/src/osd/PGTransaction.h index a8c0608cc764f..bf8cb6a3f4898 100644 --- a/src/osd/PGTransaction.h +++ b/src/osd/PGTransaction.h @@ -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_type) != nullptr && delete_first; }