From a99c349d0d54ca4946c6f81670ab9890f2b4f497 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 4 Jan 2012 02:21:04 +0100 Subject: [PATCH] journal: when increasing window, make sure to use the increased window --- src/journal/journal-file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index 977cfa10..95a5aafc 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -332,11 +332,11 @@ static int journal_file_move_to(JournalFile *f, int wt, uint64_t offset, uint64_ delta = PAGE_ALIGN((DEFAULT_WINDOW_SIZE - size) / 2); - if (offset < delta) + if (delta > offset) delta = offset; offset -= delta; - size += (DEFAULT_WINDOW_SIZE - delta); + size = DEFAULT_WINDOW_SIZE; } else delta = 0; -- 2.39.5