Lines Matching full:dn

175 dmu_buf_hold_noread_by_dnode(dnode_t *dn, uint64_t offset,  in dmu_buf_hold_noread_by_dnode()  argument
181 rw_enter(&dn->dn_struct_rwlock, RW_READER); in dmu_buf_hold_noread_by_dnode()
182 blkid = dbuf_whichblock(dn, 0, offset); in dmu_buf_hold_noread_by_dnode()
183 db = dbuf_hold(dn, blkid, tag); in dmu_buf_hold_noread_by_dnode()
184 rw_exit(&dn->dn_struct_rwlock); in dmu_buf_hold_noread_by_dnode()
199 dnode_t *dn; in dmu_buf_hold_noread() local
204 err = dnode_hold(os, object, FTAG, &dn); in dmu_buf_hold_noread()
207 rw_enter(&dn->dn_struct_rwlock, RW_READER); in dmu_buf_hold_noread()
208 blkid = dbuf_whichblock(dn, 0, offset); in dmu_buf_hold_noread()
209 db = dbuf_hold(dn, blkid, tag); in dmu_buf_hold_noread()
210 rw_exit(&dn->dn_struct_rwlock); in dmu_buf_hold_noread()
211 dnode_rele(dn, FTAG); in dmu_buf_hold_noread()
223 dmu_buf_hold_by_dnode(dnode_t *dn, uint64_t offset, in dmu_buf_hold_by_dnode() argument
234 err = dmu_buf_hold_noread_by_dnode(dn, offset, tag, dbp); in dmu_buf_hold_by_dnode()
282 dnode_t *dn; in dmu_set_bonus() local
289 dn = DB_DNODE(db); in dmu_set_bonus()
291 if (dn->dn_bonus != db) { in dmu_set_bonus()
294 dnode_setbonuslen(dn, newsize, tx); in dmu_set_bonus()
306 dnode_t *dn; in dmu_set_bonustype() local
313 dn = DB_DNODE(db); in dmu_set_bonustype()
315 if (dn->dn_bonus != db) { in dmu_set_bonustype()
318 dnode_setbonus_type(dn, type, tx); in dmu_set_bonustype()
342 dnode_t *dn; in dmu_rm_spill() local
345 error = dnode_hold(os, object, FTAG, &dn); in dmu_rm_spill()
346 dbuf_rm_spill(dn, tx); in dmu_rm_spill()
347 rw_enter(&dn->dn_struct_rwlock, RW_WRITER); in dmu_rm_spill()
348 dnode_rm_spill(dn, tx); in dmu_rm_spill()
349 rw_exit(&dn->dn_struct_rwlock); in dmu_rm_spill()
350 dnode_rele(dn, FTAG); in dmu_rm_spill()
359 int dmu_bonus_hold_by_dnode(dnode_t *dn, const void *tag, dmu_buf_t **dbp, in dmu_bonus_hold_by_dnode() argument
371 rw_enter(&dn->dn_struct_rwlock, RW_READER); in dmu_bonus_hold_by_dnode()
372 if (dn->dn_bonus == NULL) { in dmu_bonus_hold_by_dnode()
373 if (!rw_tryupgrade(&dn->dn_struct_rwlock)) { in dmu_bonus_hold_by_dnode()
374 rw_exit(&dn->dn_struct_rwlock); in dmu_bonus_hold_by_dnode()
375 rw_enter(&dn->dn_struct_rwlock, RW_WRITER); in dmu_bonus_hold_by_dnode()
377 if (dn->dn_bonus == NULL) in dmu_bonus_hold_by_dnode()
378 dbuf_create_bonus(dn); in dmu_bonus_hold_by_dnode()
380 db = dn->dn_bonus; in dmu_bonus_hold_by_dnode()
384 VERIFY(dnode_add_ref(dn, db)); in dmu_bonus_hold_by_dnode()
385 atomic_inc_32(&dn->dn_dbufs_count); in dmu_bonus_hold_by_dnode()
393 rw_exit(&dn->dn_struct_rwlock); in dmu_bonus_hold_by_dnode()
397 dnode_evict_bonus(dn); in dmu_bonus_hold_by_dnode()
410 dnode_t *dn; in dmu_bonus_hold() local
413 error = dnode_hold(os, object, FTAG, &dn); in dmu_bonus_hold()
417 error = dmu_bonus_hold_by_dnode(dn, tag, dbp, DMU_READ_NO_PREFETCH); in dmu_bonus_hold()
418 dnode_rele(dn, FTAG); in dmu_bonus_hold()
433 dmu_spill_hold_by_dnode(dnode_t *dn, uint32_t flags, const void *tag, in dmu_spill_hold_by_dnode() argument
440 rw_enter(&dn->dn_struct_rwlock, RW_READER); in dmu_spill_hold_by_dnode()
442 db = dbuf_hold(dn, DMU_SPILL_BLKID, tag); in dmu_spill_hold_by_dnode()
445 rw_exit(&dn->dn_struct_rwlock); in dmu_spill_hold_by_dnode()
465 dnode_t *dn; in dmu_spill_hold_existing() local
469 dn = DB_DNODE(db); in dmu_spill_hold_existing()
471 if (spa_version(dn->dn_objset->os_spa) < SPA_VERSION_SA) { in dmu_spill_hold_existing()
474 rw_enter(&dn->dn_struct_rwlock, RW_READER); in dmu_spill_hold_existing()
476 if (!dn->dn_have_spill) { in dmu_spill_hold_existing()
479 err = dmu_spill_hold_by_dnode(dn, in dmu_spill_hold_existing()
483 rw_exit(&dn->dn_struct_rwlock); in dmu_spill_hold_existing()
515 dmu_buf_hold_array_by_dnode(dnode_t *dn, uint64_t offset, uint64_t length, in dmu_buf_hold_array_by_dnode() argument
540 rw_enter(&dn->dn_struct_rwlock, RW_READER); in dmu_buf_hold_array_by_dnode()
541 if (dn->dn_datablkshift) { in dmu_buf_hold_array_by_dnode()
542 int blkshift = dn->dn_datablkshift; in dmu_buf_hold_array_by_dnode()
547 if (offset + length > dn->dn_datablksz) { in dmu_buf_hold_array_by_dnode()
550 (longlong_t)dn->dn_objset-> in dmu_buf_hold_array_by_dnode()
552 (longlong_t)dn->dn_object, dn->dn_datablksz, in dmu_buf_hold_array_by_dnode()
554 rw_exit(&dn->dn_struct_rwlock); in dmu_buf_hold_array_by_dnode()
562 zio = zio_root(dn->dn_objset->os_spa, NULL, NULL, in dmu_buf_hold_array_by_dnode()
564 blkid = dbuf_whichblock(dn, 0, offset); in dmu_buf_hold_array_by_dnode()
571 zs = dmu_zfetch_prepare(&dn->dn_zfetch, blkid, nblks, read, in dmu_buf_hold_array_by_dnode()
575 dmu_buf_impl_t *db = dbuf_hold(dn, blkid + i, tag); in dmu_buf_hold_array_by_dnode()
578 dmu_zfetch_run(&dn->dn_zfetch, zs, missed, in dmu_buf_hold_array_by_dnode()
581 rw_exit(&dn->dn_struct_rwlock); in dmu_buf_hold_array_by_dnode()
597 if (i == nblks - 1 && blkid + i < dn->dn_maxblkid && in dmu_buf_hold_array_by_dnode()
621 zfs_racct_write(dn->dn_objset->os_spa, length, nblks, flags); in dmu_buf_hold_array_by_dnode()
624 dmu_zfetch_run(&dn->dn_zfetch, zs, missed, B_TRUE); in dmu_buf_hold_array_by_dnode()
625 rw_exit(&dn->dn_struct_rwlock); in dmu_buf_hold_array_by_dnode()
662 dnode_t *dn; in dmu_buf_hold_array() local
665 err = dnode_hold(os, object, FTAG, &dn); in dmu_buf_hold_array()
669 err = dmu_buf_hold_array_by_dnode(dn, offset, length, read, tag, in dmu_buf_hold_array()
672 dnode_rele(dn, FTAG); in dmu_buf_hold_array()
727 dnode_t *dn; in dmu_prefetch() local
734 if (dnode_hold(os, object, FTAG, &dn) != 0) in dmu_prefetch()
737 dmu_prefetch_by_dnode(dn, level, offset, len, pri); in dmu_prefetch()
739 dnode_rele(dn, FTAG); in dmu_prefetch()
743 dmu_prefetch_by_dnode(dnode_t *dn, int64_t level, uint64_t offset, in dmu_prefetch_by_dnode() argument
753 rw_enter(&dn->dn_struct_rwlock, RW_READER); in dmu_prefetch_by_dnode()
754 if (dn->dn_datablkshift != 0) { in dmu_prefetch_by_dnode()
760 start = dbuf_whichblock(dn, level, offset); in dmu_prefetch_by_dnode()
761 end2 = dbuf_whichblock(dn, level, offset + len - 1) + 1; in dmu_prefetch_by_dnode()
762 uint8_t ibs = dn->dn_indblkshift; in dmu_prefetch_by_dnode()
763 uint8_t bs = (level == 0) ? dn->dn_datablkshift : ibs; in dmu_prefetch_by_dnode()
780 end = start + (level == 0 && offset < dn->dn_datablksz); in dmu_prefetch_by_dnode()
784 dbuf_prefetch(dn, level, i, pri, 0); in dmu_prefetch_by_dnode()
786 dbuf_prefetch(dn, level2, i, pri, 0); in dmu_prefetch_by_dnode()
787 rw_exit(&dn->dn_struct_rwlock); in dmu_prefetch_by_dnode()
812 dmu_prefetch_wait_by_dnode(dnode_t *dn, uint64_t offset, uint64_t len) in dmu_prefetch_wait_by_dnode() argument
819 rw_enter(&dn->dn_struct_rwlock, RW_READER); in dmu_prefetch_wait_by_dnode()
821 uint64_t start = dbuf_whichblock(dn, 0, offset); in dmu_prefetch_wait_by_dnode()
822 uint64_t end = dbuf_whichblock(dn, 0, offset + len - 1) + 1; in dmu_prefetch_wait_by_dnode()
826 (void) dbuf_prefetch_impl(dn, 0, blk, ZIO_PRIORITY_ASYNC_READ, in dmu_prefetch_wait_by_dnode()
830 rw_exit(&dn->dn_struct_rwlock); in dmu_prefetch_wait_by_dnode()
853 dnode_t *dn; in dmu_prefetch_wait() local
856 err = dnode_hold(os, object, FTAG, &dn); in dmu_prefetch_wait()
864 if (dn->dn_indblkshift) { in dmu_prefetch_wait()
865 uint64_t nbps = bp_span_in_blocks(dn->dn_indblkshift, 1); in dmu_prefetch_wait()
866 chunksize = (nbps * 16) << dn->dn_datablkshift; in dmu_prefetch_wait()
868 chunksize = dn->dn_datablksz; in dmu_prefetch_wait()
874 dmu_prefetch_wait_by_dnode(dn, offset, mylen); in dmu_prefetch_wait()
885 dnode_rele(dn, FTAG); in dmu_prefetch_wait()
899 dnode_t *dn = DMU_META_DNODE(os); in dmu_prefetch_dnode() local
900 rw_enter(&dn->dn_struct_rwlock, RW_READER); in dmu_prefetch_dnode()
901 uint64_t blkid = dbuf_whichblock(dn, 0, object * sizeof (dnode_phys_t)); in dmu_prefetch_dnode()
902 dbuf_prefetch(dn, 0, blkid, pri, 0); in dmu_prefetch_dnode()
903 rw_exit(&dn->dn_struct_rwlock); in dmu_prefetch_dnode()
918 get_next_chunk(dnode_t *dn, uint64_t *start, uint64_t minimum, uint64_t *l1blks) in get_next_chunk() argument
921 uint64_t maxblks = DMU_MAX_ACCESS >> (dn->dn_indblkshift + 1); in get_next_chunk()
923 uint64_t iblkrange = (uint64_t)dn->dn_datablksz * in get_next_chunk()
924 EPB(dn->dn_indblkshift, SPA_BLKPTRSHIFT); in get_next_chunk()
929 if (dn->dn_nlevels <= 1) { in get_next_chunk()
962 err = dnode_next_offset(dn, in get_next_chunk()
1002 dmu_free_long_range_impl(objset_t *os, dnode_t *dn, uint64_t offset, in dmu_free_long_range_impl() argument
1010 if (dn == NULL) in dmu_free_long_range_impl()
1013 object_size = (dn->dn_maxblkid + 1) * dn->dn_datablksz; in dmu_free_long_range_impl()
1031 if (dmu_objset_zfs_unmounting(dn->dn_objset)) in dmu_free_long_range_impl()
1037 err = get_next_chunk(dn, &chunk_begin, offset, &l1blks); in dmu_free_long_range_impl()
1046 dmu_tx_hold_free(tx, dn->dn_object, chunk_begin, chunk_len); in dmu_free_long_range_impl()
1091 l1blks << dn->dn_indblkshift; in dmu_free_long_range_impl()
1096 dnode_free_range(dn, chunk_begin, chunk_len, tx); in dmu_free_long_range_impl()
1109 dnode_t *dn; in dmu_free_long_range() local
1112 err = dnode_hold(os, object, FTAG, &dn); in dmu_free_long_range()
1115 err = dmu_free_long_range_impl(os, dn, offset, length); in dmu_free_long_range()
1124 dn->dn_maxblkid = 0; in dmu_free_long_range()
1126 dnode_rele(dn, FTAG); in dmu_free_long_range()
1159 dnode_t *dn; in dmu_free_range() local
1160 int err = dnode_hold(os, object, FTAG, &dn); in dmu_free_range()
1165 dnode_free_range(dn, offset, size, tx); in dmu_free_range()
1166 dnode_rele(dn, FTAG); in dmu_free_range()
1171 dmu_read_impl(dnode_t *dn, uint64_t offset, uint64_t size, in dmu_read_impl() argument
1182 if (dn->dn_maxblkid == 0) { in dmu_read_impl()
1183 uint64_t newsz = offset > dn->dn_datablksz ? 0 : in dmu_read_impl()
1184 MIN(size, dn->dn_datablksz - offset); in dmu_read_impl()
1196 err = dmu_read_abd(dn, offset, size, data, flags); in dmu_read_impl()
1209 err = dmu_buf_hold_array_by_dnode(dn, offset, mylen, in dmu_read_impl()
1240 dnode_t *dn; in dmu_read() local
1243 err = dnode_hold(os, object, FTAG, &dn); in dmu_read()
1247 err = dmu_read_impl(dn, offset, size, buf, flags); in dmu_read()
1248 dnode_rele(dn, FTAG); in dmu_read()
1253 dmu_read_by_dnode(dnode_t *dn, uint64_t offset, uint64_t size, void *buf, in dmu_read_by_dnode() argument
1256 return (dmu_read_impl(dn, offset, size, buf, flags)); in dmu_read_by_dnode()
1315 dmu_write_by_dnode_flags(dnode_t *dn, uint64_t offset, uint64_t size, in dmu_write_by_dnode_flags() argument
1327 zfs_dio_aligned(offset, size, dn->dn_datablksz)) { in dmu_write_by_dnode_flags()
1329 error = dmu_write_abd(dn, offset, size, data, DMU_DIRECTIO, tx); in dmu_write_by_dnode_flags()
1334 VERIFY0(dmu_buf_hold_array_by_dnode(dn, offset, size, in dmu_write_by_dnode_flags()
1342 dmu_write_by_dnode(dnode_t *dn, uint64_t offset, uint64_t size, in dmu_write_by_dnode() argument
1345 return (dmu_write_by_dnode_flags(dn, offset, size, buf, tx, 0)); in dmu_write_by_dnode()
1404 dmu_read_uio_dnode(dnode_t *dn, zfs_uio_t *uio, uint64_t size) in dmu_read_uio_dnode() argument
1410 return (dmu_read_uio_direct(dn, uio, size)); in dmu_read_uio_dnode()
1416 err = dmu_buf_hold_array_by_dnode(dn, zfs_uio_offset(uio), size, in dmu_read_uio_dnode()
1478 dnode_t *dn; in dmu_read_uio() local
1484 err = dnode_hold(os, object, FTAG, &dn); in dmu_read_uio()
1488 err = dmu_read_uio_dnode(dn, uio, size); in dmu_read_uio()
1490 dnode_rele(dn, FTAG); in dmu_read_uio()
1496 dmu_write_uio_dnode(dnode_t *dn, zfs_uio_t *uio, uint64_t size, dmu_tx_t *tx) in dmu_write_uio_dnode() argument
1511 (write_size >= dn->dn_datablksz)) { in dmu_write_uio_dnode()
1513 dn->dn_datablksz)) { in dmu_write_uio_dnode()
1514 return (dmu_write_uio_direct(dn, uio, size, tx)); in dmu_write_uio_dnode()
1515 } else if (write_size > dn->dn_datablksz && in dmu_write_uio_dnode()
1517 dn->dn_datablksz)) { in dmu_write_uio_dnode()
1519 dn->dn_datablksz * (write_size / dn->dn_datablksz); in dmu_write_uio_dnode()
1520 err = dmu_write_uio_direct(dn, uio, write_size, tx); in dmu_write_uio_dnode()
1529 P2PHASE(zfs_uio_offset(uio), dn->dn_datablksz); in dmu_write_uio_dnode()
1533 err = dmu_buf_hold_array_by_dnode(dn, zfs_uio_offset(uio), write_size, in dmu_write_uio_dnode()
1618 dnode_t *dn; in dmu_write_uio() local
1624 err = dnode_hold(os, object, FTAG, &dn); in dmu_write_uio()
1628 err = dmu_write_uio_dnode(dn, uio, size, tx); in dmu_write_uio()
1630 dnode_rele(dn, FTAG); in dmu_write_uio()
1670 dnode_t *dn; in dmu_object_cached_size() local
1676 if (dnode_hold(os, object, FTAG, &dn) != 0) in dmu_object_cached_size()
1679 if (dn->dn_nlevels < 2) { in dmu_object_cached_size()
1680 dnode_rele(dn, FTAG); in dmu_object_cached_size()
1684 dmu_object_info_from_dnode(dn, &doi); in dmu_object_cached_size()
1689 dmu_prefetch_by_dnode(dn, 1, off, in dmu_object_cached_size()
1697 uint_t nbps = bp_span_in_blocks(dn->dn_indblkshift, 1); in dmu_object_cached_size()
1698 uint64_t l1blks = 1 + (dn->dn_maxblkid / nbps); in dmu_object_cached_size()
1700 rw_enter(&dn->dn_struct_rwlock, RW_READER); in dmu_object_cached_size()
1718 err = dbuf_hold_impl(dn, 1, blk, B_TRUE, B_FALSE, FTAG, &db); in dmu_object_cached_size()
1738 rw_exit(&dn->dn_struct_rwlock); in dmu_object_cached_size()
1740 dnode_rele(dn, FTAG); in dmu_object_cached_size()
1778 dmu_lightweight_write_by_dnode(dnode_t *dn, uint64_t offset, abd_t *abd, in dmu_lightweight_write_by_dnode() argument
1782 dbuf_dirty_lightweight(dn, dbuf_whichblock(dn, 0, offset), tx); in dmu_lightweight_write_by_dnode()
1797 dmu_assign_arcbuf_by_dnode(dnode_t *dn, uint64_t offset, arc_buf_t *buf, in dmu_assign_arcbuf_by_dnode() argument
1801 objset_t *os = dn->dn_objset; in dmu_assign_arcbuf_by_dnode()
1802 uint64_t object = dn->dn_object; in dmu_assign_arcbuf_by_dnode()
1806 rw_enter(&dn->dn_struct_rwlock, RW_READER); in dmu_assign_arcbuf_by_dnode()
1807 blkid = dbuf_whichblock(dn, 0, offset); in dmu_assign_arcbuf_by_dnode()
1808 db = dbuf_hold(dn, blkid, FTAG); in dmu_assign_arcbuf_by_dnode()
1809 rw_exit(&dn->dn_struct_rwlock); in dmu_assign_arcbuf_by_dnode()
2221 dnode_t *dn; in dmu_object_set_nlevels() local
2224 err = dnode_hold(os, object, FTAG, &dn); in dmu_object_set_nlevels()
2227 err = dnode_set_nlevels(dn, nlevels, tx); in dmu_object_set_nlevels()
2228 dnode_rele(dn, FTAG); in dmu_object_set_nlevels()
2236 dnode_t *dn; in dmu_object_set_blocksize() local
2239 err = dnode_hold(os, object, FTAG, &dn); in dmu_object_set_blocksize()
2242 err = dnode_set_blksz(dn, size, ibs, tx); in dmu_object_set_blocksize()
2243 dnode_rele(dn, FTAG); in dmu_object_set_blocksize()
2251 dnode_t *dn; in dmu_object_set_maxblkid() local
2254 err = dnode_hold(os, object, FTAG, &dn); in dmu_object_set_maxblkid()
2257 rw_enter(&dn->dn_struct_rwlock, RW_WRITER); in dmu_object_set_maxblkid()
2258 dnode_new_blkid(dn, maxblkid, tx, B_FALSE, B_TRUE); in dmu_object_set_maxblkid()
2259 rw_exit(&dn->dn_struct_rwlock); in dmu_object_set_maxblkid()
2260 dnode_rele(dn, FTAG); in dmu_object_set_maxblkid()
2268 dnode_t *dn; in dmu_object_set_checksum() local
2277 VERIFY0(dnode_hold(os, object, FTAG, &dn)); in dmu_object_set_checksum()
2279 dn->dn_checksum = checksum; in dmu_object_set_checksum()
2280 dnode_setdirty(dn, tx); in dmu_object_set_checksum()
2281 dnode_rele(dn, FTAG); in dmu_object_set_checksum()
2288 dnode_t *dn; in dmu_object_set_compress() local
2297 VERIFY0(dnode_hold(os, object, FTAG, &dn)); in dmu_object_set_compress()
2298 dn->dn_compress = compress; in dmu_object_set_compress()
2299 dnode_setdirty(dn, tx); in dmu_object_set_compress()
2300 dnode_rele(dn, FTAG); in dmu_object_set_compress()
2310 dmu_write_policy(objset_t *os, dnode_t *dn, int level, int wp, zio_prop_t *zp) in dmu_write_policy() argument
2312 dmu_object_type_t type = dn ? dn->dn_type : DMU_OT_OBJSET; in dmu_write_policy()
2381 dn ? dn->dn_storage_type : DMU_OT_NONE; in dmu_write_policy()
2404 compress = zio_compress_select(os->os_spa, dn->dn_compress, in dmu_write_policy()
2410 zio_checksum_select(dn->dn_checksum, checksum) : in dmu_write_policy()
2468 zp->zp_type = (wp & WP_SPILL) ? dn->dn_bonustype : type; in dmu_write_policy()
2482 zp->zp_storage_type = dn ? dn->dn_storage_type : DMU_OT_NONE; in dmu_write_policy()
2498 dnode_t *dn; in dmu_offset_next() local
2502 err = dnode_hold(os, object, FTAG, &dn); in dmu_offset_next()
2506 rw_enter(&dn->dn_struct_rwlock, RW_READER); in dmu_offset_next()
2508 if (dnode_is_dirty(dn)) { in dmu_offset_next()
2520 rw_exit(&dn->dn_struct_rwlock); in dmu_offset_next()
2521 dnode_rele(dn, FTAG); in dmu_offset_next()
2533 err = dnode_next_offset(dn, DNODE_FIND_HAVELOCK | in dmu_offset_next()
2537 rw_exit(&dn->dn_struct_rwlock); in dmu_offset_next()
2538 dnode_rele(dn, FTAG); in dmu_offset_next()
2722 __dmu_object_info_from_dnode(dnode_t *dn, dmu_object_info_t *doi) in __dmu_object_info_from_dnode() argument
2724 dnode_phys_t *dnp = dn->dn_phys; in __dmu_object_info_from_dnode()
2726 doi->doi_data_block_size = dn->dn_datablksz; in __dmu_object_info_from_dnode()
2727 doi->doi_metadata_block_size = dn->dn_indblkshift ? in __dmu_object_info_from_dnode()
2728 1ULL << dn->dn_indblkshift : 0; in __dmu_object_info_from_dnode()
2729 doi->doi_type = dn->dn_type; in __dmu_object_info_from_dnode()
2730 doi->doi_bonus_type = dn->dn_bonustype; in __dmu_object_info_from_dnode()
2731 doi->doi_bonus_size = dn->dn_bonuslen; in __dmu_object_info_from_dnode()
2732 doi->doi_dnodesize = dn->dn_num_slots << DNODE_SHIFT; in __dmu_object_info_from_dnode()
2733 doi->doi_indirection = dn->dn_nlevels; in __dmu_object_info_from_dnode()
2734 doi->doi_checksum = dn->dn_checksum; in __dmu_object_info_from_dnode()
2735 doi->doi_compress = dn->dn_compress; in __dmu_object_info_from_dnode()
2736 doi->doi_nblkptr = dn->dn_nblkptr; in __dmu_object_info_from_dnode()
2738 doi->doi_max_offset = (dn->dn_maxblkid + 1) * dn->dn_datablksz; in __dmu_object_info_from_dnode()
2745 dmu_object_info_from_dnode(dnode_t *dn, dmu_object_info_t *doi) in dmu_object_info_from_dnode() argument
2747 rw_enter(&dn->dn_struct_rwlock, RW_READER); in dmu_object_info_from_dnode()
2748 mutex_enter(&dn->dn_mtx); in dmu_object_info_from_dnode()
2750 __dmu_object_info_from_dnode(dn, doi); in dmu_object_info_from_dnode()
2752 mutex_exit(&dn->dn_mtx); in dmu_object_info_from_dnode()
2753 rw_exit(&dn->dn_struct_rwlock); in dmu_object_info_from_dnode()
2763 dnode_t *dn; in dmu_object_info() local
2764 int err = dnode_hold(os, object, FTAG, &dn); in dmu_object_info()
2770 dmu_object_info_from_dnode(dn, doi); in dmu_object_info()
2772 dnode_rele(dn, FTAG); in dmu_object_info()
2797 dnode_t *dn; in dmu_object_size_from_db() local
2800 dn = DB_DNODE(db); in dmu_object_size_from_db()
2802 *blksize = dn->dn_datablksz; in dmu_object_size_from_db()
2804 *nblk512 = ((DN_USED_BYTES(dn->dn_phys) + SPA_MINBLOCKSIZE/2) >> in dmu_object_size_from_db()
2805 SPA_MINBLOCKSHIFT) + dn->dn_num_slots; in dmu_object_size_from_db()