mirror of
https://github.com/systemd/systemd
synced 2026-04-10 17:15:03 +02:00
Compare commits
No commits in common. "58f62d7079a3d77b859a25d585dd492531bda0a1" and "05c1b1c95edb3b2d051b5b60e5a0519e23b221ab" have entirely different histories.
58f62d7079
...
05c1b1c95e
7
NEWS
7
NEWS
@ -335,15 +335,14 @@ 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 new default .network files:
|
||||
* systemd-networkd now ships with another 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. The Kind= setting in .netdev file accepts "ipoib". And
|
||||
systemd.netdev files gained the [IPoIB] section.
|
||||
interfaces.
|
||||
|
||||
* systemd-networkd's handling of Endpoint= resolution for WireGuard
|
||||
interfaces has been improved.
|
||||
@ -354,7 +353,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 in .netdev files.
|
||||
by using MACAddress=none.
|
||||
|
||||
* .link files gained a new WakeOnLanPassword= setting in the [Link]
|
||||
section that allows to specify a WoL "SecureOn" password on hardware
|
||||
|
||||
@ -15,9 +15,6 @@
|
||||
#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;
|
||||
@ -69,9 +66,6 @@ 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);
|
||||
|
||||
@ -79,9 +73,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[PAYLOAD_BUFFER_SIZE / sizeof(HashItem)];
|
||||
HashItem items[4096 / sizeof(HashItem)];
|
||||
uint64_t p, sz;
|
||||
ssize_t n;
|
||||
size_t to_read;
|
||||
int r;
|
||||
|
||||
r = journald_file_entry_array_punch_hole(
|
||||
@ -91,13 +85,16 @@ 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 += n) {
|
||||
n = pread(f->fd, items, MIN(sizeof(items), p + sz - i), i);
|
||||
if (n < 0)
|
||||
return n;
|
||||
for (uint64_t i = p; i < p + sz; i += sizeof(items)) {
|
||||
ssize_t n_read;
|
||||
|
||||
for (size_t j = 0; j < (size_t) n / sizeof(HashItem); j++) {
|
||||
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++) {
|
||||
Object o;
|
||||
|
||||
for (uint64_t q = le64toh(items[j].head_hash_offset); q != 0;
|
||||
|
||||
@ -854,8 +854,9 @@ static bool route_by_kernel(const Route *route) {
|
||||
if (route->protocol == RTPROT_KERNEL)
|
||||
return true;
|
||||
|
||||
/* The kernels older than a826b04303a40d52439aa141035fca5654ccaccd (v5.11) create the IPv6
|
||||
* multicast with RTPROT_BOOT. Do not touch it. */
|
||||
/* 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. */
|
||||
if (route->protocol == RTPROT_BOOT &&
|
||||
route->family == AF_INET6 &&
|
||||
route->dst_prefixlen == 8 &&
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user