]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fstrim: do not use Protect setting in systemd service
authorKarel Zak <kzak@redhat.com>
Tue, 4 Feb 2020 15:17:42 +0000 (16:17 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 4 Feb 2020 15:24:10 +0000 (16:24 +0100)
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

index a8b6317309c9a9dc4c21e5ae5f666716a02ea85b..b58728ef4cad3899735f4269a6f838e9d18f1091 100644 (file)
@@ -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