From: Piotr Dałek Date: Tue, 31 May 2016 19:42:00 +0000 (+0200) Subject: buffer: don't invalidate crc cache of new ptr before zeroing it X-Git-Tag: v11.0.0~274^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d373b8522c4efb8cb954579a8bb626c2a7b9ba7c;p=ceph.git buffer: don't invalidate crc cache of new ptr before zeroing it When doing append_zero, we create new bufferptr and then zero it. Don't invalidate internal crc cache, because at this point it's empty anyway. Signed-off-by: Piotr Dałek --- diff --git a/src/common/buffer.cc b/src/common/buffer.cc index 3557b3775d4f..0438fd116e81 100644 --- a/src/common/buffer.cc +++ b/src/common/buffer.cc @@ -1754,7 +1754,7 @@ static simple_spinlock_t buffer_debug_lock = SIMPLE_SPINLOCK_INITIALIZER; void buffer::list::append_zero(unsigned len) { ptr bp(len); - bp.zero(); + bp.zero(false); append(std::move(bp)); }