osd: Improve logging output including pg_shard_t as osd#(shard)

Signed-off-by: David Zafman <david.zafman@inktank.com>
osd: Add logging of missed l_osd_agent_skip cases

Signed-off-by: David Zafman <david.zafman@inktank.com>
osd: Error from start_flush() not checked in agent_maybe_flush()

This caused a very minor memory leak since ctx was allocated
Include logging of l_osd_agent_skip

Signed-off-by: David Zafman <david.zafman@inktank.com>
osd: start_flush() should check for missing clones and return if requested

Fixes: #7659

Signed-off-by: David Zafman <david.zafman@inktank.com>
PG: always clear agent_state in clear_primary_state

We aren't actually active between activate() and all_activated_committed().
We'd have to suspend agent_work during that period which seems like too much
complexity for too little work saved.

Fixes: #7904
Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: hit_set_setup, agent_setup, skip if !active

We call these in on_activate and on_pool_change.  In the former, we are
necessarily active.  In the latter, we only want to do anything if we are
active (otherwise, it will be taken care of when we eventually do become
active).

Fixes: #7904
Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: improve get_object_context debugging

Signed-off-by: Samuel Just <sam.just@inktank.com>
radosgw-admin: fix subuser modify

Shouldn't check for empty access key when modifying swift user, also
set correct fields when updating swift keys.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: subuser creation can be idempotent

No real reason to check for existing subuser before (re)creating it.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
radosgw-admin: don't always generate access key for subusers

Only generate key for subuser if one was not specified for it, and only
when creating a subuser.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
ReplicatedPG::_verify_no_head_clones: missing implies that the clone exists

Fixes: #7659
Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: do not create snapdir on head eviction

Head eviction implies that no clones are present.  Also, add
an exists flag to SnapSetContext in order prevent an ssc from
a recent eviction from preventing a snap read from activating
the promotion machinery.

Fixes: #7858
Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG::do_op: use get_object_context for list-snaps

find_object_context provides some niceties which we don't need since we know
the oid of the clones.  Problematically, it also return ENOENT if the snap
requested happens to have been removed.  Even in such a case, the clone may
well still exist for other snaps.  Rather than modify find_object_context to
avoid this situation for this caller, we'll simply do it inline in do_op.

Fixes: #7858
Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: handle FLAG_OMAP on promote and copyfrom

Fixes: #7967
Signed-off-by: Samuel Just <sam.just@inktank.com>
osd/: track num_objects_omap in pg stats

Fixes: #7831
Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG::agent_choose_mode: exclude omap objects for ec base pool

Fixes: #7831
Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG::agent_choose_mode: use num_user_objects for target_max_bytes calc

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG::agent_choose_mode: improve debugging

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG::_delete_oid: adjust num_object_clones

Signed-off-by: Samuel Just <sam.just@inktank.com>
client: implement RDCACHE reference tracking

make the code be able to track Fc caps used by aysnc buffer reads

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