os: Fix version_stamp_is_valid() and write_version_stamp() error return

Caused by 341fb208aa32117f58ed4ce623f4b152f64ac72e

Signed-off-by: David Zafman <david.zafman@inktank.com>
include: Bug fixes for CompatSet

FeatureSet insert/remove
  Use 64-bit arithmetic to allow features past 31
  Allow feature 63 by fixing assert in insert
CompatSet::unsupported() bugs
  Ignore feature 0 which became illegal
  Use 64-bit arithmetic when computing mask
  Use id in insert() and to get correct feature name
  Use the right map to get name for diff.ro_compat

Caused by 80979bbe92409e6f098566e18be6ed59ad9d111a
Caused by 470796b5456592ee5179bbd44b72910a2d7f6aca

Backport: dumpling, cuttlefish

Signed-off-by: David Zafman <david.zafman@inktank.com>
test: Adding unittest for CompatSet

Signed-off-by: David Zafman <david.zafman@inktank.com>
osd: read_superblock() not outputing unsupported features when incompatible

Use working version of CompatSet::unsupported() to improve log output

Backport: dumpling, cuttlefish

Signed-off-by: David Zafman <david.zafman@inktank.com>
os, osd, tools: Add backportable compatibility checking for sharded objects

OSD
  New CEPH_OSD_FEATURE_INCOMPAT_SHARDS
FileStore
  NEW CEPH_FS_FEATURE_INCOMPAT_SHARDS
  Add FSSuperblock with feature CompatSet in it
  Store sharded_objects state using CompatSet
  Add set_allow_sharded_objects() and get_allow_sharded_objects() to FileStore/ObjectStore
  Add read_superblock()/write_superblock() internal filestore functions
ceph_filestore_dump
  Add OSDsuperblock to export format
  Use CompatSet from OSD code itself in filestore-dump tool
  Always check compatibility of OSD features with on-disk features
  On import verify compatibility of on-disk features with export data
  Bump super_ver due to export format change

Backport: dumpling, cuttlefish

Signed-off-by: David Zafman <david.zafman@inktank.com>
include, test: Add CompatSet::merge() operation

New func merge() adds missing features from specified CompatSet
Add merge testing to unittest

Signed-off-by: David Zafman <david.zafman@inktank.com>
common, os, osd, test, tools: FileStore must work with ghobjects rather than hobjects

Add ghobject_t to hboject.h header
Add constants NO_SHARD/NO_GEN and change gen_t/shard_t
Convert other headers from hobject_t to ghobject_t
Mostly straight hobject_t to ghobject_t for src/os cc files
Fix tools and tests and enable ceph-dencoder
Add filename generation and parsing including unittest addition
Get ceph-filestore-dump to build
Add gen/shard to DBObjectMap::ghobject_key() and update test case
Add CEPH_FS_FEATURE_INCOMPAT_SHARDS new FileStore feature
Add CEPH_OSD_FEATURE_INCOMPAT_SHARDS new osd feature

Fixes: #5862

Signed-off-by: David Zafman <david.zafman@inktank.com>
osd: Cleanup init()/read_superblock()

Fix error handling in init()
Cleanup read_superblock() by moving unrelated code into init()
Move init() feature upgrade right after compatibility checking
Remove redundant whoami check

Signed-off-by: David Zafman <david.zafman@inktank.com>
os/ObjectStore: Interim collection_list* functions in ObjectStore

Handle ghobject_t to hobject_t conv of collection_list* funcs
Temporary code so that this branch doesn't break master

Signed-off-by: David Zafman <david.zafman@inktank.com>
osd: Remove code for reading ancient unsupported logs

Signed-off-by: David Zafman <david.zafman@inktank.com>
os: Make write_version_stamp() private

Signed-off-by: David Zafman <david.zafman@inktank.com>
os, osd: Add comments which doxygen can process

Signed-off-by: David Zafman <david.zafman@inktank.com>