RFC: swapon(8) vnode-backed md and gbde/geli encryption support

From: Hiroki Sato <hrs_at_FreeBSD.org>
Date: Sun, 23 Jun 2013 03:53:56 +0900 (JST)
Hi,

 I created a patchset to add support of automatic generation of
 vnode-backed md(4) devices and gbde/geli geom providers to swapon(8)
 via /etc/fstab.  We already have equivalent functionality by using
 rc.d scripts.  This simplifies rc.d scripts and fixes a race between
 mdconfig/gbde/geli and swapon/swapoff by using /etc/fstab.

 More specifically, the following specification will be supported:

 /dev/ada1p1.bde	none	swap	sw		0 0
 /dev/ada1p2.eli	none	swap	sw		0 0
 md	none	swap	sw,file=/swap.bin		0 0
 md10	none	swap	sw,file=/swap10.bin		0 0
 md12	none	swap	sw,file=/usr/swap12.bin,late	0 0

 Currently, rc.d/swap1, rc.d/encswap handles entries with FSTAB_SW and
 then rc.d/addswap for additional swap space specified in rc.conf.
 The rc.d/addswap script runs before NETWORKING, so it is difficult to
 add a swap space by using a file via NFS on a diskless client.  The
 "late" keyword in /etc/fstab will give more flexibility in such a
 case.

 So, the changes to rc.d scripts are the following:

  rc.d/encswap -> (removed)
  rc.d/swap1 -> rc.d/swap
  rc.d/swaplate -> (added)

 rc.d/addswap is not removed in the patchset, but is it still
 necessary?  I do not think using combination of rc.d scripts to
 support md(4) device generation for swap spaces is robust, and I
 believe /etc/fstab is sufficient for the same functionality.

 Any comments are welcome.  Thank you.

-- Hiroki

Received on Sat Jun 22 2013 - 16:56:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:38 UTC