]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: write meta of a MP part to a correct pool 45428/head
authorJeegn Chen <jeegnchen@tencent.com>
Mon, 8 Mar 2021 14:27:44 +0000 (22:27 +0800)
committerCory Snyder <csnyder@iland.com>
Wed, 16 Mar 2022 15:54:14 +0000 (11:54 -0400)
commitf91364fca23ab57244a9af88afadee5107026a8b
tree9c757342f5d7989a14026d8d985346e9601f1cac
parent179a7bca8a84771b0dde09e26f7a2146a985df90
rgw: write meta of a MP part to a correct pool

When uploading a multipart part to a non-default storage class,
original logic writes the object data to the correct pool
for its storage class.
But when completing the upload, there's another write op
(with a bunch of setxattrs) to the head object targeting
the standard pool (because non-multipart uploads
write their head objects to the default pool).
As a result of this setxattrs op, a redundant zero-sized object is
created in a wrong pool. Multipart complete, multipart abort and
GC would never try to it clean up.

The fix is to make RGWRados::Object::Write::_do_write_meta() learn the
difference between multipart and non-multipart head objects and pick the
correct placement rule for RGWRados::get_obj_head_ref().

Fixes: http://tracker.ceph.com/issues/49128
Signed-off-by: Jeegn Chen <jeegnchen@tencent.com>
(cherry picked from commit 7647823bd42ce8228c3622a91e87680ee22df710)

Conflicts:
src/rgw/rgw_sal.h

Cherry-pick notes:
- RGWAttrs renamed to Attrs after pacific
src/rgw/rgw_putobj_processor.cc
src/rgw/rgw_rados.cc
src/rgw/rgw_rados.h
src/rgw/rgw_sal.h
src/rgw/rgw_sal_rados.cc