]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson/osd/pg: SnapTrimEvent to support interrupts 56998/head
authorXuehan Xu <xuxuehan@qianxin.com>
Thu, 25 Apr 2024 05:56:25 +0000 (13:56 +0800)
committerXuehan Xu <xuxuehan@qianxin.com>
Sun, 28 Apr 2024 08:57:47 +0000 (16:57 +0800)
commita4ddf6cfc88619f1f50f75a079af5f39f5167a46
tree0d5a03a9667db3bf14d289161b75a093f042293f
parente53d648a28d8a8f73de2b38bdaf82e357c339e44
crimson/osd/pg: SnapTrimEvent to support interrupts

SnapTrimEvent operations are scheduled from `PG::on_active_actmap()`
using a `seastar::do_until` loop. This commit replaces the loop type
into an `interruptor::repeat` and SnapTrimEvent are now scheduled by
`start_operation_may_interrupt`.

Previously, `SnapTrimEvent::start` handled interruptions by returning
a `crimson::ct_error::eagain::make();`. Now, the errorator is directly
returned via the `snap_trim_event_ret_t` and interrupts the loop
described above.

As a result, interruptions originated by interval changes are now
supported by SnapTrimEvent.

Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
src/crimson/osd/osd_operations/snaptrim_event.cc
src/crimson/osd/osd_operations/snaptrim_event.h
src/crimson/osd/pg.cc
src/crimson/osd/pg.h