dout(0) << "do_touch " << entry->m_coll << "/" << obj << dendl;
- _do_touch(entry->m_coll, *obj);
+ _do_touch(entry, *obj);
return true;
}
dout(0) << "do_remove " << entry->m_coll << "/" << obj << dendl;
- _do_remove(entry->m_coll, *obj);
+ _do_remove(entry, *obj);
hobject_t *rmobj = entry->remove_obj(obj_id);
ceph_assert(rmobj);
delete rmobj;
gen_attrs(gen, &out);
dout(0) << "do_set_attrs " << out.size() << " entries" << dendl;
- _do_set_attrs(entry->m_coll, *obj, out);
+ _do_set_attrs(entry, *obj, out);
return true;
}
dout(0) << "do_write " << entry->m_coll << "/" << obj
<< " 0~" << size << dendl;
- _do_write(entry->m_coll, *obj, 0, bl.length(), bl);
+ _do_write(entry, *obj, 0, bl.length(), bl);
return true;
}
dout(0) << "do_clone " << entry->m_coll << "/" << orig_obj
<< " => " << entry->m_coll << "/" << new_obj << dendl;
- _do_clone(entry->m_coll, orig_obj, new_obj);
+ _do_clone(entry, orig_obj, new_obj);
return true;
}
<< " (0~" << size << ")"
<< " => " << entry->m_coll << "/" << new_obj
<< " (0)" << dendl;
- _do_write_and_clone_range(entry->m_coll, orig_obj, new_obj, 0, size, 0, bl);
+ _do_write_and_clone_range(entry, orig_obj, new_obj, 0, size, 0, bl);
return true;
}
<< " => " << entry->m_coll << "/" << new_obj << dendl;
entry->remove_obj(orig_id);
- _do_coll_move(entry->m_coll, orig_obj, new_obj);
+ _do_coll_move(entry, orig_obj, new_obj);
return true;
}
m_collections.insert(make_pair(i, entry));
m_collections_ids.push_back(i);
- _do_coll_create(entry->m_coll, 10, 10);
+ _do_coll_create(entry, 10, 10);
return true;
}
-void DeterministicOpSequence::_do_coll_create(coll_t cid, uint32_t pg_num, uint64_t num_objs)
+void DeterministicOpSequence::_do_coll_create(coll_entry_t *entry, uint32_t pg_num, uint64_t num_objs)
{
ObjectStore::Transaction t;
note_txn(&t);
- t.create_collection(cid, 32);
+ t.create_collection(entry->m_coll, 32);
bufferlist hint;
encode(pg_num, hint);
encode(num_objs, hint);
- t.collection_hint(cid, ObjectStore::Transaction::COLL_HINT_EXPECTED_NUM_OBJECTS, hint);
- dout(0) << "Give collection: " << cid << " a hint, pg_num is: " << pg_num << ", num_objs is: "
- << num_objs << dendl;
+ t.collection_hint(entry->m_coll, ObjectStore::Transaction::COLL_HINT_EXPECTED_NUM_OBJECTS, hint);
+ dout(0) << "Give collection: " << entry->m_coll
+ << " a hint, pg_num is: " << pg_num << ", num_objs is: "
+ << num_objs << dendl;
m_store->apply_transaction(&m_osr, std::move(t));
}
-void DeterministicOpSequence::_do_touch(coll_t coll, hobject_t& obj)
+void DeterministicOpSequence::_do_touch(coll_entry_t *entry, hobject_t& obj)
{
ObjectStore::Transaction t;
note_txn(&t);
- t.touch(coll, ghobject_t(obj));
+ t.touch(entry->m_coll, ghobject_t(obj));
m_store->apply_transaction(&m_osr, std::move(t));
}
-void DeterministicOpSequence::_do_remove(coll_t coll, hobject_t& obj)
+void DeterministicOpSequence::_do_remove(coll_entry_t *entry, hobject_t& obj)
{
ObjectStore::Transaction t;
note_txn(&t);
- t.remove(coll, ghobject_t(obj));
+ t.remove(entry->m_coll, ghobject_t(obj));
m_store->apply_transaction(&m_osr, std::move(t));
}
-void DeterministicOpSequence::_do_set_attrs(coll_t coll,
+void DeterministicOpSequence::_do_set_attrs(coll_entry_t *entry,
hobject_t &obj,
const map<string, bufferlist> &attrs)
{
ObjectStore::Transaction t;
note_txn(&t);
- t.omap_setkeys(coll, ghobject_t(obj), attrs);
+ t.omap_setkeys(entry->m_coll, ghobject_t(obj), attrs);
m_store->apply_transaction(&m_osr, std::move(t));
}
-void DeterministicOpSequence::_do_write(coll_t coll, hobject_t& obj,
+void DeterministicOpSequence::_do_write(coll_entry_t *entry, hobject_t& obj,
uint64_t off, uint64_t len, const bufferlist& data)
{
ObjectStore::Transaction t;
note_txn(&t);
- t.write(coll, ghobject_t(obj), off, len, data);
+ t.write(entry->m_coll, ghobject_t(obj), off, len, data);
m_store->apply_transaction(&m_osr, std::move(t));
}
-void DeterministicOpSequence::_do_clone(coll_t coll, hobject_t& orig_obj,
+void DeterministicOpSequence::_do_clone(coll_entry_t *entry, hobject_t& orig_obj,
hobject_t& new_obj)
{
ObjectStore::Transaction t;
note_txn(&t);
- t.clone(coll, ghobject_t(orig_obj), ghobject_t(new_obj));
+ t.clone(entry->m_coll, ghobject_t(orig_obj), ghobject_t(new_obj));
m_store->apply_transaction(&m_osr, std::move(t));
}
-void DeterministicOpSequence::_do_clone_range(coll_t coll,
+void DeterministicOpSequence::_do_clone_range(coll_entry_t *entry,
hobject_t& orig_obj, hobject_t& new_obj, uint64_t srcoff,
uint64_t srclen, uint64_t dstoff)
{
ObjectStore::Transaction t;
note_txn(&t);
- t.clone_range(coll, ghobject_t(orig_obj), ghobject_t(new_obj),
+ t.clone_range(entry->m_coll, ghobject_t(orig_obj), ghobject_t(new_obj),
srcoff, srclen, dstoff);
m_store->apply_transaction(&m_osr, std::move(t));
}
-void DeterministicOpSequence::_do_write_and_clone_range(coll_t coll,
+void DeterministicOpSequence::_do_write_and_clone_range(coll_entry_t *entry,
hobject_t& orig_obj,
hobject_t& new_obj,
uint64_t srcoff,
{
ObjectStore::Transaction t;
note_txn(&t);
- t.write(coll, ghobject_t(orig_obj), srcoff, bl.length(), bl);
- t.clone_range(coll, ghobject_t(orig_obj), ghobject_t(new_obj),
+ t.write(entry->m_coll, ghobject_t(orig_obj), srcoff, bl.length(), bl);
+ t.clone_range(entry->m_coll, ghobject_t(orig_obj), ghobject_t(new_obj),
srcoff, srclen, dstoff);
m_store->apply_transaction(&m_osr, std::move(t));
}
-void DeterministicOpSequence::_do_coll_move(coll_t coll,
+void DeterministicOpSequence::_do_coll_move(coll_entry_t *entry,
hobject_t& orig_obj,
hobject_t& new_obj)
{
ObjectStore::Transaction t;
note_txn(&t);
- t.remove(coll, ghobject_t(new_obj));
- t.collection_move_rename(coll, ghobject_t(orig_obj),
- coll, ghobject_t(new_obj));
+ t.remove(entry->m_coll, ghobject_t(new_obj));
+ t.collection_move_rename(entry->m_coll, ghobject_t(orig_obj),
+ entry->m_coll, ghobject_t(new_obj));
m_store->apply_transaction(&m_osr, std::move(t));
}
bool do_set_attrs(rngen_t& gen);
bool do_coll_create(rngen_t& gen);
- virtual void _do_touch(coll_t coll, hobject_t& obj);
- virtual void _do_remove(coll_t coll, hobject_t& obj);
- virtual void _do_write(coll_t coll, hobject_t& obj, uint64_t off,
+ virtual void _do_touch(coll_entry_t *entry, hobject_t& obj);
+ virtual void _do_remove(coll_entry_t *entry, hobject_t& obj);
+ virtual void _do_write(coll_entry_t *entry, hobject_t& obj, uint64_t off,
uint64_t len, const bufferlist& data);
- virtual void _do_set_attrs(coll_t coll,
+ virtual void _do_set_attrs(coll_entry_t *entry,
hobject_t &obj,
const map<string, bufferlist> &attrs);
- virtual void _do_clone(coll_t coll, hobject_t& orig_obj, hobject_t& new_obj);
- virtual void _do_clone_range(coll_t coll, hobject_t& orig_obj,
+ virtual void _do_clone(coll_entry_t *entry, hobject_t& orig_obj, hobject_t& new_obj);
+ virtual void _do_clone_range(coll_entry_t *entry, hobject_t& orig_obj,
hobject_t& new_obj, uint64_t srcoff, uint64_t srclen, uint64_t dstoff);
- virtual void _do_write_and_clone_range(coll_t coll, hobject_t& orig_obj,
+ virtual void _do_write_and_clone_range(coll_entry_t *entry, hobject_t& orig_obj,
hobject_t& new_obj, uint64_t srcoff, uint64_t srclen,
uint64_t dstoff, bufferlist& bl);
- virtual void _do_coll_move(coll_t cid, hobject_t& orig_obj, hobject_t& new_obj);
- virtual void _do_coll_create(coll_t cid, uint32_t pg_num, uint64_t num_objs);
+ virtual void _do_coll_move(coll_entry_t *entry, hobject_t& orig_obj, hobject_t& new_obj);
+ virtual void _do_coll_create(coll_entry_t *entry, uint32_t pg_num, uint64_t num_objs);
int _gen_coll_id(rngen_t& gen);
int _gen_obj_id(rngen_t& gen);