Date: Tue, 6 Jun 2017 16:52:07 +0000 (UTC) From: Alan Cox <alc@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319627 - head/sys/vm Message-ID: <201706061652.v56Gq7CR000101@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: alc Date: Tue Jun 6 16:52:07 2017 New Revision: 319627 URL: https://svnweb.freebsd.org/changeset/base/319627 Log: Starting in r118390, swaponsomething() began to reserve the blocks at the beginning of a swap area for a disk label. However, neither r118390 nor r118544, which increased the reservation from one to two blocks, correctly accounted for these blocks when updating the variable "swap_pager_avail". This change corrects that error. Reviewed by: kib MFC after: 5 days Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Tue Jun 6 16:04:27 2017 (r319626) +++ head/sys/vm/swap_pager.c Tue Jun 6 16:52:07 2017 (r319627) @@ -2203,7 +2203,7 @@ swaponsomething(struct vnode *vp, void *id, u_long nbl sp->sw_end = dvbase + nblks; TAILQ_INSERT_TAIL(&swtailq, sp, sw_list); nswapdev++; - swap_pager_avail += nblks; + swap_pager_avail += nblks - 2; swap_total += (vm_ooffset_t)nblks * PAGE_SIZE; swapon_check_swzone(swap_total / PAGE_SIZE); swp_sizecheck();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706061652.v56Gq7CR000101>