| 353 | } |
| 354 | |
| 355 | void |
| 356 | dmu_objset_byteswap(void *buf, size_t size) |
| 357 | { |
| 358 | objset_phys_t *osp = buf; |
| 359 | |
| 360 | ASSERT(size == OBJSET_PHYS_SIZE_V1 || size == OBJSET_PHYS_SIZE_V2 || |
| 361 | size == sizeof (objset_phys_t)); |
| 362 | dnode_byteswap(&osp->os_meta_dnode); |
| 363 | byteswap_uint64_array(&osp->os_zil_header, sizeof (zil_header_t)); |
| 364 | osp->os_type = BSWAP_64(osp->os_type); |
| 365 | osp->os_flags = BSWAP_64(osp->os_flags); |
| 366 | if (size >= OBJSET_PHYS_SIZE_V2) { |
| 367 | dnode_byteswap(&osp->os_userused_dnode); |
| 368 | dnode_byteswap(&osp->os_groupused_dnode); |
| 369 | if (size >= sizeof (objset_phys_t)) |
| 370 | dnode_byteswap(&osp->os_projectused_dnode); |
| 371 | } |
| 372 | } |
| 373 | |
| 374 | /* |
| 375 | * The hash is a CRC-based hash of the objset_t pointer and the object number. |
nothing calls this directly
no test coverage detected