mirror of
https://github.com/ceph/ceph
synced 2025-04-01 23:02:17 +00:00
crimson/os/seastore/async_cleaner: use weak transaction to get backref mappings
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
This commit is contained in:
parent
ff09049cdd
commit
d041427a6c
@ -905,23 +905,14 @@ AsyncCleaner::retrieve_backref_mappings(
|
|||||||
paddr_t start_paddr,
|
paddr_t start_paddr,
|
||||||
paddr_t end_paddr)
|
paddr_t end_paddr)
|
||||||
{
|
{
|
||||||
return seastar::do_with(
|
// Backref-tree doesn't support tree-read during tree-updates with parallel
|
||||||
backref_pin_list_t(),
|
// transactions. So, concurrent transactions between trim and reclaim are
|
||||||
[this, start_paddr, end_paddr](auto &pin_list) {
|
// not allowed right now.
|
||||||
return repeat_eagain([this, start_paddr, end_paddr, &pin_list] {
|
return ecb->with_transaction_weak(
|
||||||
return ecb->with_transaction_intr(
|
"backref_get_mappings",
|
||||||
Transaction::src_t::READ,
|
|
||||||
"get_backref_mappings",
|
|
||||||
[this, start_paddr, end_paddr](auto &t) {
|
[this, start_paddr, end_paddr](auto &t) {
|
||||||
return backref_manager.get_mappings(
|
return backref_manager.get_mappings(
|
||||||
t, start_paddr, end_paddr
|
t, start_paddr, end_paddr);
|
||||||
);
|
|
||||||
}).safe_then([&pin_list](auto&& list) {
|
|
||||||
pin_list = std::move(list);
|
|
||||||
});
|
|
||||||
}).safe_then([&pin_list] {
|
|
||||||
return seastar::make_ready_future<backref_pin_list_t>(std::move(pin_list));
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user