lib_log: make padding verbose

This commit is contained in:
Thomas Schoebel-Theuer 2020-04-28 09:58:06 +02:00 committed by Thomas Schoebel-Theuer
parent e416e99b4c
commit 84f44fa106
2 changed files with 5 additions and 1 deletions

View File

@ -412,7 +412,7 @@ bool log_finalize(struct log_status *logst, int len, void (*endio)(void *private
padded_len = len;
if (logst->do_compress) {
int new_len = log_compress(logst, len, &check_flags);
int padded_new_len = ((new_len + 7) / 8) * 8;
int padded_new_len = ((new_len + (_LOG_PAD-1)) / _LOG_PAD) * _LOG_PAD;
if (new_len > 0 && padded_new_len < len) {
/* exchange the lengths */

View File

@ -100,6 +100,10 @@ struct log_header_v1 {
#define OVERHEAD (START_OVERHEAD + END_OVERHEAD)
/* alignment of log positions to 64bit */
#define _LOG_PAD_BITS 3
#define _LOG_PAD (1 << _LOG_PAD_BITS)
// TODO: make this bytesex-aware.
#define DATA_PUT(data,offset,val) \
do { \