]> git.proxmox.com Git - mirror_zfs.git/commitdiff
OpenZFS 8070 - Add some ZFS comments
authorAlan Somers <asomers@gmail.com>
Wed, 24 May 2017 10:34:56 +0000 (06:34 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 26 May 2017 00:15:06 +0000 (17:15 -0700)
Authored by: Alan Somers <asomers@gmail.com>
Reviewed by: Yuri Pankov <yuri.pankov@gmail.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Ported-by: bunder2015 <omfgbunder@gmail.com>
OpenZFS-issue: https://www.illumos.org/issues/8070
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/40713f2
Closes #6160

module/zfs/dbuf.c
module/zfs/dsl_scan.c

index d347c5b91cdd8a93f62500d4a54b4b3df4b5874e..1575cc1b411c6e7377b098505a60b3a2ad35d3bd 100644 (file)
@@ -1300,6 +1300,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);
 
index 5b52681d8d8e13d59c0f3c625b406b8793e562a2..89faaeb8f03c509a39f3f5ae5fd8a18f133027e0 100644 (file)
@@ -1511,6 +1511,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)
 {
@@ -1956,6 +1957,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)
 {