]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore/record_submitter: minor cleanups
authorYingxin Cheng <yingxin.cheng@intel.com>
Tue, 16 Jul 2024 08:09:56 +0000 (16:09 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Mon, 5 Aug 2024 03:15:16 +0000 (11:15 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/os/seastore/journal/record_submitter.cc
src/crimson/os/seastore/journal/record_submitter.h

index e5fa90b4b22b0ade676a4818e088ba77be5b3292..6b6118b87d7ffff0bd80c92a20958729e72eab16 100644 (file)
@@ -40,11 +40,10 @@ RecordBatch::add_pending(
     assert(maybe_write_base.has_value());
     assert(!write_base.has_value());
     write_base = maybe_write_base;
-  } else {
-    assert(io_promise.has_value());
   }
   state = state_t::PENDING;
   assert(write_base.has_value());
+  assert(io_promise.has_value());
 
   return io_promise->get_shared_future(
   ).then([dlength_offset, FNAME, &name
index 4b38b292073879590593dbafb650e8453f949942..b5d6fc07f3fc5894782470268bbb0b84cc0de5df 100644 (file)
@@ -149,9 +149,6 @@ public:
   // Add to the batch, the future will be resolved after the batch is
   // written.
   //
-  // Set write_result_t::write_length to 0 if the record is not the first one
-  // in the batch.
-  //
   // write_base must be assigned when the state is empty
   using add_pending_ertr = JournalAllocator::write_ertr;
   using add_pending_ret = add_pending_ertr::future<record_locator_t>;