mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-25 23:21:33 +03:00
journal: when increasing window, make sure to use the increased window
This commit is contained in:
parent
4bbdcdb301
commit
a99c349d0d
@ -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);
|
delta = PAGE_ALIGN((DEFAULT_WINDOW_SIZE - size) / 2);
|
||||||
|
|
||||||
if (offset < delta)
|
if (delta > offset)
|
||||||
delta = offset;
|
delta = offset;
|
||||||
|
|
||||||
offset -= delta;
|
offset -= delta;
|
||||||
size += (DEFAULT_WINDOW_SIZE - delta);
|
size = DEFAULT_WINDOW_SIZE;
|
||||||
} else
|
} else
|
||||||
delta = 0;
|
delta = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user