Commit Graph

79385 Commits

Author SHA1 Message Date
Sage Weil
31312797be ceph-objectstore-tool: drop unused biginfo_oid
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 14:26:56 -05:00
Sage Weil
36817117d6 ceph-objectstore-tool: refuse to import PG older that OSD's oldest_epoch
We don't have a way to construct a valid PastIntervals history.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 14:26:56 -05:00
Patrick Donnelly
ae5d61bfd5
ptl-tool: checkout branch after creation
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-10-06 11:52:04 -07:00
Sage Weil
b6a5c09dba ceph-objectstore-tool: remove rm-past-intervals op
The OSD doesn't rebuild this on demand anymore.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
0f654d0f8d ceph-objectstore-tool: do not clear same_interval_since and PastIntervals
We dropped the OSD recalculation code for this.  Import it.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
10a5a838f8 ceph-objectstore-tool: print pg_info_t to stdoutt
Helpful for debugging

Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
7816ab5a8e osd: print summary for forced backfill/recovery to debug
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
05d52061ac osd/PG: drop OSD friend, finally!
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
f6d3077225 osd: drop redundant is_active() check before scrub_sched()
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
7debd61f8b osd/PG: make update_snap_mapper_bits public
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
25769b2736 osd/PG: make on_removal() public
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
c4616eec28 osd/PG: make get_primary() public
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
17e6d40080 osd/PG: add get_pool()
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
070181a9e5 osd: use pg_id.pool() for pg pool id
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
24af955d02 osd/PG: make sched_scrub() public
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
88c13308b6 osd/PG: get_must_scrub()
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
d14cc56157 osd/PGBackend: remove scrub_supported()
Everybody supports scrub.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
2a3a3fdae7 osd/PG: change 'debug dump_missing'
- json
- move into PG class

No users in the qa suite.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
79e7dbb80c osd/PG: move bits of delete_dir (pg removal) into PG
We don't want to expose things like SnapMapper, OSDriver.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
b8f33aab64 osd/PG: define public interface for heartbeat peers
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
d36c468647 osd: use accessors for pg resurrection
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
7a4f30d8a6 osd/PG: simplify start_recovery_ops return value meaning
Instead of complex check in caller, return simple bool indicating whether
find_unfound() should be called with a rctx.

There is one remaining condition that can probably be simplified:

  if (!recovering.empty() ||
      work_in_progress || recovery_ops_active > 0 || deferred_backfill)
    return !work_in_progress && have_unfound();

but we will leave it for now.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
e5405feada osd/PG: simplify unfound recovery case; rename method
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
82077e7116 osd/PG: drop unneeded write_if_dirty
Nothing in start_recovery_ops or stuck_on_unfound dirties state.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
b3b8119585 osd/PG: move a few assertions, flag change into start_recovery_ops()
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
81f93729ff osd/PG: move some more split machinery into PG
and move other split pieces into the public interface.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
fa7818aefa osd/PG: move write_if_dirty inside handle_{loaded,create}
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
043816396c osd/PG: get_need_up_thru(), get_same_interval_since()
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
f542b2014e osd: bit less verbose while loading pgs
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
6493f8ec5a osd/PG: move more recovery logic into PG
I suspect we eventually want to move the create_context and
dispatch_context into OSDService (if it isn't there already) and move
even more of this logic into PG.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
ea169c1bf2 osd/PG: move some osd logic into handle_pg_trim
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
43265b2310 osd/PG: hide peering_queue from OSD
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
ac9e2f7609 osd: remove build_past_intervals_parallel
This was added in the dumpling era to handle the case where we have lots
of PGs with stale or missing past_intervals.  These days, we update
PastIntervals as we inject new makes (via advance_map), when we
learn about new PGs via notify with get the PastIntervals at the same time,
and during PGCreate handling we have a separate path in
build_initial_pg_history.  This code is obsolete.

It also reaches deep into the PG class where it shouldn't!

Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
602203819a osd: use PG::is_deleting()
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
342d68189f osd/PG: move load_pgs cruft into read_state()
This only happens during initial load; move it there.

Also, since update_store_with_options

Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:18 -05:00
Sage Weil
662bb8f430 osd/PG: make read_state, peek_map_epoch public
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:17 -05:00
Sage Weil
48f4126507 osd/PG: simplify/streamline upgrade process
There's no reason for this to be exposed to the OSD.  Just do it directly
in read_state().

Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:17 -05:00
Sage Weil
9dfa72454e osd/PG: drop bufferlist passed from peek_map_epoch to read_state/read_info
This is no longer used or needed.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:17 -05:00
Sage Weil
3b70a35e7b osd/PG: make init() public
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:17 -05:00
Sage Weil
80233f28d4 osd/PG: on_shutdown -> shutdown in public interface
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:17 -05:00
Sage Weil
1b81002920 osd/PG: add get_num_ref()
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:17 -05:00
Sage Weil
385cda10a2 osd/PG: add get_pg_stats() to public interface
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:17 -05:00
Sage Weil
7908142647 osd/PG: add dump_pgstate_history() to public interface
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:17 -05:00
Sage Weil
5cef6cad4b osd/PG: make get_watchers public, hide locking
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:17 -05:00
Sage Weil
72d50e463f osd: drop legacy infos object cleanup
This won't be there post-luminous

Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:17 -05:00
Sage Weil
83a3513e95 osd/PG: make osr public
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:17 -05:00
Sage Weil
923ca75443 osd: use is_deleting()
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:17 -05:00
Sage Weil
329eb60596 osd: use pg->pg_id const member, not get_pgid()
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:17 -05:00
Sage Weil
9ab4eebcaf osd/PG: reorder some members
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:17 -05:00
Sage Weil
49aeb040ee osd/PG: protect get_last_peering_reset
Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-06 13:08:17 -05:00