[rrd-users] rrd resize error

Daniel De Marco ddm at bartol.udel.edu
Tue Jun 28 22:12:17 CEST 2011


* Daniel De Marco <ddm at bartol.udel.edu> [06/27/2011 23:09]:
> creates it with a header size of 548, that is not divisible by
> sizeof(rrd_value_t)=8. I don't know whether this is normal or not.

this seems to be normal. However the problem might be in the definition
of rrd_get_header_size in rrd_format.c . To calculate header size the
function includes the sizeof(time_t) that is no longer used in v3.
When rrd_open creates a new file it uses rrd_get_header_size to
determine its size. Then other functions fill it and the 4 extra bytes
remain unused at the end of the file. rrd_resize stumbles on those 4
extra bytes. On x86_64 the sizeof(time_t) is 8, so the extra space at
the end of the file is a multiple of sizeof(rrd_value_t) and rrd_resize
copies it without complaining. What do you think?

Daniel.



More information about the rrd-users mailing list