]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: user quota may not adjust on bucket removal 8113/head
authorVicente Cheng <freeze.bilsted@gmail.com>
Tue, 9 Feb 2016 20:03:24 +0000 (12:03 -0800)
committerVicente Cheng <freeze.bilsted@gmail.com>
Wed, 6 Apr 2016 09:43:16 +0000 (17:43 +0800)
commitc722d00af5286785ad23c574359220e47fd15076
tree24dd8fb633570b8deb91bbc09d778439f270d7b2
parent35eae5fbddd2b271a10db9a69d4c4e34029bca06
rgw: user quota may not adjust on bucket removal

Description:
If the user/admin removes a bucket using --force/--purge-objects options with s3cmd/radosgw-admin respectively, the user stats will continue to reflect the deleted objects for quota purposes, and there seems to be no way to reset them. User stats need to be sync'ed prior to bucket removal.

Solution:
Sync user stats before removing a bucket.

Fixes: #14507
Signed-off-by: Edward Yang <eyang@us.fujitsu.com>
(cherry picked from commit 06507992e3fad837c4667f467d59fc026a2ca0e8)

Conflicts:

src/rgw/rgw_op.cc
            reordering the check seqence and replace some op_ret to ret

Backport Change:
We remove the `tenant` parameter because this feature is not introduced on hammer version.
The rgw multi-tenant feature is introduced on pr#6784 (https://github.com/ceph/ceph/pull/6784)
This feature is supported from v10.0.2 and later version.
src/rgw/rgw_bucket.cc
src/rgw/rgw_op.cc