svn commit: r318934 - vendor-sys/illumos/dist/uts/common/fs/zfs

Andriy Gapon avg at FreeBSD.org
Fri May 26 11:48:30 UTC 2017


Author: avg
Date: Fri May 26 11:48:29 2017
New Revision: 318934
URL: https://svnweb.freebsd.org/changeset/base/318934

Log:
  8070 Add some ZFS comments
  
  illumos/illumos-gate at 40713f2b249d289022c715107b3951055a63aef0
  https://github.com/illumos/illumos-gate/commit/40713f2b249d289022c715107b3951055a63aef0
  
  https://www.illumos.org/issues/8070
    Add some ZFS comments left by various developers at different times
  
  Reviewed by: Yuri Pankov <yuri.pankov at gmail.com>
  Reviewed by: Matthew Ahrens <mahrens at delphix.com>
  Approved by: Robert Mustacchi <rm at joyent.com>
  Author: Alan Somers <asomers at gmail.com>

Modified:
  vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c
==============================================================================
--- vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c	Fri May 26 11:39:34 2017	(r318933)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c	Fri May 26 11:48:29 2017	(r318934)
@@ -1219,6 +1219,11 @@ dbuf_unoverride(dbuf_dirty_record_t *dr)
 	uint64_t txg = dr->dr_txg;
 
 	ASSERT(MUTEX_HELD(&db->db_mtx));
+	/*
+	 * This assert is valid because dmu_sync() expects to be called by
+	 * a zilog's get_data while holding a range lock.  This call only
+	 * comes from dbuf_dirty() callers who must also hold a range lock.
+	 */
 	ASSERT(dr->dt.dl.dr_override_state != DR_IN_DMU_SYNC);
 	ASSERT(db->db_level == 0);
 

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c
==============================================================================
--- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c	Fri May 26 11:39:34 2017	(r318933)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c	Fri May 26 11:48:29 2017	(r318934)
@@ -779,7 +779,7 @@ dsl_scan_visitbp(blkptr_t *bp, const zbo
 		return;
 
 	/*
-	 * If dsl_scan_ddt() has aready visited this block, it will have
+	 * If dsl_scan_ddt() has already visited this block, it will have
 	 * already done any translations or scrubbing, so don't call the
 	 * callback again.
 	 */
@@ -1446,6 +1446,7 @@ dsl_scan_active(dsl_scan_t *scn)
 	return (used != 0);
 }
 
+/* Called whenever a txg syncs. */
 void
 dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx)
 {
@@ -1863,6 +1864,7 @@ dsl_scan_scrub_cb(dsl_pool_t *dp,
 	return (0);
 }
 
+/* Called by the ZFS_IOC_POOL_SCAN ioctl to start a scrub or resilver */
 int
 dsl_scan(dsl_pool_t *dp, pool_scan_func_t func)
 {


More information about the svn-src-all mailing list