diff options
Diffstat (limited to 'src/client/ObjecterWriteback.h')
-rw-r--r-- | src/client/ObjecterWriteback.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/client/ObjecterWriteback.h b/src/client/ObjecterWriteback.h index 5d0343f0c6d..8acd3f73620 100644 --- a/src/client/ObjecterWriteback.h +++ b/src/client/ObjecterWriteback.h @@ -42,6 +42,23 @@ class ObjecterWriteback : public WritebackHandler { m_finisher)); } + virtual bool can_scattered_write() { return true; } + virtual ceph_tid_t write(const object_t& oid, const object_locator_t& oloc, + vector<pair<uint64_t, bufferlist> >& io_vec, + const SnapContext& snapc, ceph::real_time mtime, + uint64_t trunc_size, __u32 trunc_seq, + Context *oncommit) { + ObjectOperation op; + for (vector<pair<uint64_t, bufferlist> >::iterator p = io_vec.begin(); + p != io_vec.end(); + ++p) + op.write(p->first, p->second, trunc_size, trunc_seq); + + return m_objecter->mutate(oid, oloc, op, snapc, mtime, 0, NULL, + new C_OnFinisher(new C_Lock(m_lock, oncommit), + m_finisher)); + } + private: Objecter *m_objecter; Finisher *m_finisher; |