]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cls/rgw: trim all usage entries in cls_rgw
authorAbhishek Lekshmanan <abhishek@suse.com>
Tue, 21 Nov 2017 15:38:27 +0000 (16:38 +0100)
committerShinobu Kinjo <shinobu@redhat.com>
Thu, 21 Dec 2017 16:06:24 +0000 (01:06 +0900)
commit7810567fa37308bfeadf63e65f08adc36bfb886e
tree8696d1218396e8aa7e49cd7772982ebcc9e29a72
parentb3fd46810c01be00ebf26b9893d8bab107ee93f2
cls/rgw: trim all usage entries in cls_rgw

Currently trim usage will only trim upto 128 omap entries, since we need
to run this in a loop until we're done, actually make the cls return
-ENODATA so that we know when to stop the loop (inspired by a similar
call in cls_log) this involves the following changes

* return -ENODATA when iterate entries goes through and the value of
  iter (which is set as the last value of key when succeeded)
* use IoCtx for calling the loop from within cls rather than in rgw
* drop the goto call in rgw_rados since we can return once we're done
  processing

Fixes: http://tracker.ceph.com/issues/22234
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
(cherry picked from commit b548a3f3443452210d92cad574bcb73ba6d2ce42)
src/cls/rgw/cls_rgw.cc
src/cls/rgw/cls_rgw_client.cc
src/cls/rgw/cls_rgw_client.h
src/rgw/rgw_rados.cc