]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/onode-staged-tree: check invalid transaction only
authorYingxin Cheng <yingxin.cheng@intel.com>
Mon, 28 Jun 2021 13:38:49 +0000 (21:38 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Thu, 1 Jul 2021 02:13:07 +0000 (10:13 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/os/seastore/onode_manager/staged-fltree/node_extent_manager/seastore.h

index f2d5a48a3dbd097d79769b5b59e69ed2d567c85e..deb873265e92f9f3c14d9a97c1d9526345107fe0 100644 (file)
@@ -109,11 +109,12 @@ class SeastoreNodeExtentManager final: public TransactionManagerHandle {
     ).safe_then([addr, &t](auto&& e) -> read_ertr::future<NodeExtentRef> {
       TRACET("read {}B at {:#x} -- {}",
              t, e->get_length(), e->get_laddr(), *e);
-      if (!e->is_valid() || t.is_conflicted()) {
+      if (t.is_conflicted()) {
         ERRORT("transaction conflict detected on extent read {}", t, *e);
        assert(t.is_conflicted());
        return crimson::ct_error::eagain::make();
       }
+      assert(e->is_valid());
       assert(e->get_laddr() == addr);
       std::ignore = addr;
       return read_ertr::make_ready_future<NodeExtentRef>(e);