Update to 246-rc1

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2020-06-26 20:29:36 +02:00
parent 9d2435f184
commit 55abe5f0ba
4 changed files with 27 additions and 163 deletions

View File

@ -1,144 +0,0 @@
From 6f202edb2c2e340523c6c0f2c0a93690eaab7a68 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Tue, 18 Feb 2020 08:44:34 -0800
Subject: [PATCH] Revert "job: Don't mark as redundant if deps are relevant"
This reverts commit 097537f07a2fab3cb73aef7bc59f2a66aa93f533. It
causes https://bugzilla.redhat.com/show_bug.cgi?id=1803293 .
---
src/core/job.c | 51 ++++++------------------------------------
src/core/job.h | 3 +--
src/core/transaction.c | 8 +++----
3 files changed, 12 insertions(+), 50 deletions(-)
diff --git a/src/core/job.c b/src/core/job.c
index 5982404cf0..5048a5093e 100644
--- a/src/core/job.c
+++ b/src/core/job.c
@@ -383,62 +383,25 @@ JobType job_type_lookup_merge(JobType a, JobType b) {
return job_merging_table[(a - 1) * a / 2 + b];
}
-bool job_later_link_matters(Job *j, JobType type, unsigned generation) {
- JobDependency *l;
-
- assert(j);
-
- j->generation = generation;
-
- LIST_FOREACH(subject, l, j->subject_list) {
- UnitActiveState state = _UNIT_ACTIVE_STATE_INVALID;
-
- /* Have we seen this before? */
- if (l->object->generation == generation)
- continue;
-
- state = unit_active_state(l->object->unit);
- switch (type) {
-
- case JOB_START:
- return IN_SET(state, UNIT_INACTIVE, UNIT_FAILED) ||
- job_later_link_matters(l->object, type, generation);
-
- case JOB_STOP:
- return IN_SET(state, UNIT_ACTIVE, UNIT_RELOADING) ||
- job_later_link_matters(l->object, type, generation);
-
- default:
- assert_not_reached("Invalid job type");
- }
- }
-
- return false;
-}
-
-bool job_is_redundant(Job *j, unsigned generation) {
-
- assert(j);
-
- UnitActiveState state = unit_active_state(j->unit);
- switch (j->type) {
+bool job_type_is_redundant(JobType a, UnitActiveState b) {
+ switch (a) {
case JOB_START:
- return IN_SET(state, UNIT_ACTIVE, UNIT_RELOADING) && !job_later_link_matters(j, JOB_START, generation);
+ return IN_SET(b, UNIT_ACTIVE, UNIT_RELOADING);
case JOB_STOP:
- return IN_SET(state, UNIT_INACTIVE, UNIT_FAILED) && !job_later_link_matters(j, JOB_STOP, generation);
+ return IN_SET(b, UNIT_INACTIVE, UNIT_FAILED);
case JOB_VERIFY_ACTIVE:
- return IN_SET(state, UNIT_ACTIVE, UNIT_RELOADING);
+ return IN_SET(b, UNIT_ACTIVE, UNIT_RELOADING);
case JOB_RELOAD:
return
- state == UNIT_RELOADING;
+ b == UNIT_RELOADING;
case JOB_RESTART:
return
- state == UNIT_ACTIVATING;
+ b == UNIT_ACTIVATING;
case JOB_NOP:
return true;
diff --git a/src/core/job.h b/src/core/job.h
index 02b057ee06..03ad640618 100644
--- a/src/core/job.h
+++ b/src/core/job.h
@@ -196,8 +196,7 @@ _pure_ static inline bool job_type_is_superset(JobType a, JobType b) {
return a == job_type_lookup_merge(a, b);
}
-bool job_later_link_matters(Job *j, JobType type, unsigned generation);
-bool job_is_redundant(Job *j, unsigned generation);
+bool job_type_is_redundant(JobType a, UnitActiveState b) _pure_;
/* Collapses a state-dependent job type into a simpler type by observing
* the state of the unit which it is going to be applied to. */
diff --git a/src/core/transaction.c b/src/core/transaction.c
index 8d67f9ce1a..a0ea0f0489 100644
--- a/src/core/transaction.c
+++ b/src/core/transaction.c
@@ -279,7 +279,7 @@ static int transaction_merge_jobs(Transaction *tr, sd_bus_error *e) {
return 0;
}
-static void transaction_drop_redundant(Transaction *tr, unsigned generation) {
+static void transaction_drop_redundant(Transaction *tr) {
bool again;
/* Goes through the transaction and removes all jobs of the units whose jobs are all noops. If not
@@ -299,7 +299,7 @@ static void transaction_drop_redundant(Transaction *tr, unsigned generation) {
LIST_FOREACH(transaction, k, j)
if (tr->anchor_job == k ||
- !job_is_redundant(k, generation) ||
+ !job_type_is_redundant(k->type, unit_active_state(k->unit)) ||
(k->unit->job && job_type_is_conflicting(k->type, k->unit->job->type))) {
keep = true;
break;
@@ -730,7 +730,7 @@ int transaction_activate(
transaction_minimize_impact(tr);
/* Third step: Drop redundant jobs */
- transaction_drop_redundant(tr, generation++);
+ transaction_drop_redundant(tr);
for (;;) {
/* Fourth step: Let's remove unneeded jobs that might
@@ -772,7 +772,7 @@ int transaction_activate(
}
/* Eights step: Drop redundant jobs again, if the merging now allows us to drop more. */
- transaction_drop_redundant(tr, generation++);
+ transaction_drop_redundant(tr);
/* Ninth step: check whether we can actually apply this */
r = transaction_is_destructive(tr, mode, e);
--
2.25.0

View File

@ -1 +1 @@
SHA512 (systemd-245.6.tar.gz) = a4add8e2fd38199d609a9eabfad1be93a304ddfd64e3d4498df536bf3d88e5e8ee16d2dfb7fad20332bb7fbd8898e6e50c3fd6df2f24ac45eec88bd339efb2fe
SHA512 (systemd-246-rc1.tar.gz) = 5c0c6abe8e0fdc85fd40cd2e66fd710d0f2b3d2436d9b732e78b0a0647e83d4254c1f224e83b5b6367adc1099118ecd0250f83f8ba2ce5926ef2084c5c5f0628

View File

@ -1,7 +1,7 @@
#global commit ef677436aa203c24816021dd698b57f219f0ff64
#global commit 7f56c26d1041e686efa72b339250a98fb6ee8f00
%{?commit:%global shortcommit %(c=%{commit}; echo ${c:0:7})}
%global stable 1
#global stable 1
# We ship a .pc file but don't want to have a dep on pkg-config. We
# strip the automatically generated dep here and instead co-own the
@ -19,8 +19,8 @@
Name: systemd
Url: https://www.freedesktop.org/wiki/Software/systemd
Version: 245.6
Release: 3%{?commit:.git%{shortcommit}}%{?dist}
Version: 246~rc1
Release: 1%{?dist}
# For a breakdown of the licensing, see README
License: LGPLv2+ and MIT and GPLv2+
Summary: System and Service Manager
@ -72,9 +72,6 @@ Patch0001: use-bfq-scheduler.patch
Patch0998: 0998-resolved-create-etc-resolv.conf-symlink-at-runtime.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1803293
Patch1000: 0001-Revert-job-Don-t-mark-as-redundant-if-deps-are-relev.patch
%ifarch %{ix86} x86_64 aarch64
%global have_gnu_efi 1
%endif
@ -774,8 +771,20 @@ fi
%files tests -f .file-list-tests
%changelog
* Thu Jul 9 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 246~rc1-1
- New upstream release, see
https://raw.githubusercontent.com/systemd/systemd/v246-rc1/NEWS.
This release includes many new unit settings, related inter alia to
cgroupsv2 freezer support and cpu affinity, encryption and verification.
systemd-networkd has a ton of new functionality and many other tools gained
smaller enhancements. systemd-homed gained FIDO2 support.
Documentation has been significantly improved: sd-bus and sd-hwdb
libraries are now fully documented; man pages have been added for
the D-BUS APIs of systemd daemons and various new interfaces.
* Wed Jun 24 2020 Bastien Nocera <bnocera@redhat.com> - 245.6-3
+ systemd-245.6-3
- Set fallback-hostname to fedora so that unset hostnames are still
recognisable (#1392925)

View File

@ -1,4 +1,4 @@
From 464a73411c13596a130a7a8f0ac00ca728e5f69e Mon Sep 17 00:00:00 2001
From 223ea50950f97ed4e67311dfcffed7ffc27a7cd3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 14 Aug 2019 15:57:42 +0200
Subject: [PATCH] udev: use bfq as the default scheduler
@ -10,30 +10,29 @@ the default scheduler, and it currently needs to be set by userspace.
See the bug for more discussion and links.
---
rules/60-block-scheduler.rules | 5 +++++
rules/meson.build | 1 +
rules.d/60-block-scheduler.rules | 5 +++++
rules.d/meson.build | 1 +
2 files changed, 6 insertions(+)
create mode 100644 rules/60-block-scheduler.rules
create mode 100644 rules.d/60-block-scheduler.rules
diff --git a/rules.d/60-block-scheduler.rules b/rules.d/60-block-scheduler.rules
new file mode 100644
index 00000000000..480b941761f
index 0000000000..480b941761
--- /dev/null
+++ b/rules.d/60-block-scheduler.rules
@@ -0,0 +1,6 @@
@@ -0,0 +1,5 @@
+# do not edit this file, it will be overwritten on update
+
+ACTION=="add", SUBSYSTEM=="block", \
+ KERNEL=="mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|sd*[!0-9]|sr*", \
+ ENV{DEVTYPE}=="disk", \
+ ATTR{queue/scheduler}="bfq"
diff --git a/rules.d/meson.build b/rules.d/meson.build
index b6a32ba77e2..1da958b4d46 100644
index ca4445d774..38d6aa6970 100644
--- a/rules.d/meson.build
+++ b/rules.d/meson.build
@@ -2,6 +2,7 @@
@@ -3,6 +3,7 @@
rules = files('''
60-autosuspend.rules
60-block.rules
+ 60-block-scheduler.rules
60-cdrom_id.rules