Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Oct 2011 15:38:22 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 200764 for review
Message-ID:  <201110261538.p9QFcM9j036362@skunkworks.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@200764?ac=10

Change 200764 by jhb@jhb_jhbbsd on 2011/10/26 15:38:18

	Tweaks.

Affected files ...

.. //depot/projects/fadvise/sys/kern/vfs_subr.c#3 edit
.. //depot/projects/fadvise/sys/kern/vfs_syscalls.c#11 edit

Differences ...

==== //depot/projects/fadvise/sys/kern/vfs_subr.c#3 (text+ko) ====

@@ -1256,7 +1256,7 @@
  *
  */
 static int
-flushbuflist( struct bufv *bufv, int flags, struct bufobj *bo, int slpflag,
+flushbuflist(struct bufv *bufv, int flags, struct bufobj *bo, int slpflag,
     int slptimeo)
 {
 	struct buf *bp, *nbp;

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

@@ -4903,11 +4903,12 @@
 	case FADV_SEQUENTIAL:
 	case FADV_RANDOM:
 	case FADV_NOREUSE:
-		mtx_pool_lock(mtxpool_sleep, fp);
 		/*
-		 * See if we can merge with the existing non-standard
-		 * region.
+		 * Try to merge any existing non-standard region with
+		 * this new region if possible, otherwise create a new
+		 * non-standard region for this request.
 		 */
+		mtx_pool_lock(mtxpool_sleep, fp);
 		if (fp->f_advice == uap->advice &&
 		    ((fp->f_advstart <= end && fp->f_advend >= uap->offset) ||
 		    (fp->f_advstart != 0 && fp->f_advstart == end + 1) ||



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