]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common: add bufferlist::rebuild_aligned_size_and_memory 3083/head
authorLoic Dachary <ldachary@redhat.com>
Mon, 1 Dec 2014 23:59:08 +0000 (00:59 +0100)
committerLoic Dachary <ldachary@redhat.com>
Thu, 4 Dec 2014 18:05:22 +0000 (19:05 +0100)
commitad04a677cefc1f0a02fbff0c68409fda6874fdc7
tree62763ed3896cf31ac4cb19c22d4df3b1bf65db66
parentcc469b238f42ce989d0efa49154b95612e3d4111
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>
(cherry picked from commit 9ade88e8dacc9b96c042bb668f4452447139a544)
src/common/buffer.cc
src/include/buffer.h
src/test/bufferlist.cc