]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw_file: fix mv/rename cases broken by zipper integration 56345/head
authorMatt Benjamin <mbenjamin@redhat.com>
Thu, 14 Mar 2024 00:19:01 +0000 (20:19 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 20 Mar 2024 15:09:53 +0000 (11:09 -0400)
commitf5948ec879d6315ce71bcb4cb09957be9f9d2334
tree7b3f7147c3f1608ed66979f9402e72261ede5c57
parentcceef281ad6b2af517d203b759bc3ddc2e81b41a
rgw_file: fix mv/rename cases broken by zipper integration

There were two problems.  First, leaf object names must be
expressed as fully-qualified to the bucket as input to the
copy-object step.  Second, handle s->object in the same step
indicates the being-created destination object of the copy,
this was correct in the original zipper change but broken
later.

* add a rename/mv unit test

Tests for the following cases added:

1. move between two sub-directory paths in a single bucket
2. move between two names at the top level of a single bucket
3. move between sub-directory paths in different buckets (cross-bucket rename)

Fixes: https://tracker.ceph.com/issues/64950
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit f11cdb1e1820cc8febbf227532efa11696916e2c)
qa/workunits/rgw/test_librgw_file.sh
src/rgw/rgw_file_int.h
src/rgw/rgw_op.cc
src/test/CMakeLists.txt
src/test/librgw_file_rename.cc [new file with mode: 0644]