From 0860e62b688c6e2be4495800934760bc849af0fa Mon Sep 17 00:00:00 2001 From: Jianjian Huo Date: Mon, 4 Apr 2016 15:07:01 -0700 Subject: [PATCH] os/bluestore/BlueStore: cleanup overlay using single delete Overlay entries are also only written once, eligible to use single delete. Signed-off-by: Jianjian Huo --- src/os/bluestore/BlueStore.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 08b0d7799e5..2c5c8c2f4b6 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -3987,7 +3987,7 @@ void BlueStore::_kv_sync_thread() ++q) { string key; get_overlay_key(p->nid, *q, &key); - t->rmkey(PREFIX_OVERLAY, key); + t->rm_single_key(PREFIX_OVERLAY, key); } } // cleanup the wal @@ -4726,7 +4726,7 @@ int BlueStore::_do_overlay_trim(TransContext *txc, if (o->onode.put_overlay_ref(p->second.key)) { string key; get_overlay_key(o->onode.nid, p->second.key, &key); - txc->t->rmkey(PREFIX_OVERLAY, key); + txc->t->rm_single_key(PREFIX_OVERLAY, key); } o->onode.overlay_map.erase(p++); ++changed; @@ -4826,7 +4826,7 @@ int BlueStore::_do_write_overlays(TransContext *txc, if (o->onode.put_overlay_ref(p->second.key)) { string key; get_overlay_key(o->onode.nid, p->second.key, &key); - txc->t->rmkey(PREFIX_OVERLAY, key); + txc->t->rm_single_key(PREFIX_OVERLAY, key); } o->onode.overlay_map.erase(p++); continue; @@ -4844,7 +4844,7 @@ int BlueStore::_do_write_overlays(TransContext *txc, if (o->onode.put_overlay_ref(p->second.key)) { string key; get_overlay_key(o->onode.nid, p->second.key, &key); - txc->t->rmkey(PREFIX_OVERLAY, key); + txc->t->rm_single_key(PREFIX_OVERLAY, key); } o->onode.overlay_map.erase(p++); continue; @@ -6013,7 +6013,7 @@ int BlueStore::_do_truncate( << op->second << dendl; string key; get_overlay_key(o->onode.nid, op->second.key, &key); - txc->t->rmkey(PREFIX_OVERLAY, key); + txc->t->rm_single_key(PREFIX_OVERLAY, key); } else { dout(20) << __func__ << " rm overlay " << op->first << " " << op->second << " (put ref)" << dendl; -- 2.39.5