Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Nov 2009 03:36:54 +0000 (UTC)
From:      Kip Macy <kmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r199306 - user/kmacy/releng_8_fcs_buf/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <200911160336.nAG3asbh056381@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kmacy
Date: Mon Nov 16 03:36:54 2009
New Revision: 199306
URL: http://svn.freebsd.org/changeset/base/199306

Log:
  handle case where don't call allocbuf if b_kvasize is less than size

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	Mon Nov 16 02:46:21 2009	(r199305)
+++ user/kmacy/releng_8_fcs_buf/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c	Mon Nov 16 03:36:54 2009	(r199306)
@@ -1339,9 +1339,13 @@ arc_gbincore_replace(struct vnode *vp, o
 				else if ((bp->b_flags & (B_VMIO | B_INVAL)) == 0)
 					bp->b_flags |= B_CACHE;
 				bremfree(bp);
-				if (bp->b_bcount != size)
+				if ((bp->b_bcount != size) && (buf->b_kvasize >= size)) {
 					allocbuf_flags(bp, size, flags);
-				goto done;
+					goto done;
+				} else {
+					bp->b_flags |= B_INVAL;
+					brelse(bp);
+				}
 			}
 		}
 	}



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