35 lines
1.2 KiB
Diff
35 lines
1.2 KiB
Diff
|
From 61b384b36105fe682ddf16b9379f446d935603bc Mon Sep 17 00:00:00 2001
|
||
|
From: Karel Zak <kzak@redhat.com>
|
||
|
Date: Tue, 4 Feb 2020 16:17:42 +0100
|
||
|
Subject: [PATCH] fstrim: do not use Protect setting in systemd service
|
||
|
|
||
|
The ProtectHome= and ProtectSystem= settings mounts all stuff for the service in read-only mode.
|
||
|
|
||
|
The fstrim ioctl operates on read-only mountpoint file descriptor, but
|
||
|
on some read-only filesystem the operation can fail, so since
|
||
|
2d22ac64e4 we check for read-only volumes and skip it.
|
||
|
|
||
|
References: Upstream: http://github.com/karelzak/util-linux/commit/2d22ac64e4d6e6732640f38b7232b5bcdc84a877
|
||
|
Addresses: https://github.com/karelzak/util-linux/issues/948
|
||
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||
|
---
|
||
|
sys-utils/fstrim.service.in | 2 --
|
||
|
1 file changed, 2 deletions(-)
|
||
|
|
||
|
diff --git a/sys-utils/fstrim.service.in b/sys-utils/fstrim.service.in
|
||
|
index a8b631730..b58728ef4 100644
|
||
|
--- a/sys-utils/fstrim.service.in
|
||
|
+++ b/sys-utils/fstrim.service.in
|
||
|
@@ -6,8 +6,6 @@ ConditionVirtualization=!container
|
||
|
[Service]
|
||
|
Type=oneshot
|
||
|
ExecStart=@sbindir@/fstrim --fstab --verbose --quiet
|
||
|
-ProtectSystem=strict
|
||
|
-ProtectHome=read-only
|
||
|
PrivateDevices=no
|
||
|
PrivateNetwork=yes
|
||
|
PrivateUsers=no
|
||
|
--
|
||
|
2.24.1
|
||
|
|