os/DBObjectMap: include hash in header key for EC objects

We were inadvertantly dropping the hash portion of the header key for EC
objects.  This is usually not noticeable, but turns up quite quickly with
the new pgmeta objects, which share the same name ('') across PGs with
different hash values

Fixes: #10171
Signed-off-by: Sage Weil <sage@redhat.com>
ceph_test_rados: generate mix of small and large xattrs

This ensures that we exercise the large xattr handling paths in the OSD.

(Specifically, we want to trigger DBObjectMap usage on EC objects so that
we can test the fix for #10171).

Signed-off-by: Sage Weil <sage@redhat.com>
os/DBObjectMap: new version v2; drop support for upgrading from v1

- Don't support upgrade from v1 anymore
- Add upgrade for v1 -> v2

Signed-off-by: Sage Weil <sage@redhat.com>
os/FileStore: move to v4, trigger DBOjectMap upgrade

From FileStore's perspective, nothing changed from v3 to v4.  However, we
need to pass the do_upgrade flag to DBOjectMap open to trigger it's
upgrade process.

Signed-off-by: Sage Weil <sage@redhat.com>
osd: add PGMETA ondisk feature

Once you start using the pgmeta objects there is no going back.

Signed-off-by: Sage Weil <sage@redhat.com>
common/hobject_t: fix whitespace

Signed-off-by: Sage Weil <sage@redhat.com>
common/hobject_t: add pgmeta named ctor and is_pgmeta() check

There will be exactly one of these per PG.  It slots into the flat

  (pool, hash, name...)

namespace but is not a legal rados name (since it is the empty string).

Signed-off-by: Sage Weil <sage@redhat.com>
osd/osd_types: spg_t::make_pgmeta_oid()

Signed-off-by: Sage Weil <sage@redhat.com>
osd/PGBackend: skip pgmeta objects

Signed-off-by: Sage Weil <sage@redhat.com>
ceph-objectstore-tool: skip pgmeta object on export

We will (eventually) export the contents of this object explicitly as
PG metadata.

Signed-off-by: Sage Weil <sage@redhat.com>
osd: skip pgmeta object on remove_dir

Signed-off-by: Sage Weil <sage@redhat.com>
osd/PG: define pgmeta_oid member

Signed-off-by: Sage Weil <sage@redhat.com>
osd: don't need to pass object names via ctor

Calculate biginfo on the fly.

Signed-off-by: Sage Weil <sage@redhat.com>
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>