start = gethrtime();
zio = zio_root(dp->dp_spa, NULL, NULL, ZIO_FLAG_MUSTSUCCEED);
start = gethrtime();
zio = zio_root(dp->dp_spa, NULL, NULL, ZIO_FLAG_MUSTSUCCEED);
/*
* We must not sync any non-MOS datasets twice, because
* we may have taken a snapshot of them. However, we
/*
* We must not sync any non-MOS datasets twice, because
* we may have taken a snapshot of them. However, we
* whose ds_bp will be rewritten when we do this 2nd sync.
*/
zio = zio_root(dp->dp_spa, NULL, NULL, ZIO_FLAG_MUSTSUCCEED);
* whose ds_bp will be rewritten when we do this 2nd sync.
*/
zio = zio_root(dp->dp_spa, NULL, NULL, ZIO_FLAG_MUSTSUCCEED);
ASSERT(list_link_active(&ds->ds_synced_link));
dmu_buf_rele(ds->ds_dbuf, ds);
dsl_dataset_sync(ds, zio, tx);
ASSERT(list_link_active(&ds->ds_synced_link));
dmu_buf_rele(ds->ds_dbuf, ds);
dsl_dataset_sync(ds, zio, tx);
list_remove(&dp->dp_synced_datasets, ds);
os = ds->ds_objset;
zil_clean(os->os_zil, txg);
list_remove(&dp->dp_synced_datasets, ds);
os = ds->ds_objset;
zil_clean(os->os_zil, txg);