crimson/os/seastore/cache: rename try_construct_record to prepare_record

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
This commit is contained in:
Yingxin Cheng 2021-06-30 14:03:29 +08:00
parent b5762ca66b
commit 29d9c3d588
5 changed files with 7 additions and 7 deletions

View File

@ -252,9 +252,9 @@ CachedExtentRef Cache::duplicate_for_write(
return ret;
}
record_t Cache::try_construct_record(Transaction &t)
record_t Cache::prepare_record(Transaction &t)
{
LOG_PREFIX(Cache::try_construct_record);
LOG_PREFIX(Cache::prepare_record);
DEBUGT("enter", t);
// Should be valid due to interruptible future

View File

@ -384,11 +384,11 @@ public:
);
/**
* try_construct_record
* prepare_record
*
* Construct the record for Journal from transaction.
*/
record_t try_construct_record(
record_t prepare_record(
Transaction &t ///< [in, out] current transaction
);

View File

@ -239,7 +239,7 @@ TransactionManager::submit_transaction_direct(
tref.get_handle().enter(write_pipeline.prepare)
).then_interruptible([this, FNAME, &tref]() mutable
-> submit_transaction_iertr::future<> {
auto record = cache->try_construct_record(tref);
auto record = cache->prepare_record(tref);
tref.get_handle().maybe_release_collection_lock();

View File

@ -58,7 +58,7 @@ struct btree_lba_manager_test :
seastar::future<> submit_transaction(TransactionRef t)
{
auto record = cache.try_construct_record(*t);
auto record = cache.prepare_record(*t);
return journal.submit_record(std::move(record), t->get_handle()).safe_then(
[this, t=std::move(t)](auto p) mutable {
auto [addr, seq] = p;

View File

@ -31,7 +31,7 @@ struct cache_test_t : public seastar_test_suite_t {
seastar::future<paddr_t> submit_transaction(
TransactionRef t) {
auto record = cache.try_construct_record(*t);
auto record = cache.prepare_record(*t);
bufferlist bl;
for (auto &&block : record.extents) {