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

Karel Zak kzak at redhat.com
Thu Oct 2 06:54:44 PDT 2014

On Thu, Oct 02, 2014 at 03:32:54PM +0200, Lennart Poettering wrote:
> On Thu, 25.09.14 09:54, Jan Synacek (jsynacek at redhat.com) wrote:
> > Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl> writes:
> > > On Wed, Sep 24, 2014 at 02:29:05PM +0200, Jan Synacek wrote:
> > >> Process possible "discard" values from /etc/fstab.
> > > Hm, wouldn't it be enough to simply pass through the options like with
> > > mounts, using the Options= option? This might be less work and be more
> > > flexible.
> > >
> > > Zbyszek
> > 
> > Swap options are special in that they're processed and used by the
> > swapon(8) command. You cannot pass swapon -o <options>, as you can to
> > ordinary mounts. And how many options for swapon, that at the same time
> > can be specified in /etc/fstab, do we really care about? I'm not sure.
> But isn't this something we can fix in swapon?
> I mean, swapon has the code to parse /etc/fstab and its options column
> anyway, it shouldn't be too hard to extend it to also take the string
> from the command line as parameter to "-o"?
> I'd really prefer if we'd try to stay close to fstab on this one, and
> instead of introducing individual new switches for the various
> options, try to stay compatible with fstab's native syntax.
> Karel, any chance you can add a "-o" option to swapon?

 No problem, added to TODO. I'll implement it next week.


 Karel Zak  <kzak at redhat.com>

More information about the systemd-devel mailing list