diff options
author | Fabian Grünbichler <f.gruenbichler@proxmox.com> | 2019-03-03 22:40:45 -0800 |
---|---|---|
committer | Joshua M. Clulow <josh@sysmgr.org> | 2019-03-03 22:40:45 -0800 |
commit | 946342a260bbae359b48bf142ec1fe40792ee862 (patch) | |
tree | 0078a70f667ebad96ff79ee5aa4bd1a3c2862ee1 /usr/src/uts | |
parent | 1c802681fb0b5558958cd6f33bf56789a1b0ef29 (diff) | |
download | illumos-joyent-946342a260bbae359b48bf142ec1fe40792ee862.tar.gz |
10452 ZoL: merge in large dnode feature fixes
Portions contributed by: Ned Bass <bass6@llnl.gov>
Portions contributed by: Tom Caputi <tcaputi@datto.com>
Reviewed by: Giuseppe Di Natale <guss80@gmail.com>
Reviewed by: Alek Pinchuk <apinchuk@datto.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: George Melikov <mail@gmelikov.ru>
Reviewed by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed by: Toomas Soome <toomas@me.com>
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Reviewed by: Gergő Mihály Doma <domag02@gmail.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Approved by: Joshua M. Clulow <josh@sysmgr.org>
Diffstat (limited to 'usr/src/uts')
-rw-r--r-- | usr/src/uts/common/fs/zfs/dmu_object.c | 2 | ||||
-rw-r--r-- | usr/src/uts/common/fs/zfs/dmu_send.c | 14 | ||||
-rw-r--r-- | usr/src/uts/common/fs/zfs/dnode.c | 3 |
3 files changed, 9 insertions, 10 deletions
diff --git a/usr/src/uts/common/fs/zfs/dmu_object.c b/usr/src/uts/common/fs/zfs/dmu_object.c index 9895cf4776..f835987e7d 100644 --- a/usr/src/uts/common/fs/zfs/dmu_object.c +++ b/usr/src/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/usr/src/uts/common/fs/zfs/dmu_send.c b/usr/src/uts/common/fs/zfs/dmu_send.c index 8a7e1c56f9..669435aa05 100644 --- a/usr/src/uts/common/fs/zfs/dmu_send.c +++ b/usr/src/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/usr/src/uts/common/fs/zfs/dnode.c b/usr/src/uts/common/fs/zfs/dnode.c index 972aebf45c..73b97c2449 100644 --- a/usr/src/uts/common/fs/zfs/dnode.c +++ b/usr/src/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); |