MCPcopy Create free account
hub / github.com/ceph/ceph / handle_read

Method handle_read

src/librbd/crypto/CryptoObjectDispatch.cc:85–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83 }
84
85 void handle_read(int r) {
86 auto cct = image_ctx->cct;
87 ldout(cct, 20) << "aligned read r=" << r << dendl;
88 if (r >= 0) {
89 r = 0;
90 for (auto& extent: *extents) {
91 auto crypto_ret = crypto->decrypt_aligned_extent(
92 extent, get_file_offset(image_ctx, object_no, extent.offset));
93 if (crypto_ret != 0) {
94 ceph_assert(crypto_ret < 0);
95 r = crypto_ret;
96 break;
97 }
98 r += extent.length;
99 }
100 }
101
102 if (r == -ENOENT && !disable_read_from_parent) {
103 io::util::read_parent<I>(
104 image_ctx, object_no, extents,
105 io_context->get_read_snap(),
106 parent_trace, this);
107 } else {
108 complete(r);
109 }
110 }
111};
112
113template <typename I>

Callers

nothing calls this directly

Calls 3

get_file_offsetFunction · 0.70
get_read_snapMethod · 0.45

Tested by

no test coverage detected