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:
parent
bd7917b1a7
commit
2df6483f69
@ -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++;
|
||||||
|
Loading…
Reference in New Issue
Block a user