diff options
author | Greg Farnum <gfarnum@redhat.com> | 2016-01-13 03:37:24 +0100 |
---|---|---|
committer | Greg Farnum <gfarnum@redhat.com> | 2016-01-14 19:25:35 +0100 |
commit | bf9790e1c5433e6c0ffd26a113b2db32f242205e (patch) | |
tree | 388bc40f624045552690ac7dcadb62cb6811c3a8 /src/client | |
parent | Merge remote-tracking branch 'origin/wip-libcephfs-acl' into greg-fs-testing (diff) | |
parent | client: add scattered write callback to ObjecterWriteback (diff) | |
download | ceph-bf9790e1c5433e6c0ffd26a113b2db32f242205e.tar.xz ceph-bf9790e1c5433e6c0ffd26a113b2db32f242205e.zip |
Merge branch 'wip-13127-master' into greg-fs-testing
https://github.com/ceph/ceph/pull/5990
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Diffstat (limited to 'src/client')
-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; |