]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/osd: apply errorator along the read path, part 3.
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 9 Sep 2019 13:44:40 +0000 (15:44 +0200)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Wed, 20 Nov 2019 19:36:17 +0000 (20:36 +0100)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/common/errorator.h
src/crimson/osd/pg_backend.h

index b3b7cddc575b61eb739531f27362620ff2db737c..155570e71882185fa690914fa82c9756f33176a6 100644 (file)
@@ -11,7 +11,8 @@ namespace _impl {
   enum class ct_error {
     enoent,
     invarg,
-    enodata
+    enodata,
+    input_output_error
   };
 }
 
@@ -380,6 +381,7 @@ namespace ct_error {
   using enoent = unthrowable_wrapper<_impl::ct_error::enoent>;
   using enodata = unthrowable_wrapper<_impl::ct_error::enodata>;
   using invarg = unthrowable_wrapper<_impl::ct_error::invarg>;
+  using input_output_error = unthrowable_wrapper<_impl::ct_error::input_output_error>;
 }
 
 } // namespace crimson
index 09d8ca165a148af80ad9e663f173abdd71a17450..4c26c568a7c17b04809e6c1d03ae6a8d78daa3d1 100644 (file)
@@ -31,6 +31,8 @@ class PGBackend
 protected:
   using CollectionRef = crimson::os::CollectionRef;
   using ec_profile_t = std::map<std::string, std::string>;
+  // low-level read errorator
+  using ll_read_errorator = crimson::os::FuturizedStore::read_errorator;
 
 public:
   PGBackend(shard_id_t shard, CollectionRef coll, crimson::os::FuturizedStore* store);
@@ -44,6 +46,9 @@ public:
   using cached_os_t = boost::local_shared_ptr<ObjectState>;
   seastar::future<cached_os_t> get_object_state(const hobject_t& oid);
   seastar::future<> evict_object_state(const hobject_t& oid);
+
+  using read_errorator = \
+    ll_read_errorator::extend<crimson::ct_error::input_output_error>;
   seastar::future<bufferlist> read(const object_info_t& oi,
                                   uint64_t off,
                                   uint64_t len,
@@ -110,8 +115,6 @@ public:
   virtual void got_rep_op_reply(const MOSDRepOpReply&) {}
 
 protected:
-  // low-level read errorator
-  using ll_read_errorator = ceph::os::FuturizedStore::read_errorator;
   const shard_id_t shard;
   CollectionRef coll;
   crimson::os::FuturizedStore* store;