util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* swapon feature additions
@ 2011-10-27 19:40 Dave Reisner
  2011-11-03 10:41 ` Karel Zak
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Reisner @ 2011-10-27 19:40 UTC (permalink / raw)
  To: kzak; +Cc: util-linux

Hi Karel,

I was interested in making a few changes to swapon, but I figured I'd
inquire as to whether or not they're welcome first.

1) Introduce optional libmount support. This involves first refactoring
reading of /etc/fstab to remove the duplicated code and use callbacks
instead. Breaking out the functionality into libmount-powered and
non-libmount-powered code is then much cleaner.
2) Teach swapon/swapoff to only look at files or partitions. The use
case in mind is specifically for unswapping only files at shutdown, as
partitions can remain mounted without harm.

Does this seem reasonable? Is this functionality wanted? Anything else I
should be aware of?

Thanks,
Dave Reisner

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: swapon feature additions
  2011-10-27 19:40 swapon feature additions Dave Reisner
@ 2011-11-03 10:41 ` Karel Zak
  0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2011-11-03 10:41 UTC (permalink / raw)
  To: Dave Reisner; +Cc: util-linux

On Thu, Oct 27, 2011 at 03:40:56PM -0400, Dave Reisner wrote:
> 1) Introduce optional libmount support. This involves first refactoring
> reading of /etc/fstab to remove the duplicated code and use callbacks
> instead. Breaking out the functionality into libmount-powered and
> non-libmount-powered code is then much cleaner.

 I'd like to move all swapon(8) functionality to libmount and replace
 the whole swapon(8) by a small libmount based util. Unfortunately,
 swapon/swapoff support in libmount is not implemented yet.

> 2) Teach swapon/swapoff to only look at files or partitions. The use
> case in mind is specifically for unswapping only files at shutdown, as
> partitions can remain mounted without harm.

 This is probably more important, it would be nice to have 
 
    swapoff --all --files-only

> Does this seem reasonable? Is this functionality wanted? Anything else I
> should be aware of?

 Yes, my suggestion is to start with 2) :-)

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-03 10:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-27 19:40 swapon feature additions Dave Reisner
2011-11-03 10:41 ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).