mirror of
https://github.com/ceph/ceph
synced 2025-01-21 02:31:19 +00:00
osd/ECBackend: use Listener instead of PG interface to check undersized
Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
931fc923c3
commit
50a6f3c59c
@ -954,9 +954,9 @@ void ECBackend::handle_sub_write(
|
||||
!op.backfill,
|
||||
localt);
|
||||
|
||||
PrimaryLogPG *_rPG = dynamic_cast<PrimaryLogPG *>(get_parent());
|
||||
if (_rPG && !_rPG->is_undersized() &&
|
||||
(unsigned)get_parent()->whoami_shard().shard >= ec_impl->get_data_chunk_count())
|
||||
if (!get_parent()->pg_is_undersized() &&
|
||||
(unsigned)get_parent()->whoami_shard().shard >=
|
||||
ec_impl->get_data_chunk_count())
|
||||
op.t.set_fadvise_flag(CEPH_OSD_OP_FLAG_FADVISE_DONTNEED);
|
||||
|
||||
if (on_local_applied_sync) {
|
||||
|
@ -216,6 +216,8 @@ typedef ceph::shared_ptr<const OSDMap> OSDMapRef;
|
||||
pg_shard_t peer,
|
||||
const hobject_t &hoid) = 0;
|
||||
|
||||
virtual bool pg_is_undersized() const = 0;
|
||||
|
||||
virtual void log_operation(
|
||||
const vector<pg_log_entry_t> &logv,
|
||||
const boost::optional<pg_hit_set_history_t> &hset_history,
|
||||
|
@ -415,6 +415,10 @@ public:
|
||||
assert(is_backfill_targets(peer));
|
||||
return should_send;
|
||||
}
|
||||
|
||||
bool pg_is_undersized() const override {
|
||||
return is_undersized();
|
||||
}
|
||||
|
||||
void update_peer_last_complete_ondisk(
|
||||
pg_shard_t fromosd,
|
||||
|
Loading…
Reference in New Issue
Block a user