From e40679c00db4c23d68cf883df5f2cead6ece617b Mon Sep 17 00:00:00 2001 From: Igor Fedotov Date: Tue, 23 Nov 2021 04:42:28 +0300 Subject: [PATCH] os/bluestore: clear omap flags within _do_omap_clear() Signed-off-by: Igor Fedotov --- src/os/bluestore/BlueStore.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index db213f5640f..dbecf48b7ab 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -16044,6 +16044,7 @@ void BlueStore::_do_omap_clear(TransContext *txc, OnodeRef& o) o->get_omap_tail(&tail); txc->t->rm_range_keys(omap_prefix, prefix, tail); txc->t->rmkey(omap_prefix, tail); + o->onode.clear_omap_flag(); dout(20) << __func__ << " remove range start: " << pretty_binary_string(prefix) << " end: " << pretty_binary_string(tail) << dendl; @@ -16060,7 +16061,6 @@ int BlueStore::_omap_clear(TransContext *txc, if (o->onode.has_omap()) { o->flush(); _do_omap_clear(txc, o); - o->onode.clear_omap_flag(); txc->write_onode(o); } logger->tinc(l_bluestore_omap_clear_lat, mono_clock::now() - t0); @@ -16276,7 +16276,6 @@ int BlueStore::_clone(TransContext *txc, dout(20) << __func__ << " clearing old omap data" << dendl; newo->flush(); _do_omap_clear(txc, newo); - newo->onode.clear_omap_flag(); } if (oldo->onode.has_omap()) { dout(20) << __func__ << " copying omap data" << dendl; -- 2.47.3