From 5ca1b2be9088e6b85b9c618eefda4dbc42c3b4cd Mon Sep 17 00:00:00 2001 From: Matan Breizman Date: Mon, 4 Aug 2025 08:09:43 +0000 Subject: [PATCH] crimson/os/seastore/seastore_types: introduce base_ertr Instead of decalring base_ertr and base_iertr in every file or class that use them - * Move base_ertr decleration to the common seastore_types header. Note: the price for that is including errorator in seastore_types though this seems reasonable considering the benefits. * Move base_iertr to transaction_interruptor where trans_iertr is defined. Signed-off-by: Matan Breizman --- src/crimson/os/seastore/seastore_types.h | 5 +++++ src/crimson/os/seastore/transaction_interruptor.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/crimson/os/seastore/seastore_types.h b/src/crimson/os/seastore/seastore_types.h index 308b1d6226140..45eab27c9f8b1 100644 --- a/src/crimson/os/seastore/seastore_types.h +++ b/src/crimson/os/seastore/seastore_types.h @@ -22,8 +22,13 @@ #include "include/uuid.h" #include "include/rados.h" +#include "crimson/common/errorator.h" + namespace crimson::os::seastore { +using base_ertr = crimson::errorator< + crimson::ct_error::input_output_error>; + class cache_hint_t { enum hint_t { TOUCH, diff --git a/src/crimson/os/seastore/transaction_interruptor.h b/src/crimson/os/seastore/transaction_interruptor.h index d0522c23c19eb..587d95d68ff1e 100644 --- a/src/crimson/os/seastore/transaction_interruptor.h +++ b/src/crimson/os/seastore/transaction_interruptor.h @@ -9,6 +9,7 @@ #include #include "crimson/common/errorator.h" +#include "crimson/os/seastore/seastore_types.h" #include "crimson/common/interruptible_future.h" namespace crimson::os::seastore { @@ -62,6 +63,8 @@ using trans_iertr = E >; +using base_iertr = trans_iertr; + template auto with_trans_intr(Transaction &t, F &&f, Args&&... args) { return trans_intr::with_interruption_to_error( -- 2.39.5