Adding new Wireshark dissector. This is loosely based on the original
dissector, it has been re-worked to bring into line with Wireshark
coding guidelines that aim to ensure portability. It currently only
decodes a handful of messages as test cases, it needs more work to make
it useful. See README.txt for a bit more background.
cls_rgw_client.cc: reduce scope of local variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
rgw_admin.cc: fix same expression on both sides of '||'

Remove twice listed checks, get checks in alphabetical order,
added comment above the checks to point out to keep it in
alphabetical order to avoid double checks.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
rgw/rgw_bucket.cc: remove unused local variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
rgw_bucket.cc: don't return bool if return value is int

Fix minor style issue: if the function return value is an integer
don't return bool values.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
rgw/rgw_bucket.cc: return result of function calls

Return the result of rgw_(un)link_bucket()/ from
RGWBucketMetadataHandler::put() to signal errors correctly to
the function caller.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
rgw/rgw_rest.cc: fix malloc memory leak

Free with malloc allocated memory in error case before return.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
rgw/rgw_rados.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
rgw/rgw_op.cc: reduce scope of local 'ret' integer variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
rgw/rgw_rest_s3.cc: fix dereferencing after deallocation

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
mon/MonClient: better debugging on version requests

From leak hunting, but useful.

Signed-off-by: Sage Weil <sage@inktank.com>
osd: make pool_stat_t *log_size fields signed

Signed-off-by: Sage Weil <sage@inktank.com>
osd: add floor() method to pg/osd stat structs

We often want to maintain a nonnegative value.  We generalize
this to floors other than zero only because it makes the function
call make intuitive sense; I don't think it is at all useful.

Signed-off-by: Sage Weil <sage@inktank.com>
PG, ReplicatedPG: pass a transaction down to ReplicatedPG::on_change

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
ReplicatedPG: track temp collection contents, clear during on_change

We also assert in on_flushed() that the temp collection is actually
empty.

Fixes: #5670
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
mon/PGMap: use signed values for calculated rates

si_t (and friends) does not handle signed values, but at least we can
give the Formatters unmangled values.  This shouldn't happen (tm), but
if it does this will make things a bit less confusing and makes the code
a bit less fragile.

Signed-off-by: Sage Weil <sage@inktank.com>
mon/PGMap: avoid negative pg stats when calculating rates

We periodically see strange values come out of the estimated cluster
throughput and recovery rates.  Pretty sure this is cause by feeding
negative values into the rate arithmetic and then giving the si_t
helpers mangled (sign-extended + bit shifted) values.

Signed-off-by: Sage Weil <sage@inktank.com>
osd: log PG state changes at level 5

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
mon/PGMap: don't mangle stamp_delta in clear_delta()

This is a delta, not a timestamp.

This triggered when a cluster is idle for 2* the mon_delta_reset_interval,
and required a mon restart to fix.

Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
osd: make ms_handle_reset debug more useful

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>