rgw: reduce calls to rgw_obj.set_obj()

default manifest iterator construction did unneeded init of rgw_obj.
Also add a smarter copy constructor to RGWObjState that does not copy
manifest if not needed.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
test/objectstore/store_test.cc: prefer ++operators for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
MDCache.h: init 'umaster::safe' in constructor

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
MDCache.cc: init 'umaster::ls' with NULL in contructor

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test/libradosstriper/striping.cc: fix potential memory leak

Fix for:
[src/test/libradosstriper/striping.cc:138]: (error) Allocation with
 getObjName, stat doesn't release it

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

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
RadosStriperImpl.cc: catch exception by reference

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
libcephfs/test.cc: fix use after free

Don't call ceph_shutdown() after ceph_release().

CID 1219651 (#1 of 1): Use after free (USE_AFTER_FREE)
  17. deref_arg: Calling ceph_shutdown dereferences freed
  pointer cmount.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
0.82
osdmaptool/test-map-pgs.t: fix escaping to fix run

Run failed always running into the '|| cat $OUT' case due
to bad escaping of '\t'. This is caused by different shells
on different distros (e.g. bash on SUSE vs dash on Ubuntu).

Use 'grep -P ' and fix the regex to make it shell independet.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test/ceph-disk.sh: fix for SUSE

On SUSE 'which' returns always the full path of (shell) commands and
not e.g. './ceph-conf' as on Debian. Add check also for full
path returned by which.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Merge pull request #2021 from ceph/wip-da-fix-make-check

Fixes to get "make check" run on SUSE v2

Reviewed-by: Sage Weil <sage@redhat.com>
Merge pull request #1863 from ceph/wip-rgw-manifest-iter

rgw: reduce calls to rgw_obj.set_obj()

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
qa/workunits: cephtool: split into functions

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
qa/workunits: cephtool: move test line to where it's more appropriate

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
qa/workunits: cephtool: split into properly indented functions

The test was a big sequence of commands being run and it has been growing
organically for a while, even though it has maintained a sense of
locality with regard to the portions being tested.

This patch intends to split the commands into functions, allowing for a
better semantic context and easier expansion.  On the other hand, this
will also allow us to implement mechanisms to run specific portions of
the test instead of always having to run the whole thing just to test a
couple of lines down at the bottom (or have to creatively edit the test).

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
qa/workunits: cephtool: add/remove comments

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
qa/workunits: cephtool: cleanup state after erasure-code-profile test

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
qa/workunits: cephtool: allow running individual tests

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
qa/workunits: cephtool: disable bash debug when not running tests

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>