Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH] control which tmpfs get unmounted at swapoff



On Fri, 18 Mar 2016, Ian D. Leroux wrote:

> Here's slightly better compromise, that does the right thing by default
> in more cases.  The rc.conf variable "swapoff_umount" (name changed for
> clarity) can be either
> - an explicit list of zero or more tmpfs filesystems to umount before
> removing swap devices, or
> - "auto", in which case all tmpfs mounts containing no device nodes are
> removed, as you suggested at the beginning of the week.

I'm uneasy about a 'magic' value, which could be problematic (sorry, did 
you have a filesystem named auto?).. is it a problem to have

	not set ->	auto behaviour
	set ->		unmount the file systems listed, if any

?

You can do this with eg

	case "${swapoff_umount+set}" in
		set)
			fs_to_umount="${swapoff_umount}"
			;;
		*)
			fs_to_umount="$(dev_free_tmpfs)"
			;;
	esac

regards,
iain


Home | Main Index | Thread Index | Old Index