- under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
#define DEFAULT_DATA_HASH_TABLE_SIZE (2047ULL*16ULL)
#define DEFAULT_FIELD_HASH_TABLE_SIZE (2047ULL*16ULL)
#define DEFAULT_DATA_HASH_TABLE_SIZE (2047ULL*16ULL)
#define DEFAULT_FIELD_HASH_TABLE_SIZE (2047ULL*16ULL)
static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size) {
uint64_t old_size, new_size;
static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size) {
uint64_t old_size, new_size;
/* Note that the glibc fallocate() fallback is very
inefficient, hence we try to minimize the allocation area
as we can. */
/* Note that the glibc fallocate() fallback is very
inefficient, hence we try to minimize the allocation area
as we can. */
else {
r = journal_file_move_to_object(f, -1, p, &tail);
if (r < 0)
else {
r = journal_file_move_to_object(f, -1, p, &tail);
if (r < 0)
uint64_t p) {
int r;
uint64_t n = 0, ap = 0, q, i, a, hidx;
uint64_t p) {
int r;
uint64_t n = 0, ap = 0, q, i, a, hidx;
i = htole64(le64toh(*idx) - 1);
r = link_entry_into_array(f, first, &i, p);
i = htole64(le64toh(*idx) - 1);
r = link_entry_into_array(f, first, &i, p);
(unsigned long) le64toh(f->header->n_objects),
(unsigned long) le64toh(f->header->n_entries));
(unsigned long) le64toh(f->header->n_objects),
(unsigned long) le64toh(f->header->n_entries));
while (p != 0) {
r = journal_file_move_to_object(f, -1, p, &o);
if (r < 0)
while (p != 0) {
r = journal_file_move_to_object(f, -1, p, &o);
if (r < 0)