aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--uts/common/fs/zfs/dmu_object.c2
-rw-r--r--uts/common/fs/zfs/dmu_send.c14
-rw-r--r--uts/common/fs/zfs/dnode.c3
3 files changed, 9 insertions, 10 deletions
diff --git a/uts/common/fs/zfs/dmu_object.c b/uts/common/fs/zfs/dmu_object.c
index 9895cf4776c0..f835987e7d82 100644
--- a/uts/common/fs/zfs/dmu_object.c
+++ b/uts/common/fs/zfs/dmu_object.c
@@ -263,7 +263,7 @@ dmu_object_reclaim(objset_t *os, uint64_t object, dmu_object_type_t ot,
int blocksize, dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx)
{
return (dmu_object_reclaim_dnsize(os, object, ot, blocksize, bonustype,
- bonuslen, 0, tx));
+ bonuslen, DNODE_MIN_SIZE, tx));
}
int
diff --git a/uts/common/fs/zfs/dmu_send.c b/uts/common/fs/zfs/dmu_send.c
index 8a7e1c56f95c..669435aa0563 100644
--- a/uts/common/fs/zfs/dmu_send.c
+++ b/uts/common/fs/zfs/dmu_send.c
@@ -2205,11 +2205,13 @@ receive_object(struct receive_writer_arg *rwa, struct drr_object *drro,
} else if (drro->drr_type != doi.doi_type ||
drro->drr_blksz != doi.doi_data_block_size ||
drro->drr_bonustype != doi.doi_bonus_type ||
- drro->drr_bonuslen != doi.doi_bonus_size) {
+ drro->drr_bonuslen != doi.doi_bonus_size ||
+ drro->drr_dn_slots != (doi.doi_dnodesize >> DNODE_SHIFT)) {
/* currently allocated, but with different properties */
- err = dmu_object_reclaim(rwa->os, drro->drr_object,
+ err = dmu_object_reclaim_dnsize(rwa->os, drro->drr_object,
drro->drr_type, drro->drr_blksz,
- drro->drr_bonustype, drro->drr_bonuslen, tx);
+ drro->drr_bonustype, drro->drr_bonuslen,
+ drro->drr_dn_slots << DNODE_SHIFT, tx);
}
if (err != 0) {
dmu_tx_commit(tx);
@@ -2259,12 +2261,10 @@ receive_freeobjects(struct receive_writer_arg *rwa,
int err;
err = dmu_object_info(rwa->os, obj, NULL);
- if (err == ENOENT) {
- obj++;
+ if (err == ENOENT)
continue;
- } else if (err != 0) {
+ else if (err != 0)
return (err);
- }
err = dmu_free_long_object(rwa->os, obj);
if (err != 0)
diff --git a/uts/common/fs/zfs/dnode.c b/uts/common/fs/zfs/dnode.c
index 1305a4f64aa9..6c1d91ddfa98 100644
--- a/uts/common/fs/zfs/dnode.c
+++ b/uts/common/fs/zfs/dnode.c
@@ -683,8 +683,7 @@ dnode_reallocate(dnode_t *dn, dmu_object_type_t ot, int blocksize,
ASSERT(DMU_OT_IS_VALID(bonustype));
ASSERT3U(bonuslen, <=,
DN_BONUS_SIZE(spa_maxdnodesize(dmu_objset_spa(dn->dn_objset))));
-
- dn_slots = dn_slots > 0 ? dn_slots : DNODE_MIN_SLOTS;
+ ASSERT3U(bonuslen, <=, DN_BONUS_SIZE(dn_slots << DNODE_SHIFT));
dnode_free_interior_slots(dn);
DNODE_STAT_BUMP(dnode_reallocate);