]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: fix dissecting from FileWriter in BlueFS::_flush_range().
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 11 Aug 2020 09:08:40 +0000 (11:08 +0200)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Fri, 21 Aug 2020 15:50:44 +0000 (17:50 +0200)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/os/bluestore/BlueFS.cc

index 0875c7e330232c14f0c0707607c31ff4f982ac41..bc991d484f98abeae524e484b6894c5f3f2cb61a 100644 (file)
@@ -2630,6 +2630,7 @@ int BlueFS::_flush_and_sync_log(std::unique_lock<ceph::mutex>& l,
   ceph_assert(!log_t.empty());
 
   // allocate some more space (before we run out)?
+  // BTW: this triggers `flush()` in the `page_aligned_appender` of `log_writer`.
   int64_t runway = log_writer->file->fnode.get_allocated() -
     log_writer->get_effective_write_pos();
   bool just_expanded_log = false;
@@ -2858,8 +2859,6 @@ int BlueFS::_flush_range(FileWriter *h, uint64_t offset, uint64_t length)
     bufferlist t;
     h->buffer.splice(0, length, &t);
     bl.claim_append_piecewise(t);
-    t.substr_of(h->buffer, length, h->buffer.length() - length);
-    h->buffer.swap(t);
     dout(20) << " leaving 0x" << std::hex << h->buffer.length() << std::dec
              << " unflushed" << dendl;
   }