equal
deleted
inserted
replaced
38 #include <sys/dmu_tx.h> |
38 #include <sys/dmu_tx.h> |
39 #include <sys/zap.h> |
39 #include <sys/zap.h> |
40 #include <sys/zil.h> |
40 #include <sys/zil.h> |
41 #include <sys/dmu_impl.h> |
41 #include <sys/dmu_impl.h> |
42 #include <sys/zfs_ioctl.h> |
42 #include <sys/zfs_ioctl.h> |
|
43 #include <sys/sunddi.h> |
43 |
44 |
44 spa_t * |
45 spa_t * |
45 dmu_objset_spa(objset_t *os) |
46 dmu_objset_spa(objset_t *os) |
46 { |
47 { |
47 return (os->os_spa); |
48 return (os->os_spa); |
1380 zap_cursor_retrieve(&zc, attr) == 0; |
1381 zap_cursor_retrieve(&zc, attr) == 0; |
1381 (void) zap_cursor_advance(&zc)) { |
1382 (void) zap_cursor_advance(&zc)) { |
1382 ASSERT(attr->za_integer_length == sizeof (uint64_t)); |
1383 ASSERT(attr->za_integer_length == sizeof (uint64_t)); |
1383 ASSERT(attr->za_num_integers == 1); |
1384 ASSERT(attr->za_num_integers == 1); |
1384 |
1385 |
1385 child = kmem_alloc(MAXPATHLEN, KM_SLEEP); |
1386 child = kmem_asprintf("%s/%s", name, attr->za_name); |
1386 (void) strcpy(child, name); |
|
1387 (void) strcat(child, "/"); |
|
1388 (void) strcat(child, attr->za_name); |
|
1389 err = dmu_objset_find_spa(spa, child, func, arg, flags); |
1387 err = dmu_objset_find_spa(spa, child, func, arg, flags); |
1390 kmem_free(child, MAXPATHLEN); |
1388 strfree(child); |
1391 if (err) |
1389 if (err) |
1392 break; |
1390 break; |
1393 } |
1391 } |
1394 zap_cursor_fini(&zc); |
1392 zap_cursor_fini(&zc); |
1395 |
1393 |
1419 (void) zap_cursor_advance(&zc)) { |
1417 (void) zap_cursor_advance(&zc)) { |
1420 ASSERT(attr->za_integer_length == |
1418 ASSERT(attr->za_integer_length == |
1421 sizeof (uint64_t)); |
1419 sizeof (uint64_t)); |
1422 ASSERT(attr->za_num_integers == 1); |
1420 ASSERT(attr->za_num_integers == 1); |
1423 |
1421 |
1424 child = kmem_alloc(MAXPATHLEN, KM_SLEEP); |
1422 child = kmem_asprintf("%s@%s", |
1425 (void) strcpy(child, name); |
1423 name, attr->za_name); |
1426 (void) strcat(child, "@"); |
|
1427 (void) strcat(child, attr->za_name); |
|
1428 err = func(spa, attr->za_first_integer, |
1424 err = func(spa, attr->za_first_integer, |
1429 child, arg); |
1425 child, arg); |
1430 kmem_free(child, MAXPATHLEN); |
1426 strfree(child); |
1431 if (err) |
1427 if (err) |
1432 break; |
1428 break; |
1433 } |
1429 } |
1434 zap_cursor_fini(&zc); |
1430 zap_cursor_fini(&zc); |
1435 } |
1431 } |