mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-22 15:47:37 +00:00
Make the first two pages magic to protect the BSD labels rather than
only one.
This commit is contained in:
parent
1d253d7336
commit
ef3c5abdba
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118544
@ -2225,10 +2225,10 @@ swaponvp(td, vp, dev, nblks)
|
||||
|
||||
sp->sw_blist = blist_create(nblks);
|
||||
/*
|
||||
* Do not free the first block in order to avoid overwriting
|
||||
* Do not free the first two block in order to avoid overwriting
|
||||
* any bsd label at the front of the partition
|
||||
*/
|
||||
blist_free(sp->sw_blist, 1, nblks - 1);
|
||||
blist_free(sp->sw_blist, 2, nblks - 2);
|
||||
|
||||
TAILQ_INSERT_TAIL(&swtailq, sp, sw_list);
|
||||
nswapdev++;
|
||||
|
Loading…
Reference in New Issue
Block a user