[systemd-devel] [PATCH] swap: introduce Discard property

Lennart Poettering lennart at poettering.net
Mon Oct 20 12:41:40 PDT 2014


On Mon, 20.10.14 11:08, Karel Zak (kzak at redhat.com) wrote:

> On Fri, Oct 03, 2014 at 07:16:55AM +0200, Jan Synacek wrote:
> > Karel Zak <kzak at redhat.com> writes:
> > >> Karel, any chance you can add a "-o" option to swapon?
> > >
> > >  No problem, added to TODO. I'll implement it next week.
> 
> Implemented, it's in util-linux git tree, will be in v2.26.
> 
> > Would you please let me know when that patch makes it to the package in
> > rawhide? I would then fix the code I wrote to support it. Thank you.
> 
> Probably in December.

Jan, any chance you could rework the current systemd code to simply
hackishly accept Options=discard instead of Discard=yes for the
discard code? Then, later on, when swapon learns "-o" we can pass the
string 1:1 over. For now we'd just check if Options= is set to the
precise string discard, and generate an error for anything else. That
way we could make the discard functionality available now, but keep
compatibility with the future mkswap?

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list