chiark / gitweb /
journal: when increasing window, make sure to use the increased window
authorLennart Poettering <lennart@poettering.net>
Wed, 4 Jan 2012 01:21:04 +0000 (02:21 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 4 Jan 2012 01:21:04 +0000 (02:21 +0100)
src/journal/journal-file.c

index 977cfa1..95a5aaf 100644 (file)
@@ -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;