[systemd-devel] [PATCH 2/2] core/swap.c: Do not add Before=swap.target to swap units.

Thomas Bächler thomas at archlinux.org
Tue Oct 16 01:47:01 PDT 2012


Am 16.10.2012 02:22, schrieb Lennart Poettering:
> On Sat, 06.10.12 01:11, Thomas Bächler (thomas at archlinux.org) wrote:
> 
>> The fstab generator adds Before=swap.target by default, and when creating
>> a custom .swap unit, you can also add Before=swap.target to the unit.
>>
>> However, it is impossible to not have this ordering dependency right now.
>> Virtually all existing setups likely use the fstab generator, so this
>> change is unlikely to break anything.
> 
> Thanks!
> 
> Seems for .mount units we don't generate target deps either in the core
> code either, hence we should make the handling of swap unit and mount
> units more similar.
> 
> Commited!
> 
> (It feels so good to commit a patch that just deletes code! ;-))

Thank you, this speeds up my boot process for another few nanoseconds or
so :)

I'd like to add this for completeness: Once you add the swap unit to
swap.target.wants, and have DefaultDependencies=yes, you also get
Before=swap.target implicitly. I realized this very late, as it is only
stated in the systemd.target manpage, but not in the description of
DefaultDependencies in systemd.unit.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 897 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20121016/fafdbf98/attachment.pgp>


More information about the systemd-devel mailing list