From: Matan Breizman Date: Mon, 4 Aug 2025 08:09:43 +0000 (+0000) Subject: crimson/os/seastore/seastore_types: introduce base_ertr X-Git-Tag: testing/wip-vshankar-testing-20250813.085004-debug~14^2~12 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5ca1b2be9088e6b85b9c618eefda4dbc42c3b4cd;p=ceph-ci.git 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 --- diff --git a/src/crimson/os/seastore/seastore_types.h b/src/crimson/os/seastore/seastore_types.h index 308b1d62261..45eab27c9f8 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 d0522c23c19..587d95d68ff 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(