-void Ebofs::apply_write(Onode *on, off_t off, size_t len, bufferlist& bl)
+void Ebofs::apply_write(Onode *on, off_t off, size_t len, const bufferlist& bl)
{
ObjectCache *oc = on->get_oc(&bc);
-int Ebofs::_write(object_t oid, off_t offset, size_t length, bufferlist& bl)
+int Ebofs::_write(object_t oid, off_t offset, size_t length, const bufferlist& bl)
{
dout(7) << "_write " << oid << " " << offset << "~" << length << endl;
assert(bl.length() == length);
int Ebofs::write(object_t oid,
off_t off, size_t len,
- bufferlist& bl, Context *onsafe)
+ const bufferlist& bl, Context *onsafe)
{
ebofs_lock.Lock();
assert(len > 0);
if (journal) {
Transaction t;
t.write(oid, off, len, bl);
- bufferlist bl;
- t._encode(bl);
- if (journal->submit_entry(bl, onsafe)) break;
+ bufferlist tbl;
+ t._encode(tbl);
+ if (journal->submit_entry(tbl, onsafe)) break;
}
if (onsafe) commit_waiters[super_epoch].push_back(onsafe);
break;
block_t start, block_t len,
interval_set<block_t>& alloc,
block_t& old_bfirst, block_t& old_blast);
- void apply_write(Onode *on, off_t off, size_t len, bufferlist& bl);
+ void apply_write(Onode *on, off_t off, size_t len, const bufferlist& bl);
bool attempt_read(Onode *on, off_t off, size_t len, bufferlist& bl,
Cond *will_wait_on, bool *will_wait_on_bool);
int read(object_t, off_t off, size_t len, bufferlist& bl);
int is_cached(object_t oid, off_t off, size_t len);
- int write(object_t oid, off_t off, size_t len, bufferlist& bl, Context *onsafe);
+ int write(object_t oid, off_t off, size_t len, const bufferlist& bl, Context *onsafe);
void trim_from_cache(object_t oid, off_t off, size_t len);
int truncate(object_t oid, off_t size, Context *onsafe=0);
int truncate_front(object_t oid, off_t size, Context *onsafe=0);
int _getattrs(object_t oid, map<string,bufferptr> &aset);
bool _write_will_block();
- int _write(object_t oid, off_t off, size_t len, bufferlist& bl);
+ int _write(object_t oid, off_t off, size_t len, const bufferlist& bl);
void _trim_from_cache(object_t oid, off_t off, size_t len);
int _truncate(object_t oid, off_t size);
int _truncate_front(object_t oid, off_t size);