]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os: do not let omap_get_values() return input_output_error 38758/head
authorKefu Chai <kchai@redhat.com>
Mon, 4 Jan 2021 15:25:10 +0000 (23:25 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 4 Jan 2021 15:28:15 +0000 (23:28 +0800)
BlueStore only returns 0 or -ENOENT. so no need to handle the cases
where the return value is neither of them.

but Seastore might return EIO, so keep the interface unchanged.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/os/alienstore/alien_store.cc

index 8b9955156b6796e23edbb6b4479203f2cf6b18bd..cb55532545b47cdc90bb992cae5b962514dbd0cd 100644 (file)
@@ -316,10 +316,8 @@ auto AlienStore::omap_get_values(CollectionRef ch,
     }).then([&values] (int r) -> read_errorator::future<omap_values_t> {
       if (r == -ENOENT) {
         return crimson::ct_error::enoent::make();
-      } else if (r < 0){
-        logger().error("omap_get_values: {}", r);
-        return crimson::ct_error::input_output_error::make();
       } else {
+        assert(r == 0);
         return read_errorator::make_ready_future<omap_values_t>(std::move(values));
       }
     });