Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Dec 2018 09:31:55 +0000 (UTC)
From:      Bruce Evans <bde@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r342364 - head/sys/kern
Message-ID:  <201812220931.wBM9Vt6O024537@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bde
Date: Sat Dec 22 09:31:55 2018
New Revision: 342364
URL: https://svnweb.freebsd.org/changeset/base/342364

Log:
  Oops, rounddown() for the start was misspelled roundup() in r342295,
  so only aligned starts worked.  This broke releasing caches in most
  cases where the i/o size is smaller than the fs block size.

Modified:
  head/sys/kern/vfs_default.c

Modified: head/sys/kern/vfs_default.c
==============================================================================
--- head/sys/kern/vfs_default.c	Sat Dec 22 06:08:06 2018	(r342363)
+++ head/sys/kern/vfs_default.c	Sat Dec 22 09:31:55 2018	(r342364)
@@ -1094,7 +1094,7 @@ vop_stdadvise(struct vop_advise_args *ap)
 		 * pages usually remain in VMIO for some time.
 		 */
 		bsize = vp->v_bufobj.bo_bsize;
-		bstart = roundup(ap->a_start, bsize);
+		bstart = rounddown(ap->a_start, bsize);
 		bend = roundup(ap->a_end, bsize);
 
 		/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812220931.wBM9Vt6O024537>