]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/ECTransaction: set SEQUENTIAL_WRITE | APPEND_ONLY on ec appends
authorSage Weil <sage@redhat.com>
Thu, 8 Oct 2015 19:35:21 +0000 (15:35 -0400)
committerSage Weil <sage@redhat.com>
Sat, 14 May 2016 13:20:00 +0000 (09:20 -0400)
EC objects are written sequentially and not modified.

Note: we could probably hint about write sizes here,
too...

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/ECTransaction.cc

index 7661ddcd8b9c24b0143c481b1b7f691b9772ac00..37a742cb473b50e0067861d3d84841a1638d0dec 100644 (file)
@@ -162,6 +162,12 @@ struct TransGenerator : public boost::static_visitor<void> {
         ++i) {
       assert(buffers.count(i->first));
       bufferlist &enc_bl = buffers[i->first];
+      i->second.set_alloc_hint(
+       get_coll_ct(i->first, op.oid),
+       ghobject_t(op.oid, ghobject_t::NO_GEN, i->first),
+       0, 0,
+       CEPH_OSD_ALLOC_HINT_FLAG_SEQUENTIAL_WRITE |
+       CEPH_OSD_ALLOC_HINT_FLAG_APPEND_ONLY);
       i->second.write(
        get_coll_ct(i->first, op.oid),
        ghobject_t(op.oid, ghobject_t::NO_GEN, i->first),