HomeClusterLabs Projects
Diffusion LibQB fad9ce01a036

ringbuffer: fix size in qb_rb_create_from_file()

Description

ringbuffer: fix size in qb_rb_create_from_file()

qb_rb_open() expects the size field to represent the maximum chunk size.
It adds QB_RB_CHUNK_MARGIN + 1 and rounds up to the page size to
determine the ringbuffer's total size. When creating a ringbuffer from a
file we must compensate by subtracting this amount from the file's size.

Details

Provenance
Michael Chapman <mike@very.puzzling.org>Authored on Jun 5 2014, 12:33 AM
Parents
rQedd2eec16c46: ringbuffer: fix qb_rb_open_2() debug format string
Branches
Unknown
Tags
Unknown

Event Timeline