Bug fix in the way crush_type is extracted from osd crush dump

Signed-off-by: Babu Shanmugam <anbu@enovance.com>
While generating crush_types, avoiding item parsing, and calculating type count by just iterating thorugh buckets list

Signed-off-by: Babu Shanmugam <anbu@enovance.com>
Fetching the date from ceph osd dump as that is more reliable across ceph versions

Signed-off-by: Babu Shanmugam <anbu@enovance.com>
Included the total cluster size in components_count object

Signed-off-by: Babu Shanmugam <anbu@enovance.com>
Merge branch 'master' of https://github.com/enovance/ceph-brag into firefly
buffer: use Mutex instead of Spinlock for raw crcs

Signed-off-by: Sage Weil <sage@inktank.com>
mon: fix Session ref leak in handle_get_version

Signed-off-by: Sage Weil <sage@inktank.com>
ReplicatedPG::agent_work: skip hitset objects before getting object context

Otherwise, we might read the attr on a hitset object we are in the
process of deleting.

Fixes: #8086
Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG::_rollback_to: fix comment, clone certainly could be missing

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG::cancel_flush: requeue dup_ops even if !op

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG::agent_work: skip if head is missing

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG::finish_promote: soid.clone may have been trimed, fix assert

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG::process_copy_chunk: don't check snaps if we got head

Even if we are promoting a clone, we may be reading from head.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Make rados/rest bench work for multiple write instances without metadata conflict.
Signed-off-by: Guang Yang <yguang@yahoo-inc.com>
mds: share max size to client who is allowed for WR cap

WR cap is allowed for the loner client when filelock is in excl->mix
state. MDS should share max size with the loner client in this case.
Otherwise the client may wait for the max size forever.

Fixes: #8092
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
mds: Fix respawn (add path resolution)

Previously assumed that ceph-mds executable was in
PWD - now use /proc/self/exe to find the
executable whereever it may be.  Leave in old version
as a fallback for non-linux environments.

Also add a 'respawn' command so that it's easy to test
respawn with `ceph mds tell <id> respawn`

Fixes: #7966
osd: OSDMap: have osdmap json dump print valid boolean instead of string

Fixes: 8108

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
ReplicatedPG::get_snapset_context: assert snap obj is not missing

Signed-off-by: Samuel Just <sam.just@inktank.com>
Use string instead of char* when saving arguments for rest-bench
mds: fix cap revoke confirmation

when the _revokes list is emptied, it doesn't mean that client has
released the revoking caps. It's possible that client was flusing
dirty metadata.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>