Apologies for the brain malfunction, please ignore ...


Hi Kern,

I have just been looking at $BACULA/src/filed/backup.c and note a
probable mismatch between the comment and the implementation:

   /**
    * Adjust for compression so that output buffer is
    *  12 bytes + 0.1% larger than input buffer plus 18 bytes.
    *  This gives a bit extra plus room for the sparse addr if any.
    *  Note, we adjust the read size to be smaller so that the
    *  same output buffer can be used without growing it.
    *
    * The zlib compression workset is initialized here to minimize
    *  the "per file" load. The jcr member is only set, if the init 
    *  was successful.
    */
   jcr->compress_buf_size = 
                jcr->buf_size + ((jcr->buf_size+999) / 1000) + 30;


I would have thought that the following would be more appropriate to
implementing the comment correctly:

   jcr->compress_buf_size = 
jcr->buf_size + ((jcr->buf_size + 1001) / 1000) + 30;
                                  ^^^^

What one might call a boundary case that won't fail often, but may be
hard to track down if it does ...

Regards,

Howard


-- 
Howard Thomson <[email protected]>



------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to