case Transaction::OP_SETALLOCHINT:
{
- uint64_t expected_object_size = op->expected_object_size;
- uint64_t expected_write_size = op->expected_write_size;
r = _setallochint(txc, c, o,
- expected_object_size,
- expected_write_size);
+ op->expected_object_size,
+ op->expected_write_size,
+ op->alloc_hint_flags);
}
break;
CollectionRef& c,
OnodeRef& o,
uint64_t expected_object_size,
- uint64_t expected_write_size)
+ uint64_t expected_write_size,
+ uint32_t flags)
{
dout(15) << __func__ << " " << c->cid << " " << o->oid
<< " object_size " << expected_object_size
<< " write_size " << expected_write_size
+ << " flags " << flags
<< dendl;
int r = 0;
o->onode.expected_object_size = expected_object_size;
o->onode.expected_write_size = expected_write_size;
+ o->onode.alloc_hint_flags = flags;
txc->write_onode(o);
dout(10) << __func__ << " " << c->cid << " " << o->oid
<< " object_size " << expected_object_size
<< " write_size " << expected_write_size
+ << " flags " << flags
<< " = " << r << dendl;
return r;
}
CollectionRef& c,
OnodeRef& o,
uint64_t expected_object_size,
- uint64_t expected_write_size);
+ uint64_t expected_write_size,
+ uint32_t flags);
int _clone(TransContext *txc,
CollectionRef& c,
OnodeRef& oldo,
::encode(omap_head, bl);
::encode(expected_object_size, bl);
::encode(expected_write_size, bl);
+ ::encode(alloc_hint_flags, bl);
ENCODE_FINISH(bl);
}
::decode(omap_head, p);
::decode(expected_object_size, p);
::decode(expected_write_size, p);
+ ::decode(alloc_hint_flags, p);
DECODE_FINISH(p);
}
f->dump_unsigned("omap_head", omap_head);
f->dump_unsigned("expected_object_size", expected_object_size);
f->dump_unsigned("expected_write_size", expected_write_size);
+ f->dump_unsigned("alloc_hint_flags", alloc_hint_flags);
}
void bluestore_onode_t::generate_test_instances(list<bluestore_onode_t*>& o)
uint32_t expected_object_size;
uint32_t expected_write_size;
+ uint32_t alloc_hint_flags;
bluestore_onode_t()
: nid(0),
last_overlay_key(0),
omap_head(0),
expected_object_size(0),
- expected_write_size(0) {}
+ expected_write_size(0),
+ alloc_hint_flags(0) {}
map<uint64_t,bluestore_extent_t>::iterator find_extent(uint64_t offset) {
map<uint64_t,bluestore_extent_t>::iterator fp = block_map.lower_bound(offset);