Make the first two pages magic to protect the BSD labels rather than

only one.
This commit is contained in:
Poul-Henning Kamp 2003-08-06 14:13:38 +00:00
parent 1d253d7336
commit ef3c5abdba
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118544

View File

@ -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++;