Skip to content

Commit

Permalink
denc: add with_dencv to denc_traits
Browse files Browse the repository at this point in the history
the "v" in dencv is like the "v" in readv(2), so the decode() will not
try to copy the bufferlist for a continous one if the bufferlist is
segmented *and* its length is greater than a CEPH_PAGE_SIZE (4K).

copying a memory chunk could be expensive if the decoded bufferlist is
huge, so we should try to avoid this. this could happen when we read the
buffer from bluestore.

and drop the partial specialization for denc() which tries to differentiate
traits::featured and !traits::featured, it does not matter to
decode() if the type supports feature or not. the encode() does.

Signed-off-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
tchaikov committed May 23, 2017
1 parent 61e3627 commit 681afb7
Show file tree
Hide file tree
Showing 6 changed files with 279 additions and 15 deletions.

0 comments on commit 681afb7

Please sign in to comment.