From: Sage Weil Date: Mon, 5 Aug 2019 17:52:56 +0000 (-0500) Subject: os/bluestore: do not set both PGMETA_OMAP and PERPOOL_OMAP X-Git-Tag: v15.1.0~1915^2~5 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=9bbe8d04c79f7094ea71b195ffca7898805f923c;p=ceph-ci.git os/bluestore: do not set both PGMETA_OMAP and PERPOOL_OMAP Signed-off-by: Sage Weil --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index fc7640ad5c8..97fed8c7f90 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -13306,9 +13306,10 @@ int BlueStore::_omap_setkeys(TransContext *txc, auto p = bl.cbegin(); __u32 num; if (!o->onode.has_omap()) { - o->onode.set_omap_flags(); if (o->oid.is_pgmeta()) { - o->onode.flags |= bluestore_onode_t::FLAG_PGMETA_OMAP; + o->onode.set_omap_flags_pgmeta(); + } else { + o->onode.set_omap_flags(); } txc->write_onode(o); @@ -13350,9 +13351,10 @@ int BlueStore::_omap_setheader(TransContext *txc, int r; string key; if (!o->onode.has_omap()) { - o->onode.set_omap_flags(); if (o->oid.is_pgmeta()) { - o->onode.flags |= bluestore_onode_t::FLAG_PGMETA_OMAP; + o->onode.set_omap_flags_pgmeta(); + } else { + o->onode.set_omap_flags(); } txc->write_onode(o); @@ -13505,9 +13507,10 @@ int BlueStore::_clone(TransContext *txc, } if (oldo->onode.has_omap()) { dout(20) << __func__ << " copying omap data" << dendl; - newo->onode.set_omap_flags(); if (newo->oid.is_pgmeta()) { - newo->onode.flags |= bluestore_onode_t::FLAG_PGMETA_OMAP; + newo->onode.set_omap_flags_pgmeta(); + } else { + newo->onode.set_omap_flags(); } const string& prefix = newo->get_omap_prefix(); KeyValueDB::Iterator it = db->get_iterator(prefix); diff --git a/src/os/bluestore/bluestore_types.h b/src/os/bluestore/bluestore_types.h index 9db13c3ff45..aff9e07df20 100644 --- a/src/os/bluestore/bluestore_types.h +++ b/src/os/bluestore/bluestore_types.h @@ -955,6 +955,9 @@ struct bluestore_onode_t { void set_omap_flags() { set_flag(FLAG_OMAP | FLAG_PERPOOL_OMAP); } + void set_omap_flags_pgmeta() { + set_flag(FLAG_OMAP | FLAG_PGMETA_OMAP); + } void clear_omap_flag() { clear_flag(FLAG_OMAP);