Mercurial > illumos > illumos-gate
comparison usr/src/uts/common/fs/zfs/dsl_dir.c @ 13765:9410cf539b11
backout 3006: causes 3046 (panics after mounting root)
author | Richard Lowe <richlowe@richlowe.net> |
---|---|
date | Wed, 01 Aug 2012 16:40:39 -0400 |
parents | 38b4aca480b3 |
children | cd512c80fd75 |
comparison
equal
deleted
inserted
replaced
13764:38b4aca480b3 | 13765:9410cf539b11 |
---|---|
489 * Remove our reservation. The impl() routine avoids setting the | 489 * Remove our reservation. The impl() routine avoids setting the |
490 * actual property, which would require the (already destroyed) ds. | 490 * actual property, which would require the (already destroyed) ds. |
491 */ | 491 */ |
492 dsl_dir_set_reservation_sync_impl(dd, 0, tx); | 492 dsl_dir_set_reservation_sync_impl(dd, 0, tx); |
493 | 493 |
494 ASSERT0(dd->dd_phys->dd_used_bytes); | 494 ASSERT3U(dd->dd_phys->dd_used_bytes, ==, 0); |
495 ASSERT0(dd->dd_phys->dd_reserved); | 495 ASSERT3U(dd->dd_phys->dd_reserved, ==, 0); |
496 for (t = 0; t < DD_USED_NUM; t++) | 496 for (t = 0; t < DD_USED_NUM; t++) |
497 ASSERT0(dd->dd_phys->dd_used_breakdown[t]); | 497 ASSERT3U(dd->dd_phys->dd_used_breakdown[t], ==, 0); |
498 | 498 |
499 VERIFY(0 == zap_destroy(mos, dd->dd_phys->dd_child_dir_zapobj, tx)); | 499 VERIFY(0 == zap_destroy(mos, dd->dd_phys->dd_child_dir_zapobj, tx)); |
500 VERIFY(0 == zap_destroy(mos, dd->dd_phys->dd_props_zapobj, tx)); | 500 VERIFY(0 == zap_destroy(mos, dd->dd_phys->dd_props_zapobj, tx)); |
501 VERIFY(0 == dsl_deleg_destroy(mos, dd->dd_phys->dd_deleg_zapobj, tx)); | 501 VERIFY(0 == dsl_deleg_destroy(mos, dd->dd_phys->dd_deleg_zapobj, tx)); |
502 VERIFY(0 == zap_remove(mos, | 502 VERIFY(0 == zap_remove(mos, |
583 ASSERT(dmu_tx_is_syncing(tx)); | 583 ASSERT(dmu_tx_is_syncing(tx)); |
584 | 584 |
585 dmu_buf_will_dirty(dd->dd_dbuf, tx); | 585 dmu_buf_will_dirty(dd->dd_dbuf, tx); |
586 | 586 |
587 mutex_enter(&dd->dd_lock); | 587 mutex_enter(&dd->dd_lock); |
588 ASSERT0(dd->dd_tempreserved[tx->tx_txg&TXG_MASK]); | 588 ASSERT3U(dd->dd_tempreserved[tx->tx_txg&TXG_MASK], ==, 0); |
589 dprintf_dd(dd, "txg=%llu towrite=%lluK\n", tx->tx_txg, | 589 dprintf_dd(dd, "txg=%llu towrite=%lluK\n", tx->tx_txg, |
590 dd->dd_space_towrite[tx->tx_txg&TXG_MASK] / 1024); | 590 dd->dd_space_towrite[tx->tx_txg&TXG_MASK] / 1024); |
591 dd->dd_space_towrite[tx->tx_txg&TXG_MASK] = 0; | 591 dd->dd_space_towrite[tx->tx_txg&TXG_MASK] = 0; |
592 mutex_exit(&dd->dd_lock); | 592 mutex_exit(&dd->dd_lock); |
593 | 593 |
1332 dmu_buf_will_dirty(dd->dd_dbuf, tx); | 1332 dmu_buf_will_dirty(dd->dd_dbuf, tx); |
1333 | 1333 |
1334 /* remove from old parent zapobj */ | 1334 /* remove from old parent zapobj */ |
1335 err = zap_remove(mos, dd->dd_parent->dd_phys->dd_child_dir_zapobj, | 1335 err = zap_remove(mos, dd->dd_parent->dd_phys->dd_child_dir_zapobj, |
1336 dd->dd_myname, tx); | 1336 dd->dd_myname, tx); |
1337 ASSERT0(err); | 1337 ASSERT3U(err, ==, 0); |
1338 | 1338 |
1339 (void) strcpy(dd->dd_myname, ra->mynewname); | 1339 (void) strcpy(dd->dd_myname, ra->mynewname); |
1340 dsl_dir_close(dd->dd_parent, dd); | 1340 dsl_dir_close(dd->dd_parent, dd); |
1341 dd->dd_phys->dd_parent_obj = ra->newparent->dd_object; | 1341 dd->dd_phys->dd_parent_obj = ra->newparent->dd_object; |
1342 VERIFY(0 == dsl_dir_open_obj(dd->dd_pool, | 1342 VERIFY(0 == dsl_dir_open_obj(dd->dd_pool, |
1343 ra->newparent->dd_object, NULL, dd, &dd->dd_parent)); | 1343 ra->newparent->dd_object, NULL, dd, &dd->dd_parent)); |
1344 | 1344 |
1345 /* add to new parent zapobj */ | 1345 /* add to new parent zapobj */ |
1346 err = zap_add(mos, ra->newparent->dd_phys->dd_child_dir_zapobj, | 1346 err = zap_add(mos, ra->newparent->dd_phys->dd_child_dir_zapobj, |
1347 dd->dd_myname, 8, 1, &dd->dd_object, tx); | 1347 dd->dd_myname, 8, 1, &dd->dd_object, tx); |
1348 ASSERT0(err); | 1348 ASSERT3U(err, ==, 0); |
1349 | 1349 |
1350 } | 1350 } |
1351 | 1351 |
1352 int | 1352 int |
1353 dsl_dir_rename(dsl_dir_t *dd, const char *newname) | 1353 dsl_dir_rename(dsl_dir_t *dd, const char *newname) |