diff options
author | Josh Durgin <jdurgin@redhat.com> | 2017-02-14 09:04:12 +0100 |
---|---|---|
committer | Josh Durgin <jdurgin@redhat.com> | 2017-04-20 02:45:43 +0200 |
commit | 6fba80c1fac7f012303b27ef1e6fdb9d90c81a40 (patch) | |
tree | fab2339cc0dd5317bdd4dceadbf359805304fdda /src/osd | |
parent | OSDMonitor: get stripe_width via stripe_unit in ec profile (diff) | |
download | ceph-6fba80c1fac7f012303b27ef1e6fdb9d90c81a40.tar.xz ceph-6fba80c1fac7f012303b27ef1e6fdb9d90c81a40.zip |
osd, OSDMonitor, qa: mark ec overwrites non-experimental
Keep the pool flag around so we can distinguish between a pool that
should maintain hashes for each chunk, and a missing one is a bug, vs
an overwrites pool where we rely on bluestore checksums for detecting
corruption.
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
Diffstat (limited to 'src/osd')
-rw-r--r-- | src/osd/ECBackend.cc | 12 | ||||
-rw-r--r-- | src/osd/osd_types.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/osd/ECBackend.cc b/src/osd/ECBackend.cc index ea285cc4e6f..569bb89529e 100644 --- a/src/osd/ECBackend.cc +++ b/src/osd/ECBackend.cc @@ -954,7 +954,7 @@ void ECBackend::handle_sub_read( ++i) { int r = 0; ECUtil::HashInfoRef hinfo; - if (!get_parent()->get_pool().is_hacky_ecoverwrites()) { + if (!get_parent()->get_pool().allows_ecoverwrites()) { hinfo = get_hash_info(i->first); if (!hinfo) { r = -EIO; @@ -989,7 +989,7 @@ void ECBackend::handle_sub_read( ); } - if (!get_parent()->get_pool().is_hacky_ecoverwrites()) { + if (!get_parent()->get_pool().allows_ecoverwrites()) { // This shows that we still need deep scrub because large enough files // are read in sections, so the digest check here won't be done here. // Do NOT check osd_read_eio_on_bad_digest here. We need to report @@ -1732,7 +1732,7 @@ bool ECBackend::try_state_to_reads() Op *op = &(waiting_state.front()); if (op->requires_rmw() && pipeline_state.cache_invalid()) { - assert(get_parent()->get_pool().is_hacky_ecoverwrites()); + assert(get_parent()->get_pool().allows_ecoverwrites()); dout(20) << __func__ << ": blocking " << *op << " because it requires an rmw and the cache is invalid " << pipeline_state @@ -1786,7 +1786,7 @@ bool ECBackend::try_state_to_reads() dout(10) << __func__ << ": " << *op << dendl; if (!op->remote_read.empty()) { - assert(get_parent()->get_pool().is_hacky_ecoverwrites()); + assert(get_parent()->get_pool().allows_ecoverwrites()); objects_read_async_no_cache( op->remote_read, [this, op](map<hobject_t,pair<int, extent_map> > &&results) { @@ -1859,7 +1859,7 @@ bool ECBackend::try_reads_to_commit() dout(20) << __func__ << ": written: " << written << dendl; dout(20) << __func__ << ": op: " << *op << dendl; - if (!get_parent()->get_pool().is_hacky_ecoverwrites()) { + if (!get_parent()->get_pool().allows_ecoverwrites()) { for (auto &&i: op->log_entries) { if (i.requires_kraken()) { derr << __func__ << ": log entry " << i << " requires kraken" @@ -2365,7 +2365,7 @@ void ECBackend::be_deep_scrub( o.digest_present = false; return; } else { - if (!get_parent()->get_pool().is_hacky_ecoverwrites()) { + if (!get_parent()->get_pool().allows_ecoverwrites()) { assert(hinfo->has_chunk_hash()); if (hinfo->get_total_chunk_size() != pos) { dout(0) << "_scan_list " << poid << " got incorrect size on read" << dendl; diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h index 1c4e4c65a6c..550ea8dfca3 100644 --- a/src/osd/osd_types.h +++ b/src/osd/osd_types.h @@ -1448,7 +1448,7 @@ public: } uint64_t required_alignment() const { return stripe_width; } - bool is_hacky_ecoverwrites() const { + bool allows_ecoverwrites() const { return has_flag(FLAG_EC_OVERWRITES); } |