osd: move PG collection creation into static PG method

This way we properly create the pgmeta object and set the infokey attr on
it.  Break it into two steps, one part before split, one after.

Disable the collection_empty() check in split so that it doesn't trip over
this object.

Signed-off-by: Sage Weil <sage@redhat.com>
osd/PGLog: take ghobject_t instead of hobject_t

Signed-off-by: Sage Weil <sage@redhat.com>
osd/PGLog: explicitly pass log_oid collection

Do not assume the log_oid is ine the 'meta' collection.

Signed-off-by: Sage Weil <sage@redhat.com>
osd: move pg log and info to a per-pg object

Move all PG metadata (info, biginfo, epoch, and log) to a single per-PG
object.  This should make it easier for ObjectStore implementations to
avoid lock contention in the write path.

Signed-off-by: Sage Weil <sage@redhat.com>
test/osd/osd-test-helper.sh: enable filestore log

Signed-off-by: Sage Weil <sage@redhat.com>
osd/PGLog: drop support for ancient logs

Assume that users have at least upgraded to dumpling first.

Signed-off-by: Sage Weil <sage@redhat.com>
osd: prevent upgrade from older than v7

Signed-off-by: Sage Weil <sage@redhat.com>
osd: retire meta/infos object entirely

Do not create it; remove it on upgrade.

Signed-off-by: Sage Weil <sage@redhat.com>
ceph_objectstore_tool: Clean-up unused struct_ver in tool's metadata section

Exported struct_ver not used by write_info() or write_pg()

Signed-off-by: David Zafman <dzafman@redhat.com>
ceph_objectstore_tool: Prevent tool from transitioning struct_v on rm-past-intervals

Signed-off-by: David Zafman <dzafman@redhat.com>
osd: move pg removal flag into a static helper

Signed-off-by: Sage Weil <sage@redhat.com>
ceph_objectstore_tool: use '_remove' pgmeta omap key to indicate removal too

We could conceivably mark the PG for backfill, but to do this correctly
we have to do the log rollback, which uses various methods in PG to update
snap metadata that we simply don't have access to from this tool.

Signed-off-by: Sage Weil <sage@redhat.com>
osd: drop legacy arg to PG::peek_map_epoch

The function can figure it out itself, and it's only needed for legacy.

Signed-off-by: Sage Weil <sage@redhat.com>
osd: drop infos_oid arg from PG::read_info()

Only needed for legacy.

Signed-off-by: Sage Weil <sage@redhat.com>
osd: drop snap_collections

This is obsolete since cuttlefish.

Signed-off-by: Sage Weil <sage@redhat.com>
osd/PG: drop PG::read_info support for ancient PGs

This is rewritten regularly by any vaguely-active OSD; no need for this
any more.

Signed-off-by: Sage Weil <sage@redhat.com>
os/ObjectStore: deprecated collection attr operations

Signed-off-by: Sage Weil <sage@redhat.com>
osd/PG: drop PG/collection attrs from ScrubMap

The collection attrs are often version specific.  We should compare the
semantic PG metadata, if anything, not these!

Signed-off-by: Sage Weil <sage@redhat.com>
ceph_test_objectstore_workloadgen: set pgmeta omap instead of collection xattr

Signed-off-by: Sage Weil <sage@redhat.com>
os/ObjectStore: deprecated collection_getattr et al

Drop the functional tests for this too.

Return EOPNOTSUPP by default, and tolerate this in the callers.

Signed-off-by: Sage Weil <sage@redhat.com>