mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
seastore/.../staged_fltree/node: check for conflict in Node::load
This will be unnecessary once converted to interruptible_future. Signed-off-by: Samuel Just <sjust@redhat.com>
This commit is contained in:
parent
9a514cccaa
commit
6df608159e
@ -684,7 +684,12 @@ eagain_future<Ref<Node>> Node::load(
|
||||
c.t, addr, expect_is_level_tail);
|
||||
ceph_abort("fatal error");
|
||||
})
|
||||
).safe_then([FNAME, c, addr, expect_is_level_tail](auto extent) {
|
||||
).safe_then([FNAME, c, addr, expect_is_level_tail](auto extent)
|
||||
-> eagain_future<Ref<Node>> {
|
||||
if (c.t.is_conflicted()) {
|
||||
return crimson::ct_error::eagain::make();
|
||||
}
|
||||
assert(extent->is_valid());
|
||||
auto header = extent->get_header();
|
||||
auto field_type = header.get_field_type();
|
||||
if (!field_type) {
|
||||
@ -709,7 +714,8 @@ eagain_future<Ref<Node>> Node::load(
|
||||
ceph_abort("fatal error");
|
||||
}
|
||||
auto impl = LeafNodeImpl::load(extent, *field_type);
|
||||
return Ref<Node>(new LeafNode(impl.get(), std::move(impl)));
|
||||
return eagain_ertr::make_ready_future<Ref<Node>>(
|
||||
new LeafNode(impl.get(), std::move(impl)));
|
||||
} else if (node_type == node_type_t::INTERNAL) {
|
||||
if (extent->get_length() != c.vb.get_internal_node_size()) {
|
||||
ERRORT("load addr={:x}, is_level_tail={} error, "
|
||||
@ -718,7 +724,8 @@ eagain_future<Ref<Node>> Node::load(
|
||||
ceph_abort("fatal error");
|
||||
}
|
||||
auto impl = InternalNodeImpl::load(extent, *field_type);
|
||||
return Ref<Node>(new InternalNode(impl.get(), std::move(impl)));
|
||||
return eagain_ertr::make_ready_future<Ref<Node>>(
|
||||
new InternalNode(impl.get(), std::move(impl)));
|
||||
} else {
|
||||
ceph_abort("impossible path");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user