Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Dec 2009 23:52:21 +0000 (UTC)
From:      Kip Macy <kmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r200457 - user/kmacy/releng_8_fcs_buf_xen/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <200912122352.nBCNqLg0067591@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kmacy
Date: Sat Dec 12 23:52:20 2009
New Revision: 200457
URL: http://svn.freebsd.org/changeset/base/200457

Log:
  add comment clarifying call to zbio_sync_cache

Modified:
  user/kmacy/releng_8_fcs_buf_xen/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c

Modified: user/kmacy/releng_8_fcs_buf_xen/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
==============================================================================
--- user/kmacy/releng_8_fcs_buf_xen/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c	Sat Dec 12 23:47:31 2009	(r200456)
+++ user/kmacy/releng_8_fcs_buf_xen/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c	Sat Dec 12 23:52:20 2009	(r200457)
@@ -435,10 +435,15 @@ zio_create(zio_t *pio, spa_t *spa, uint6
 	else
 		zio->io_child_type = ZIO_CHILD_LOGICAL;
 
-
 	if (bp != NULL) {
 		io_bypass = 0;
 
+		/*
+		 * Synchronize buffer with page cache - making sure that
+		 * the page cache only holds the most recent txg's pages.
+		 * This also allows us to skip disk I/O if we hit in the
+		 * page cache.
+		 */
 		if (((vd == NULL) || (vd->vdev_parent == NULL)) &&
 		    ((type == ZIO_TYPE_WRITE) || (type == ZIO_TYPE_READ)))
 			io_bypass = zbio_sync_cache(spa, bp, txg, data, size,



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