]> git.sesse.net Git - bcachefs-tools-debian/blob - fsck/system-bcachefsck.slice
use upstream bindgen; fix packed and aligned types
[bcachefs-tools-debian] / fsck / system-bcachefsck.slice
1 # SPDX-License-Identifier: GPL-2.0
2 #
3 # Copyright (C) 2023-2024 Oracle.  All Rights Reserved.
4 # Author: Darrick J. Wong <djwong@kernel.org>
5
6 [Unit]
7 Description=bcachefsck background service slice
8 Before=slices.target
9
10 [Slice]
11
12 # If the CPU usage cgroup controller is available, don't use more than 60% of a
13 # single core for all background processes.
14 CPUQuota=60%
15 CPUAccounting=true
16
17 [Install]
18 # As of systemd 249, the systemd cgroupv2 configuration code will drop resource
19 # controllers from the root and system.slice cgroups at startup if it doesn't
20 # find any direct dependencies that require a given controller.  Newly
21 # activated units with resource control directives are created under the system
22 # slice but do not cause a reconfiguration of the slice's resource controllers.
23 # Hence we cannot put CPUQuota= into the bcachefsck service units directly.
24 #
25 # For the CPUQuota directive to have any effect, we must therefore create an
26 # explicit definition file for the slice that systemd creates to contain the
27 # bcachefsck instance units (e.g. bcachefsck@.service) and we must configure this
28 # slice as a dependency of the system slice to establish the direct dependency
29 # relation.
30 WantedBy=system.slice