From: Sage Weil Date: Thu, 8 Oct 2015 19:35:21 +0000 (-0400) Subject: osd/ECTransaction: set SEQUENTIAL_WRITE | APPEND_ONLY on ec appends X-Git-Tag: v11.0.0~466^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0128adaa8558beecaa0c1bd08646a0578c900e5e;p=ceph.git osd/ECTransaction: set SEQUENTIAL_WRITE | APPEND_ONLY on ec appends EC objects are written sequentially and not modified. Note: we could probably hint about write sizes here, too... Signed-off-by: Sage Weil --- diff --git a/src/osd/ECTransaction.cc b/src/osd/ECTransaction.cc index 7661ddcd8b9c..37a742cb473b 100644 --- a/src/osd/ECTransaction.cc +++ b/src/osd/ECTransaction.cc @@ -162,6 +162,12 @@ struct TransGenerator : public boost::static_visitor { ++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),