Reflect the fact that we do not swap on the first <dmmax> blocks of a

swapdev, to protect disklabels and other such magic stuff.
This commit is contained in:
Poul-Henning Kamp 1995-05-14 03:37:40 +00:00
parent bd7917b1a7
commit 2df6483f69

View File

@ -1084,7 +1084,10 @@ swapmode()
devname(sw[i].sw_dev, S_IFBLK), devname(sw[i].sw_dev, S_IFBLK),
hlen, sw[i].sw_nblks / div); hlen, sw[i].sw_nblks / div);
xsize = sw[i].sw_nblks; /* The first dmmax is never allocated to avoid trashing of
* disklabels
*/
xsize = sw[i].sw_nblks - dmmax;
xfree = perdev[i]; xfree = perdev[i];
used = xsize - xfree; used = xsize - xfree;
npfree++; npfree++;