[rrd-developers] [PATCH,RFC] optional mmap based file I/O

Bernhard Fischer rep.dot.nop at gmail.com
Mon Jun 11 12:06:26 CEST 2007


Hi,

below is a bugfix for update.

We maintain our write- and read- position in the rrd_file_t struct. One
hunk of old code was in #ifndef HAVE_MMAP which caused our internal
rrd_file->pos not to be updated when we had to wrap the rra_ptr.

The attached patch fixes this. It also makes sure that we do not do
several superfluous write()s to areas that are already uptodate for the
mmap case (since there, we already operate on the underlying file
directly resp. the one copy the kernel holds for us. In this case, we do
not need to re-write the already uptodate data).

Tobi, please apply.

- fix maintaining our file-pos when we have to wrap the rra_ptr in
  update().
- no need to update the header-data a second time for the mmap case.

PS: The new pangoCairo renderer is disfunctional on RHEL5 due to Redhat
only shipping an older version of pango/cairo. Just a heads-up.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rrdtool-1.3.update-fix.01.diff
Type: text/x-diff
Size: 1231 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/rrd-developers/attachments/20070611/99f5573b/attachment.bin 


More information about the rrd-developers mailing list