]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
osd: handle case when stat returns with error in get_hash_info
authorMykola Golub <mgolub@suse.com>
Tue, 21 Sep 2021 15:17:17 +0000 (16:17 +0100)
committerMykola Golub <mgolub@suse.com>
Tue, 28 Sep 2021 15:14:48 +0000 (16:14 +0100)
commite303dc1cf543fa467d6e0a16c122f77570865e21
tree23409fa513fd3365877bd4d8e363623dac547ffd
parent104d8df5f44cf522422914b254536f42bbe31172
osd: handle case when stat returns with error in get_hash_info

Previously in the case of the error we stored in the cache and
returned HashInfo(ec_impl->get_chunk_count()), which e.g. could
propagate to non-primary shards, introducing inconsistency.

The function's `checks` flag is replaced with `create` flag,
which seems to have more clear meaning here.

In be_deep_scrub the get_hash_info is still called with the
second argument false (i.e. with `create=false`, while previously
it was `checks=false`), which is done intentionally.

Fixes: https://tracker.ceph.com/issues/48959
Signed-off-by: Mykola Golub <mgolub@suse.com>
src/osd/ECBackend.cc
src/osd/ECBackend.h