when aborting uncommitted transaction, abort_allocation
should be called to cancel in-flight allocations in
in-memory allocator.
Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
);
}
+RandomBlockManager::abort_allocation_ertr::future<>
+RandomBlockManager::abort_allocation(Transaction &t)
+{
+ /*
+ * TODO: clear all allocation infos associated with transaction in in-memory allocator
+ */
+ t.clear_rbm_allocated_blocks();
+ return abort_allocation_ertr::now();
+}
+
RandomBlockManager::write_ertr::future<>
RandomBlockManager::complete_allocation(Transaction &t)
{
*/
free_block_ertr::future<> free_extent(Transaction &t, blk_paddr_t from, blk_paddr_t to); // TODO: will include trim if necessary
+ using abort_allocation_ertr = crimson::errorator<
+ crimson::ct_error::input_output_error,
+ crimson::ct_error::invarg
+ >;
+ abort_allocation_ertr::future<> abort_allocation(Transaction &t);
+
using complete_allocation_ertr = crimson::errorator<
crimson::ct_error::input_output_error,
crimson::ct_error::invarg,