]> git.ipfire.org Git - thirdparty/util-linux.git/commit
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)
commitae63d7e8324c00771d1e754fb0c9304529c7cff3
treede36aa015d7a009986fd4c3b5a0117d2785d2da0
parentda0debad5355fa39c30c9c4de73a19724de6e4b6
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