rgw: don't allow multiple writers to same multiobject part

Fixes: #8269
Backport: firefly, dumpling

A client might need to retry a multipart part write. The original thread
might race with the new one, trying to clean up after it, clobbering the
part's data.
The fix is to detect whether an original part already existed, and if so
use a different part name for it.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit bd8e026f88b812cc70caf6232c247844df5d99bf)
rgw: extend manifest to avoid old style manifest

In case we hit issue #8269 we'd like to avoid creating an old style
manifest. Since we need to have parts that use different prefix we add a
new rule param that overrides the manifest prefix.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit 545d8ad1d2dfe53b967ab1bd17dfeb1780abbb5e)
rgw: if extra data pool name is empty, use data pool name instead

Fixes: #8311
An empty pool name could be used as the extra data pool.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit b300318113b162522759d4794b1cfa3d1d9398e4)
rgw: fix uninit ofs in RGWObjManifect::obj_iterator

Valgrind picked this up:

  <kind>UninitCondition</kind>
  <what>Conditional jump or move depends on uninitialised value(s)</what>
  <stack>
    <frame>
      <ip>0x5145B8</ip>
      <obj>/usr/bin/radosgw</obj>
      <fn>RGWObjManifest::obj_iterator::seek(unsigned long)</fn>
      <dir>/srv/autobuild-ceph/gitbuilder.git/build/out~/ceph-0.82-354-g62027ec/src/rgw</dir>
      <file>rgw_rados.cc</file>
      <line>562</line>
    </frame>
    <frame>
      <ip>0x5672A4</ip>
      <obj>/usr/bin/radosgw</obj>
      <fn>list_multipart_parts(RGWRados*, req_state*, std::string const&amp;, std::string&amp;, int, int, std::map&lt;unsigned int, RGWUploadPartInfo, std::less&lt;unsigned int&gt;, std::allocator&lt;std::pair&lt;unsigned int const, RGWUploadPartInfo&gt; &gt; &gt;&amp;, int*, bool*, bool)</fn>
      <dir>/srv/autobuild-ceph/gitbuilder.git/build/out~/ceph-0.82-354-g62027ec/src/rgw</dir>
      <file>rgw_rados.h</file>
      <line>217</line>
    </frame>
    <frame>
      <ip>0x5688EE</ip>
      <obj>/usr/bin/radosgw</obj>
      <fn>RGWListMultipart::execute()</fn>
      <dir>/srv/autobuild-ceph/gitbuilder.git/build/out~/ceph-0.82-354-g62027ec/src/rgw</dir>
      <file>rgw_op.cc</file>
      <line>2956</line>
    </frame>
...

Fixes: #8699
Backport: firefly
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit e0d3b78b6af523ae77b0cee385cd40f67f7a0ab6)
rgw: set a default data extra pool name

Fixes: #8585
Have a default name for the data extra pool, otherwise it would be empty
which means that it'd default to the data pool name (which is a problem
with ec backends).

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit b2542f8e880e45bb6d052f13eb3ef6a7c61e4cd4)
Merge pull request #2073 from ceph/wip-rgw-firefly-2

rgw: more firefly backports

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>