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