summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Somers <asomers@gmail.com>2017-05-16 11:18:58 -0700
committerPrakash Surya <prakash.surya@delphix.com>2017-05-16 15:38:55 -0700
commit40713f2b249d289022c715107b3951055a63aef0 (patch)
tree9e3a589ca2e3c3139de31e00a307bbeef96537ee
parentab3407e42869db06198054a02d468636f7b48bdb (diff)
downloadillumos-joyent-40713f2b249d289022c715107b3951055a63aef0.tar.gz
8070 Add some ZFS comments
Reviewed by: Yuri Pankov <yuri.pankov@gmail.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com>
-rw-r--r--usr/src/uts/common/fs/zfs/dbuf.c5
-rw-r--r--usr/src/uts/common/fs/zfs/dsl_scan.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/usr/src/uts/common/fs/zfs/dbuf.c b/usr/src/uts/common/fs/zfs/dbuf.c
index bd01d57c0a..e039135aef 100644
--- a/usr/src/uts/common/fs/zfs/dbuf.c
+++ b/usr/src/uts/common/fs/zfs/dbuf.c
@@ -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);
diff --git a/usr/src/uts/common/fs/zfs/dsl_scan.c b/usr/src/uts/common/fs/zfs/dsl_scan.c
index c672128744..7fa7b6f53c 100644
--- a/usr/src/uts/common/fs/zfs/dsl_scan.c
+++ b/usr/src/uts/common/fs/zfs/dsl_scan.c
@@ -779,7 +779,7 @@ dsl_scan_visitbp(blkptr_t *bp, const zbookmark_phys_t *zb,
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)
{