Add an `b2c.fstrim` option
Right now, we are running fstrim unconditionally at boot time. Unfortunately, the execution time can be quite long which may be problematic for some use cases.
Rather than trying to create a one-size-fits-all solution, I would propose making an fstrim that would allow specifying how we want it run (or not). Similarly to the mirror commands, I propose thatb2c.fstrim
should take a coma-separated list of arguments.
-
pipeline_start
(default): Run fstrim and wait for completion before starting the first container -
pipeline_end
: Run fstrim after the execution of the last container, wait for completion before shutdown/reboot -
periodically=(daily|weekly)
:
Additionally, I would propose that the pipeline_start
mode should we done somewhat asynchronously: start fstrim as soon as cmdline parsing is done is mounted, and wait for completion before executing the first container. This way, we can do network operations while downloading everything.