diff options
author | Tom Caputi <[email protected]> | 2018-06-28 17:55:11 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-06-28 14:55:11 -0700 |
commit | da2feb42fb5c7a8c1e1cc67f7a880da9d8e97bc2 (patch) | |
tree | b29b779bb5e70b9dfbd0bf81f512dedee17175ad /module/zfs/dmu_object.c | |
parent | edf60b864505497dc8c4f09d4ce2190c72f1e2c2 (diff) |
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 <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Tom Caputi <[email protected]>
Closes #7617
Closes #7662
Diffstat (limited to 'module/zfs/dmu_object.c')
-rw-r--r-- | module/zfs/dmu_object.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/module/zfs/dmu_object.c b/module/zfs/dmu_object.c index 62ddea905..586a04b16 100644 --- a/module/zfs/dmu_object.c +++ b/module/zfs/dmu_object.c @@ -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)); |