mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-01-26 18:04:22 +03:00
OpenZFS 9338 - moved dnode has incorrect dn_next_type
Authored by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Prashanth Sreenivasa <pks@delphix.com> Reviewed by: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com> Reviewed by: Dan Kimmel <dan.kimmel@delphix.com> Reviewed by: Giuseppe Di Natale <guss80@gmail.com> Reviewed by: George Melikov <mail@gmelikov.ru> Approved by: Robert Mustacchi <rm@joyent.com> Ported-by: Brian Behlendorf <behlendorf1@llnl.gov> While investigating a different problem, I noticed that moved dnodes (those processed by dnode_move_impl() via kmem_move()) have an incorrect dn_next_type. This could cause the on-disk dn_type to be changed to an invalid value. The fix to copy the dn_next_type in dnode_move_impl(). Porting notes: * For the moment this potential issue cannot occur on Linux since the SPL does not provide the kmem_move() functionality. OpenZFS-issue: https://illumos.org/issues/9338 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/0717e6f13 Closes #7715
This commit is contained in:
parent
b7ddeaef3d
commit
802b1a7b3b
@ -770,6 +770,8 @@ dnode_move_impl(dnode_t *odn, dnode_t *ndn)
|
||||
ndn->dn_datablksz = odn->dn_datablksz;
|
||||
ndn->dn_maxblkid = odn->dn_maxblkid;
|
||||
ndn->dn_num_slots = odn->dn_num_slots;
|
||||
bcopy(&odn->dn_next_type[0], &ndn->dn_next_type[0],
|
||||
sizeof (odn->dn_next_type));
|
||||
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],
|
||||
|
Loading…
Reference in New Issue
Block a user