- dmu_buf_impl_t *dbi = (dmu_buf_impl_t *)obj->oo_db;
- dmu_buf_impl_t *db;
- dnode_t *dn;
- uint32_t blkshift;
- uint64_t end, blkid;
- int rc;
- ENTRY;
-
- DB_DNODE_ENTER(dbi);
- dn = DB_DNODE(dbi);
-
- if (dn->dn_maxblkid == 0) {
- if (start + size <= dn->dn_datablksz)
- GOTO(out, size = 0);
- if (start < dn->dn_datablksz)
- start = dn->dn_datablksz;
- /* assume largest block size */
- blkshift = SPA_MAXBLOCKSHIFT;
- } else {
- /* blocksize can't change */
- blkshift = dn->dn_datablkshift;
- }