{
RWLock::RLocker l(c->lock);
bool r = o->onode.has_omap() && it && it->valid() &&
- it->raw_key().second <= tail;
+ it->raw_key().second < tail;
if (it && it->valid()) {
ldout(c->store->cct,20) << __func__ << " is at "
<< pretty_binary_string(it->raw_key().second)
get_omap_header(id, &prefix);
get_omap_tail(id, &tail);
txc->t->rm_range_keys(omap_prefix, prefix, tail);
+ txc->t->rmkey(omap_prefix, tail);
dout(20) << __func__ << " remove range start: "
<< pretty_binary_string(prefix) << " end: "
<< pretty_binary_string(tail) << dendl;
o->onode.flags |= bluestore_onode_t::FLAG_PGMETA_OMAP;
}
txc->write_onode(o);
+
+ const string& prefix =
+ o->onode.is_pgmeta_omap() ? PREFIX_PGMETA_OMAP : PREFIX_OMAP;
+ string key_tail;
+ bufferlist tail;
+ get_omap_tail(o->onode.nid, &key_tail);
+ txc->t->set(prefix, key_tail, tail);
} else {
txc->note_modified_object(o);
}
o->onode.flags |= bluestore_onode_t::FLAG_PGMETA_OMAP;
}
txc->write_onode(o);
+
+ const string& prefix =
+ o->onode.is_pgmeta_omap() ? PREFIX_PGMETA_OMAP : PREFIX_OMAP;
+ string key_tail;
+ bufferlist tail;
+ get_omap_tail(o->onode.nid, &key_tail);
+ txc->t->set(prefix, key_tail, tail);
} else {
txc->note_modified_object(o);
}
newo->onode.is_pgmeta_omap() ? PREFIX_PGMETA_OMAP
: PREFIX_OMAP,
newo->onode.nid);
+ newo->onode.clear_omap_flag();
}
if (oldo->onode.has_omap()) {
dout(20) << __func__ << " copying omap data" << dendl;
- if (!newo->onode.has_omap()) {
- newo->onode.set_omap_flag();
- if (newo->oid.is_pgmeta()) {
- newo->onode.flags |= bluestore_onode_t::FLAG_PGMETA_OMAP;
- }
+ newo->onode.set_omap_flag();
+ if (newo->oid.is_pgmeta()) {
+ newo->onode.flags |= bluestore_onode_t::FLAG_PGMETA_OMAP;
}
const string& prefix =
newo->onode.is_pgmeta_omap() ? PREFIX_PGMETA_OMAP : PREFIX_OMAP;
}
it->next();
}
- } else {
- newo->onode.clear_omap_flag();
+ string new_tail;
+ bufferlist new_tail_value;
+ get_omap_tail(newo->onode.nid, &new_tail);
+ txc->t->set(prefix, new_tail, new_tail_value);
}
txc->write_onode(newo);