mirror of
https://github.com/systemd/systemd
synced 2026-04-10 17:15:03 +02:00
Compare commits
7 Commits
05c1b1c95e
...
58f62d7079
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58f62d7079 | ||
|
|
2b3a8e2830 | ||
|
|
24040269ee | ||
|
|
d951ac5578 | ||
|
|
cdbba44878 | ||
|
|
a2799cc556 | ||
|
|
bd47f33f16 |
7
NEWS
7
NEWS
@ -335,14 +335,15 @@ CHANGES WITH 250 in spe:
|
||||
UseMTU= setting that may be used to control whether to apply the
|
||||
announced MTU settings to the local interface.
|
||||
|
||||
* systemd-networkd now ships with another default .network files:
|
||||
* systemd-networkd now ships with new default .network files:
|
||||
80-container-vb.network which matches host-side network bridge device
|
||||
created by systemd-nspawn's --network-bridge or --network-zone
|
||||
switch, and 80-6rd-tunnel.network which matches automatically created
|
||||
sit tunnel with 6rd prefix when the DHCP 6RD option is received.
|
||||
|
||||
* systemd-networkd and systemd-udevd now support IP over InfiniBand
|
||||
interfaces.
|
||||
interfaces. The Kind= setting in .netdev file accepts "ipoib". And
|
||||
systemd.netdev files gained the [IPoIB] section.
|
||||
|
||||
* systemd-networkd's handling of Endpoint= resolution for WireGuard
|
||||
interfaces has been improved.
|
||||
@ -353,7 +354,7 @@ CHANGES WITH 250 in spe:
|
||||
|
||||
* systemd-networkd will now once again automatically generate persistent
|
||||
MAC addresses for batadv and bridge interfaces. Users can disable this
|
||||
by using MACAddress=none.
|
||||
by using MACAddress=none in .netdev files.
|
||||
|
||||
* .link files gained a new WakeOnLanPassword= setting in the [Link]
|
||||
section that allows to specify a WoL "SecureOn" password on hardware
|
||||
|
||||
@ -15,6 +15,9 @@
|
||||
#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) {
|
||||
uint64_t p;
|
||||
int r;
|
||||
@ -66,6 +69,9 @@ static int journald_file_entry_array_punch_hole(JournalFile *f, uint64_t p, uint
|
||||
(journal_file_entry_array_n_items(&o) - n_unused) * sizeof(le64_t);
|
||||
sz = p + le64toh(o.object.size) - offset;
|
||||
|
||||
if (sz < MINIMUM_HOLE_SIZE)
|
||||
return 0;
|
||||
|
||||
if (fallocate(f->fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, offset, sz) < 0)
|
||||
return log_debug_errno(errno, "Failed to punch hole in entry array of %s: %m", f->path);
|
||||
|
||||
@ -73,9 +79,9 @@ 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;
|
||||
int r;
|
||||
|
||||
r = journald_file_entry_array_punch_hole(
|
||||
@ -85,16 +91,13 @@ static int journald_file_punch_holes(JournalFile *f) {
|
||||
|
||||
p = le64toh(f->header->data_hash_table_offset);
|
||||
sz = le64toh(f->header->data_hash_table_size);
|
||||
to_read = MIN((size_t) f->last_stat.st_blksize, sizeof(items));
|
||||
|
||||
for (uint64_t i = p; i < p + sz; i += sizeof(items)) {
|
||||
ssize_t n_read;
|
||||
for (uint64_t i = p; i < p + sz; i += n) {
|
||||
n = pread(f->fd, items, MIN(sizeof(items), p + sz - i), i);
|
||||
if (n < 0)
|
||||
return n;
|
||||
|
||||
n_read = pread(f->fd, items, MIN(to_read, p + sz - i), i);
|
||||
if (n_read < 0)
|
||||
return n_read;
|
||||
|
||||
for (size_t j = 0; j < (size_t) n_read / sizeof(HashItem); j++) {
|
||||
for (size_t j = 0; j < (size_t) n / sizeof(HashItem); j++) {
|
||||
Object o;
|
||||
|
||||
for (uint64_t q = le64toh(items[j].head_hash_offset); q != 0;
|
||||
|
||||
@ -854,9 +854,8 @@ static bool route_by_kernel(const Route *route) {
|
||||
if (route->protocol == RTPROT_KERNEL)
|
||||
return true;
|
||||
|
||||
/* Do not touch multicast route added by kernel. See issue #6088.
|
||||
* TODO: Why the kernel adds this route with protocol RTPROT_BOOT?
|
||||
* https://tools.ietf.org/html/rfc4862#section-5.4 may explain why. */
|
||||
/* The kernels older than a826b04303a40d52439aa141035fca5654ccaccd (v5.11) create the IPv6
|
||||
* multicast with RTPROT_BOOT. Do not touch it. */
|
||||
if (route->protocol == RTPROT_BOOT &&
|
||||
route->family == AF_INET6 &&
|
||||
route->dst_prefixlen == 8 &&
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user