dsl_dir.c (240133) | dsl_dir.c (240415) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 489 unchanged lines hidden (view full) --- 498 /* Remove our reservation. */ 499 dsl_prop_setarg_init_uint64(&psa, "reservation", 500 (ZPROP_SRC_NONE | ZPROP_SRC_LOCAL | ZPROP_SRC_RECEIVED), 501 &value); 502 psa.psa_effective_value = 0; /* predict default value */ 503 504 dsl_dir_set_reservation_sync(ds, &psa, tx); 505 | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 489 unchanged lines hidden (view full) --- 498 /* Remove our reservation. */ 499 dsl_prop_setarg_init_uint64(&psa, "reservation", 500 (ZPROP_SRC_NONE | ZPROP_SRC_LOCAL | ZPROP_SRC_RECEIVED), 501 &value); 502 psa.psa_effective_value = 0; /* predict default value */ 503 504 dsl_dir_set_reservation_sync(ds, &psa, tx); 505 |
506 ASSERT3U(dd->dd_phys->dd_used_bytes, ==, 0); 507 ASSERT3U(dd->dd_phys->dd_reserved, ==, 0); | 506 ASSERT0(dd->dd_phys->dd_used_bytes); 507 ASSERT0(dd->dd_phys->dd_reserved); |
508 for (t = 0; t < DD_USED_NUM; t++) | 508 for (t = 0; t < DD_USED_NUM; t++) |
509 ASSERT3U(dd->dd_phys->dd_used_breakdown[t], ==, 0); | 509 ASSERT0(dd->dd_phys->dd_used_breakdown[t]); |
510 511 VERIFY(0 == zap_destroy(mos, dd->dd_phys->dd_child_dir_zapobj, tx)); 512 VERIFY(0 == zap_destroy(mos, dd->dd_phys->dd_props_zapobj, tx)); 513 VERIFY(0 == dsl_deleg_destroy(mos, dd->dd_phys->dd_deleg_zapobj, tx)); 514 VERIFY(0 == zap_remove(mos, 515 dd->dd_parent->dd_phys->dd_child_dir_zapobj, dd->dd_myname, tx)); 516 517 obj = dd->dd_object; --- 72 unchanged lines hidden (view full) --- 590} 591 592void 593dsl_dir_sync(dsl_dir_t *dd, dmu_tx_t *tx) 594{ 595 ASSERT(dmu_tx_is_syncing(tx)); 596 597 mutex_enter(&dd->dd_lock); | 510 511 VERIFY(0 == zap_destroy(mos, dd->dd_phys->dd_child_dir_zapobj, tx)); 512 VERIFY(0 == zap_destroy(mos, dd->dd_phys->dd_props_zapobj, tx)); 513 VERIFY(0 == dsl_deleg_destroy(mos, dd->dd_phys->dd_deleg_zapobj, tx)); 514 VERIFY(0 == zap_remove(mos, 515 dd->dd_parent->dd_phys->dd_child_dir_zapobj, dd->dd_myname, tx)); 516 517 obj = dd->dd_object; --- 72 unchanged lines hidden (view full) --- 590} 591 592void 593dsl_dir_sync(dsl_dir_t *dd, dmu_tx_t *tx) 594{ 595 ASSERT(dmu_tx_is_syncing(tx)); 596 597 mutex_enter(&dd->dd_lock); |
598 ASSERT3U(dd->dd_tempreserved[tx->tx_txg&TXG_MASK], ==, 0); | 598 ASSERT0(dd->dd_tempreserved[tx->tx_txg&TXG_MASK]); |
599 dprintf_dd(dd, "txg=%llu towrite=%lluK\n", tx->tx_txg, 600 dd->dd_space_towrite[tx->tx_txg&TXG_MASK] / 1024); 601 dd->dd_space_towrite[tx->tx_txg&TXG_MASK] = 0; 602 mutex_exit(&dd->dd_lock); 603 604 /* release the hold from dsl_dir_dirty */ 605 dmu_buf_rele(dd->dd_dbuf, dd); 606} --- 718 unchanged lines hidden (view full) --- 1325 } 1326 1327 dmu_buf_will_dirty(dd->dd_dbuf, tx); 1328 1329 /* remove from old parent zapobj */ 1330 dsl_dir_name(dd, oldname); 1331 err = zap_remove(mos, dd->dd_parent->dd_phys->dd_child_dir_zapobj, 1332 dd->dd_myname, tx); | 599 dprintf_dd(dd, "txg=%llu towrite=%lluK\n", tx->tx_txg, 600 dd->dd_space_towrite[tx->tx_txg&TXG_MASK] / 1024); 601 dd->dd_space_towrite[tx->tx_txg&TXG_MASK] = 0; 602 mutex_exit(&dd->dd_lock); 603 604 /* release the hold from dsl_dir_dirty */ 605 dmu_buf_rele(dd->dd_dbuf, dd); 606} --- 718 unchanged lines hidden (view full) --- 1325 } 1326 1327 dmu_buf_will_dirty(dd->dd_dbuf, tx); 1328 1329 /* remove from old parent zapobj */ 1330 dsl_dir_name(dd, oldname); 1331 err = zap_remove(mos, dd->dd_parent->dd_phys->dd_child_dir_zapobj, 1332 dd->dd_myname, tx); |
1333 ASSERT3U(err, ==, 0); | 1333 ASSERT0(err); |
1334 1335 (void) strcpy(dd->dd_myname, ra->mynewname); 1336 dsl_dir_close(dd->dd_parent, dd); 1337 dd->dd_phys->dd_parent_obj = ra->newparent->dd_object; 1338 VERIFY(0 == dsl_dir_open_obj(dd->dd_pool, 1339 ra->newparent->dd_object, NULL, dd, &dd->dd_parent)); 1340 1341 /* add to new parent zapobj */ 1342 err = zap_add(mos, ra->newparent->dd_phys->dd_child_dir_zapobj, 1343 dd->dd_myname, 8, 1, &dd->dd_object, tx); | 1334 1335 (void) strcpy(dd->dd_myname, ra->mynewname); 1336 dsl_dir_close(dd->dd_parent, dd); 1337 dd->dd_phys->dd_parent_obj = ra->newparent->dd_object; 1338 VERIFY(0 == dsl_dir_open_obj(dd->dd_pool, 1339 ra->newparent->dd_object, NULL, dd, &dd->dd_parent)); 1340 1341 /* add to new parent zapobj */ 1342 err = zap_add(mos, ra->newparent->dd_phys->dd_child_dir_zapobj, 1343 dd->dd_myname, 8, 1, &dd->dd_object, tx); |
1344 ASSERT3U(err, ==, 0); | 1344 ASSERT0(err); |
1345 dsl_dir_name(dd, newname); 1346#ifdef _KERNEL 1347 zfsvfs_update_fromname(oldname, newname); 1348 zvol_rename_minors(oldname, newname); 1349#endif 1350 1351 spa_history_log_internal(LOG_DS_RENAME, dd->dd_pool->dp_spa, 1352 tx, "dataset = %llu", dd->dd_phys->dd_head_dataset_obj); --- 73 unchanged lines hidden --- | 1345 dsl_dir_name(dd, newname); 1346#ifdef _KERNEL 1347 zfsvfs_update_fromname(oldname, newname); 1348 zvol_rename_minors(oldname, newname); 1349#endif 1350 1351 spa_history_log_internal(LOG_DS_RENAME, dd->dd_pool->dp_spa, 1352 tx, "dataset = %llu", dd->dd_phys->dd_head_dataset_obj); --- 73 unchanged lines hidden --- |