Bug 221935 - fix: swapon/swapoff can't handle md-based file swap with geli from fstab
Summary: fix: swapon/swapoff can't handle md-based file swap with geli from fstab
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.3-STABLE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs mailing list
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-08-30 10:25 UTC by Pierre Beyssac
Modified: 2017-08-30 11:02 UTC (History)
0 users

See Also:


Attachments
patch for /usr/src/sbin/swapon/swapon.c (3.98 KB, patch)
2017-08-30 10:25 UTC, Pierre Beyssac
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Beyssac 2017-08-30 10:25:51 UTC
Created attachment 185915 [details]
patch for /usr/src/sbin/swapon/swapon.c

From fstab, swapon/swapoff/swapctl can handle file-based swap using md, and partition-based swap with geli by appending .eli to the disk name in fstab, but it doesn't recognize the .eli suffix when applied to a md-based swap.

Attached is a patch to enable this use case.

Note: the same problem exists with the .bde suffix but as it seems to me that gbde is deprecated, I didn't bother writing the relevant code. It would probably follow a similar pattern.