HomeFreeBSD

swap_pager.c reserves 2 blocks for a bsd label. Change that 2 to the

Description

swap_pager.c reserves 2 blocks for a bsd label. Change that 2 to the
expression howmany(BBSIZE, PAGE_SIZE), where BBSIZE is the size of the
boot block area. That can be less than 2 if PAGE_SIZE is big.

swapon(8) has an option to trim (delete) all the blocks of a device at
startup. However, if the first of those blocks is a bsd label, then
trimming those blocks is destructive. Change swapon to leave the
first BBSIZE bytes untrimmed.

Update manual pages to reflect changes in how swapon and how it may be
used, espeically in association with savecore.

Reviewed by: alc
Approved by: markj (mentor)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D21191

Details

Provenance
dougmAuthored on Aug 15 2019, 2:30 AM
Parents
rGc06ccdd2ba00: arch.7: be explicit about the future for unmigrated GCC 4.2.1 archs
Branches
Unknown
Tags
Unknown

Event Timeline