From 00710365261a89abc127efa7fae5fe36d0fae7d1 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Wed, 24 May 2017 06:34:56 -0400 Subject: OpenZFS 8070 - Add some ZFS comments Authored by: Alan Somers Reviewed by: Yuri Pankov Reviewed by: Matthew Ahrens Approved by: Robert Mustacchi Reviewed-by: Giuseppe Di Natale Reviewed-by: Brian Behlendorf Ported-by: bunder2015 OpenZFS-issue: https://www.illumos.org/issues/8070 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/40713f2 Closes #6160 --- module/zfs/dbuf.c | 5 +++++ module/zfs/dsl_scan.c | 2 ++ 2 files changed, 7 insertions(+) (limited to 'module/zfs') diff --git a/module/zfs/dbuf.c b/module/zfs/dbuf.c index d347c5b91..1575cc1b4 100644 --- a/module/zfs/dbuf.c +++ b/module/zfs/dbuf.c @@ -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); diff --git a/module/zfs/dsl_scan.c b/module/zfs/dsl_scan.c index 5b52681d8..89faaeb8f 100644 --- a/module/zfs/dsl_scan.c +++ b/module/zfs/dsl_scan.c @@ -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) { -- cgit v1.2.3