mirror of
https://github.com/systemd/systemd.git
synced 2025-08-15 01:49:58 +03:00
journal: Use 16kb buffer during hole punching
Let's use the same buffer size as used in as copy.h.
This commit is contained in:
@ -15,6 +15,7 @@
|
||||
#include "stat-util.h"
|
||||
#include "sync-util.h"
|
||||
|
||||
#define PAYLOAD_BUFFER_SIZE (16U * 1024U)
|
||||
#define MINIMUM_HOLE_SIZE (1U * 1024U * 1024U / 2U)
|
||||
|
||||
static int journald_file_truncate(JournalFile *f) {
|
||||
@ -78,7 +79,7 @@ static int journald_file_entry_array_punch_hole(JournalFile *f, uint64_t p, uint
|
||||
}
|
||||
|
||||
static int journald_file_punch_holes(JournalFile *f) {
|
||||
HashItem items[4096 / sizeof(HashItem)];
|
||||
HashItem items[PAYLOAD_BUFFER_SIZE / sizeof(HashItem)];
|
||||
uint64_t p, sz;
|
||||
size_t to_read;
|
||||
ssize_t n;
|
||||
|
Reference in New Issue
Block a user