svn commit: r200457 - user/kmacy/releng_8_fcs_buf_xen/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

Kip Macy kmacy at FreeBSD.org
Sat Dec 12 23:52:21 UTC 2009


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,


More information about the svn-src-user mailing list