mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 03:08:51 +03:00
Fix 'zfs recv' of non large_dnode send streams
Currently, there is a bug where older send streams without the DMU_BACKUP_FEATURE_LARGE_DNODE flag are not handled correctly. The code in receive_object() fails to handle cases where drro->drr_dn_slots is set to 0, which is always the case when the sending code does not support this feature flag. This patch fixes the issue by ensuring that that a value of 0 is treated as DNODE_MIN_SLOTS. Tested-by: DHE <git@dehacked.net> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tom Caputi <tcaputi@datto.com> Closes #7617 Closes #7662
This commit is contained in:
committed by
Brian Behlendorf
parent
edf60b8645
commit
da2feb42fb
@@ -261,6 +261,9 @@ dmu_object_reclaim_dnsize(objset_t *os, uint64_t object, dmu_object_type_t ot,
|
||||
int dn_slots = dnodesize >> DNODE_SHIFT;
|
||||
int err;
|
||||
|
||||
if (dn_slots == 0)
|
||||
dn_slots = DNODE_MIN_SLOTS;
|
||||
|
||||
if (object == DMU_META_DNODE_OBJECT)
|
||||
return (SET_ERROR(EBADF));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user