From e3cd403737177ce20699f692da5ad3f35fedb1b8 Mon Sep 17 00:00:00 2001 From: chunmei-liu Date: Mon, 21 Jun 2021 14:52:54 -0700 Subject: [PATCH] crimson/seastore: fix reactor stalled and rbd_open failed omap manger use keys' reference, so the keys' string set should be kept alive during omap operation. use value capture instead of reference capture. otherwise, during omap operation, the keys contents will be changed and cause logger insert_iterator very long time to stall reactor. omap_get_value also failed, rbd_open failed. Signed-off-by: chunmei-liu --- src/crimson/os/seastore/seastore.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crimson/os/seastore/seastore.cc b/src/crimson/os/seastore/seastore.cc index 901e20128f51..f2d2783e3b4a 100644 --- a/src/crimson/os/seastore/seastore.cc +++ b/src/crimson/os/seastore/seastore.cc @@ -351,7 +351,7 @@ SeaStore::omap_get_values( return repeat_with_onode( c, oid, - [this, &keys](auto &t, auto &onode) { + [this, keys](auto &t, auto &onode) { omap_root_t omap_root = onode.get_layout().omap_root.get(); return _omap_get_values( t, -- 2.47.3