]> 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:25:38 +0000 (16:25 +0100)
commit61b384b36105fe682ddf16b9379f446d935603bc
treeb23c056dcaef6b8071495fa8a80f176b12ee6586
parent00e53f17c8462cb34ece08cc10db60a7da29a305
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