diff options
author | Matthew Ahrens <[email protected]> | 2017-06-29 10:18:03 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-06-29 10:18:03 -0700 |
commit | 817b1b6e7b6f9b8890a550c7c7efabdba41dd352 (patch) | |
tree | efb9aef59a253fc27ce89665ff573e62efbcfafd /module/zfs/dnode.c | |
parent | b8a97fb101555797400c3a275e67820c5d689802 (diff) |
Clean up large dnode code
Resolves issues discovered when porting to OpenZFS.
* Lint warnings.
* Made dnode_move_impl() large dnode aware. This
functionality is currently unused on Linux.
Reviewed-by: Ned Bass <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Matthew Ahrens <[email protected]>
Closes #6262
Diffstat (limited to 'module/zfs/dnode.c')
-rw-r--r-- | module/zfs/dnode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/module/zfs/dnode.c b/module/zfs/dnode.c index fd4acbbaa..57156484b 100644 --- a/module/zfs/dnode.c +++ b/module/zfs/dnode.c @@ -330,7 +330,7 @@ dnode_buf_byteswap(void *vbuf, size_t size) ASSERT((size & (sizeof (dnode_phys_t)-1)) == 0); while (i < size) { - dnode_phys_t *dnp = vbuf + i; + dnode_phys_t *dnp = (void *)(((char *)vbuf) + i); dnode_byteswap(dnp); i += DNODE_MIN_SIZE; @@ -733,6 +733,7 @@ dnode_move_impl(dnode_t *odn, dnode_t *ndn) ndn->dn_datablkszsec = odn->dn_datablkszsec; ndn->dn_datablksz = odn->dn_datablksz; ndn->dn_maxblkid = odn->dn_maxblkid; + ndn->dn_num_slots = odn->dn_num_slots; bcopy(&odn->dn_next_nblkptr[0], &ndn->dn_next_nblkptr[0], sizeof (odn->dn_next_nblkptr)); bcopy(&odn->dn_next_nlevels[0], &ndn->dn_next_nlevels[0], |