Buffer alignment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andreas,

In Ceph, buffers can be aligned if required using buffer::create_page_aligned

https://github.com/ceph/ceph/blob/master/src/common/buffer.cc#L519
https://github.com/ceph/ceph/blob/master/src/common/buffer.cc#L230

and although the Jerasure plugin has alignment requirements

https://github.com/ceph/ceph/blob/master/src/osd/ErasureCodePluginJerasure/ErasureCodeJerasure.cc#L79

it did not occur to me that aligning the buffers used to stored the encoded 

https://github.com/ceph/ceph/blob/master/src/osd/ErasureCodePluginJerasure/ErasureCodeJerasure.cc#L87

result would be needed. For decoding the caller is responsible for allocating the buffers. For encoding it also is, except for the padding. 

Do you think the API should recommend something regarding alignment ? 

https://github.com/ceph/ceph/blob/master/src/osd/ErasureCodeInterface.h#L20

Cheers

-- 
Loïc Dachary, Artisan Logiciel Libre

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux