swapon: Do not overwrite Linux swap header
Reviewed by: imp, jhb
Pull Request: https://github.com/freebsd/freebsd-src/pull/1084
swapon: Do not overwrite Linux swap header Tags None Referenced Files None Subscribers None
Description
Details
Event TimelineComment Actions I opened a new version at: https://github.com/freebsd/freebsd-src/pull/1205 I'm reading https://github.com/freebsd/freebsd-src/blob/main/sys/vm/swap_pager.c#L2432 right, FreeBSD already skips the first blocks to "avoid overwriting avoid overwriting any bsd label at the front of the partition". Much like NetBSD does. The only difference in the new PR is s/4096/PAGE_SIZE to accomodate for other architectures (on Linux, x86_64 & s390x is 4096, ppc64le is 65536 & aarch64 is 16384). |