[systemd-devel] fstrim "cron" job
Kay Sievers
kay at vrfy.org
Sat Dec 21 05:44:03 PST 2013
On Sat, Dec 21, 2013 at 2:25 PM, Bastien Nocera <hadess at hadess.net> wrote:
> I've seen that Ubuntu recently added transparent support for trimming
> filesystems on SSDs:
> https://blueprints.launchpad.net/ubuntu/+spec/core-1311-ssd-trimming
> and in the patch for util-linux:
> https://launchpadlibrarian.net/159909554/util-linux_2.20.1-5.1ubuntu11.diff.gz
>
> (looks for fstrim-all)
>
> I wanted to integrate that in Fedora, through a systemd daily unit. I
> was wondering whether this sort of integration (I'd intend to port the
> fstrim-all code to C) should be in systemd itself, or whether it should
> be a unit shipped separately (in the util-linux package maybe?).
No, not in systemd itself.
Trimming should be the job of the filesystem, not for a nasty cron
job. We do not want to support legacy filesystems with upstream
shipped systemd units.
Also, util-linux must not ship such policy, it's a collection of
tools, not a system policy carry-out.
We need to support fsck because it's needed for integrity and using
filesystems that need, but running trim is just an optimization. We do
not want the bugs for these filesystems triggered by the systemd
package.
Readahead is pointless and wrong enough already to ship and enable in
systemd; using slows down bootup on all of my machines.
Kay
More information about the systemd-devel
mailing list