int op = t.get_op();
switch (op) {
+ case Transaction::OP_TOUCH:
+ {
+ coll_t cid;
+ t.get_cid(cid);
+ pobject_t oid;
+ t.get_oid(oid);
+ if (_touch(oid) < 0) {
+ dout(7) << "apply_transaction fail on _touch" << dendl;
+ r &= bit;
+ }
+ }
+ break;
+
case Transaction::OP_WRITE:
{
coll_t cid;
return r;
}
+int Ebofs::_touch(pobject_t oid)
+{
+ dout(7) << "_touch " << oid << dendl;
+
+ // get|create inode
+ Onode *on = get_onode(oid);
+ if (!on) {
+ on = new_onode(oid); // new inode!
+ dirty_onode(on);
+ }
+ put_onode(on);
+ return 0;
+}
int Ebofs::_write(pobject_t oid, __u64 offset, size_t length, const bufferlist& bl)
int _get_object_collections(pobject_t oid, set<coll_t>& ls);
bool _write_will_block();
+ int _touch(pobject_t oid);
int _write(pobject_t oid, __u64 off, size_t len, const bufferlist& bl);
void _trim_from_cache(pobject_t oid, __u64 off, size_t len);
int _truncate(pobject_t oid, __u64 size);