]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: Refactor TransContext
authorAdam Kupczyk <akupczyk@redhat.com>
Wed, 23 Nov 2022 11:20:25 +0000 (11:20 +0000)
committerAdam Kupczyk <akupczyk@ibm.com>
Thu, 11 May 2023 06:52:45 +0000 (06:52 +0000)
Modified TransContext.
Changed
std::set<SharedBlobRef> shared_blobs_written
to
std::set<BlobRef> blobs_written

Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h

index c7cfbf9029c0ff61efb0b2ae496c7eb12a07bc60..a43bcc2faeb6160a58f659de953029a215df686f 100644 (file)
@@ -13007,10 +13007,10 @@ void BlueStore::_txc_finish(TransContext *txc)
   dout(20) << __func__ << " " << txc << " onodes " << txc->onodes << dendl;
   ceph_assert(txc->get_state() == TransContext::STATE_FINISHING);
 
-  for (auto& sb : txc->shared_blobs_written) {
-    sb->finish_write(txc->seq);
+  for (auto& sb : txc->blobs_written) {
+    sb->shared_blob->finish_write(txc->seq);
   }
-  txc->shared_blobs_written.clear();
+  txc->blobs_written.clear();
 
   while (!txc->removed_collections.empty()) {
     _queue_reap_collection(txc->removed_collections.front());
index e2ed810c0b3580af1eb4d91b40a96b8531d7f0ea..ef54b780ee4d8071916c849e2673158e43902329 100644 (file)
@@ -1789,7 +1789,7 @@ private:
 #endif
     
     std::set<SharedBlobRef> shared_blobs;  ///< these need to be updated/written
-    std::set<SharedBlobRef> shared_blobs_written; ///< update these on io completion
+    std::set<BlobRef> blobs_written; ///< update these on io completion
 
     KeyValueDB::Transaction t; ///< then we will commit this
     std::list<Context*> oncommits;  ///< more commit completions
@@ -2825,7 +2825,7 @@ private:
     unsigned flags) {
     b->shared_blob->bc.write(b->shared_blob->get_cache(), txc->seq, offset, bl,
                             flags);
-    txc->shared_blobs_written.insert(b->shared_blob);
+    txc->blobs_written.insert(b);
   }
 
   int _collection_list(