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

Method prepare_data_read

src/client/FSCrypt.cc:1148–1167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1146}
1147
1148void FSCrypt::prepare_data_read(const FSCryptContextRef& ctx,
1149 FSCryptKeyValidatorRef *kv,
1150 uint64_t off,
1151 uint64_t len,
1152 uint64_t file_raw_size,
1153 uint64_t *read_start,
1154 uint64_t *read_len,
1155 FSCryptFDataDencRef *denc)
1156{
1157 *denc = get_fdata_denc(ctx, kv);
1158
1159 auto& fscrypt_denc = *denc;
1160
1161 *read_start = (!fscrypt_denc ? off : fscrypt_block_start(off));
1162 uint64_t end = off + len;
1163 if (fscrypt_denc) {
1164 end = fscrypt_align_ofs(end);
1165 }
1166 *read_len = end - *read_start;
1167}
1168#endif

Callers 4

_do_setattrMethod · 0.80
startMethod · 0.80
_read_asyncMethod · 0.80
_read_syncMethod · 0.80

Calls 2

fscrypt_block_startFunction · 0.85
fscrypt_align_ofsFunction · 0.85

Tested by

no test coverage detected