Skip to content

Commit

Permalink
8070 Add some ZFS comments
Browse files Browse the repository at this point in the history
Reviewed by: Yuri Pankov <yuri.pankov@gmail.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
  • Loading branch information
asomers authored and prakashsurya committed May 16, 2017
1 parent ab3407e commit 40713f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions usr/src/uts/common/fs/zfs/dbuf.c
Expand Up @@ -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);

Expand Down
4 changes: 3 additions & 1 deletion usr/src/uts/common/fs/zfs/dsl_scan.c
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit 40713f2

Please sign in to comment.