Lines 404-407
Link Here
|
404 |
} |
404 |
} |
405 |
|
405 |
|
|
|
406 |
/* |
407 |
* We've managed to open the dataset and gather statistics. Determine |
408 |
* the high-level type. |
409 |
*/ |
410 |
if (zhp->zfs_dmustats.dds_type == DMU_OST_ZVOL) |
411 |
zhp->zfs_head_type = ZFS_TYPE_VOLUME; |
412 |
else if (zhp->zfs_dmustats.dds_type == DMU_OST_ZFS) |
413 |
zhp->zfs_head_type = ZFS_TYPE_FILESYSTEM; |
414 |
else |
415 |
zhp->zfs_dmustats.dds_inconsistent = 1; |
416 |
|
417 |
if (zhp->zfs_dmustats.dds_is_snapshot) |
418 |
zhp->zfs_type = ZFS_TYPE_SNAPSHOT; |
419 |
else if (zhp->zfs_dmustats.dds_type == DMU_OST_ZVOL) |
420 |
zhp->zfs_type = ZFS_TYPE_VOLUME; |
421 |
else if (zhp->zfs_dmustats.dds_type == DMU_OST_ZFS) |
422 |
zhp->zfs_type = ZFS_TYPE_FILESYSTEM; |
423 |
else |
424 |
zhp->zfs_dmustats.dds_inconsistent = 1; |
425 |
|
406 |
if (zhp->zfs_dmustats.dds_inconsistent) { |
426 |
if (zhp->zfs_dmustats.dds_inconsistent) { |
407 |
zfs_cmd_t zc = { 0 }; |
427 |
zfs_cmd_t zc = { 0 }; |
Lines 446-469
Link Here
|
446 |
} |
466 |
} |
447 |
|
467 |
|
448 |
/* |
|
|
449 |
* We've managed to open the dataset and gather statistics. Determine |
450 |
* the high-level type. |
451 |
*/ |
452 |
if (zhp->zfs_dmustats.dds_type == DMU_OST_ZVOL) |
453 |
zhp->zfs_head_type = ZFS_TYPE_VOLUME; |
454 |
else if (zhp->zfs_dmustats.dds_type == DMU_OST_ZFS) |
455 |
zhp->zfs_head_type = ZFS_TYPE_FILESYSTEM; |
456 |
else |
457 |
abort(); |
458 |
|
459 |
if (zhp->zfs_dmustats.dds_is_snapshot) |
460 |
zhp->zfs_type = ZFS_TYPE_SNAPSHOT; |
461 |
else if (zhp->zfs_dmustats.dds_type == DMU_OST_ZVOL) |
462 |
zhp->zfs_type = ZFS_TYPE_VOLUME; |
463 |
else if (zhp->zfs_dmustats.dds_type == DMU_OST_ZFS) |
464 |
zhp->zfs_type = ZFS_TYPE_FILESYSTEM; |
465 |
else |
466 |
abort(); /* we should never see any other types */ |
467 |
|
468 |
zhp->zfs_hdl->libzfs_log_str = logstr; |
468 |
zhp->zfs_hdl->libzfs_log_str = logstr; |
469 |
zhp->zpool_hdl = zpool_handle(zhp); |
469 |
zhp->zpool_hdl = zpool_handle(zhp); |