]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common: add bufferlist::rebuild_aligned_size_and_memory
authorLoic Dachary <ldachary@redhat.com>
Mon, 1 Dec 2014 23:59:08 +0000 (00:59 +0100)
committerLoic Dachary <ldachary@redhat.com>
Tue, 2 Dec 2014 20:15:21 +0000 (21:15 +0100)
commit9ade88e8dacc9b96c042bb668f4452447139a544
tree176dbcfcd318a0ba495893b05326e5dbe3ab3e63
parentf868ca04d2ee57b214837d824653e3a2d56e23da
common: add bufferlist::rebuild_aligned_size_and_memory

The function bufferlist::rebuild_aligned checks memory and size
alignment with the same variable. It is however useful to separate
memory alignment constraints from size alignment constraints. For
instance rebuild_aligned could be called to allocate an erasure coded
buffer where each 2048 bytes chunk needs to start on a memory address
aligned on 32 bytes.

Signed-off-by: Loic Dachary <loic@dachary.org>
src/common/buffer.cc
src/include/buffer.h
src/test/bufferlist.cc