Skip to content

Commit

Permalink
osd: kill pass-through _open_pg
Browse files Browse the repository at this point in the history
Signed-off-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Feb 12, 2018
1 parent abab1d0 commit 32ce304
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
14 changes: 3 additions & 11 deletions src/osd/OSD.cc
Expand Up @@ -3611,14 +3611,6 @@ void OSD::recursive_remove_collection(CephContext* cct,
// ======================================================
// PG's

PGRef OSD::_open_pg(
OSDMapRef createmap,
spg_t pgid)
{
PGRef pg = _make_pg(createmap, pgid);
return pg;
}

PG* OSD::_make_pg(
OSDMapRef createmap,
spg_t pgid)
Expand Down Expand Up @@ -3805,9 +3797,9 @@ void OSD::load_pgs()
assert(0 == "Missing map in load_pgs");
}
}
pg = _open_pg(pgosdmap, pgid);
pg = _make_pg(pgosdmap, pgid);
} else {
pg = _open_pg(osdmap, pgid);
pg = _make_pg(osdmap, pgid);
}
// there can be no waiters here, so we don't call wake_pg_waiters

Expand Down Expand Up @@ -3873,7 +3865,7 @@ PGRef OSD::handle_pg_create_info(OSDMapRef osdmap, const PGCreateInfo *info)
role = -1;
}

PGRef pg = _open_pg(createmap, pgid);
PGRef pg = _make_pg(createmap, pgid);
pg->ch = store->create_new_collection(pg->coll);

pg->lock(true);
Expand Down
4 changes: 0 additions & 4 deletions src/osd/OSD.h
Expand Up @@ -1810,10 +1810,6 @@ class OSD : public Dispatcher,
PG *lookup_lock_pg(spg_t pgid);

protected:
PGRef _open_pg(
OSDMapRef createmap, ///< map pg is created in
spg_t pg);

PG* _make_pg(OSDMapRef createmap, spg_t pgid);

bool maybe_wait_for_max_pg(OSDMapRef osdmap, spg_t pgid, bool is_mon_create);
Expand Down

0 comments on commit 32ce304

Please sign in to comment.