]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
buffer.cc: postpone crc cache invalidation in bufferlist::rebuild()
authorPiotr Dałek <piotr.dalek@ts.fujitsu.com>
Thu, 16 Jul 2015 09:10:37 +0000 (11:10 +0200)
committerPiotr Dałek <piotr.dalek@ts.fujitsu.com>
Tue, 4 Aug 2015 07:59:12 +0000 (09:59 +0200)
Postpone CRC cache invalidation. Do it only once after all data have
been moved.

Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
src/common/buffer.cc

index dba06ee05d1e9a52fe6d85985ed0243157b9b52f..7e34a03c29ce978e730779bf191b1024f2b6a52b 100644 (file)
@@ -1349,12 +1349,13 @@ static simple_spinlock_t buffer_debug_lock = SIMPLE_SPINLOCK_INITIALIZER;
     for (std::list<ptr>::iterator it = _buffers.begin();
         it != _buffers.end();
         ++it) {
-      nb.copy_in(pos, it->length(), it->c_str());
+      nb.copy_in(pos, it->length(), it->c_str(), false);
       pos += it->length();
     }
     _memcopy_count += pos;
     _buffers.clear();
     _buffers.push_back(nb);
+    invalidate_crc();
   }
 
 void buffer::list::rebuild_aligned(unsigned align)