]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore/seastore_types: introduce base_ertr
authorMatan Breizman <mbreizma@redhat.com>
Mon, 4 Aug 2025 08:09:43 +0000 (08:09 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Sun, 10 Aug 2025 10:33:16 +0000 (10:33 +0000)
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 <mbreizma@redhat.com>
src/crimson/os/seastore/seastore_types.h
src/crimson/os/seastore/transaction_interruptor.h

index 308b1d6226140b524a1db15f736e65a04d193f94..45eab27c9f8b1252126aedb7030400b31f019447 100644 (file)
 #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,
index d0522c23c19eb4fcbb5b7866de1989c494b1cc7f..587d95d68ff1e8c91018d06c2fde6e7728aaefbf 100644 (file)
@@ -9,6 +9,7 @@
 #include <utility>
 
 #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<base_ertr>;
+
 template <typename F, typename... Args>
 auto with_trans_intr(Transaction &t, F &&f, Args&&... args) {
   return trans_intr::with_interruption_to_error<crimson::ct_error::eagain>(