Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Nov 2009 05:44:18 +0000 (UTC)
From:      Kip Macy <kmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r199473 - user/kmacy/releng_8_fcs_buf/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <200911180544.nAI5iIm4059876@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kmacy
Date: Wed Nov 18 05:44:17 2009
New Revision: 199473
URL: http://svn.freebsd.org/changeset/base/199473

Log:
  always invalidate older cached buffer

Modified:
  user/kmacy/releng_8_fcs_buf/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c

Modified: user/kmacy/releng_8_fcs_buf/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
==============================================================================
--- user/kmacy/releng_8_fcs_buf/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c	Wed Nov 18 05:21:35 2009	(r199472)
+++ user/kmacy/releng_8_fcs_buf/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c	Wed Nov 18 05:44:17 2009	(r199473)
@@ -1336,16 +1336,17 @@ arc_bgetvp(arc_buf_t *buf)
 			bp->b_flags |= B_INVAL;
 			bp->b_birth = 0;
 			brelse(bp);
-		} else if ((newbp->b_flags & (B_INVAL|B_CACHE)) == B_CACHE) {
+		} else {
+			
 			bp->b_flags |= B_INVAL;
 			bp->b_birth = 0;
 			brelse(bp);
-			
-			BO_LOCK(bo);
-			bgetvp(vp, newbp);
-			BO_UNLOCK(bo);
-		} else
-			brelse(bp);
+			if ((newbp->b_flags & (B_INVAL|B_CACHE)) == B_CACHE) {
+				BO_LOCK(bo);
+				bgetvp(vp, newbp);
+				BO_UNLOCK(bo);
+			}
+		} 
 	} else {
 		newbp->b_flags |= B_CACHE;
 		newbp->b_flags &= ~B_INVAL;



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