PERFORCE change 214248 for review

John Baldwin jhb at FreeBSD.org
Wed Jul 11 15:39:14 UTC 2012


http://p4web.freebsd.org/@@214248?ac=10

Change 214248 by jhb at jhb_jhbbsd on 2012/07/11 15:38:26

	Fix mismerge.

Affected files ...

.. //depot/projects/fadvise/sys/kern/vfs_vnops.c#11 edit

Differences ...

==== //depot/projects/fadvise/sys/kern/vfs_vnops.c#11 (text+ko) ====

@@ -678,12 +678,6 @@
 	if (error == 0)
 #endif
 		error = VOP_READ(vp, uio, ioflag, fp->f_cred);
-		mtx_lock(mtxp);
-		if (fp->f_vnread_flags & FOFFSET_LOCK_WAITING)
-			wakeup(&fp->f_vnread_flags);
-		fp->f_vnread_flags = 0;
-		mtx_unlock(mtxp);
-	}
 	fp->f_nextoff = uio->uio_offset;
 	VOP_UNLOCK(vp, 0);
 	if (error == 0 && advice == POSIX_FADV_NOREUSE &&
@@ -706,24 +700,6 @@
 		start = offset;
 		end = uio->uio_offset - 1;
 		mtxp = mtx_pool_find(mtxpool_sleep, fp);
-	    offset != uio->uio_offset) {
-		/*
-		 * Use POSIX_FADV_DONTNEED to flush clean pages and
-		 * buffers for the backing file after a
-		 * POSIX_FADV_NOREUSE read(2).  To optimize the common
-		 * case of using POSIX_FADV_NOREUSE with sequential
-		 * access, track the previous implicit DONTNEED
-		 * request and grow this request to include the
-		 * current read(2) in addition to the previous
-		 * DONTNEED.  With purely sequential access this will
-		 * cause the DONTNEED requests to continously grow to
-		 * cover all of the previously read regions of the
-		 * file.  This allows filesystem blocks that are
-		 * accessed by multiple calls to read(2) to be flushed
-		 * once the last read(2) finishes.
-		 */
-		start = offset;
-		end = uio->uio_offset - 1;
 		mtx_lock(mtxp);
 		if (fp->f_advice != NULL &&
 		    fp->f_advice->fa_advice == POSIX_FADV_NOREUSE) {


More information about the p4-projects mailing list