From b199e62d17dc6bf098c345002db22e8d4540e8ce Mon Sep 17 00:00:00 2001 From: Paul Dagnelie Date: Tue, 22 Sep 2020 16:16:07 -0700 Subject: [PATCH] Don't set numobjs to UINT64_MAX or near it Resolves an issue with `zfs send` streams from 0.8.4 which prevents them from being received by versions < 0.7. Reviewed-by: Matthew Ahrens Reviewed-by: Paul Zuchowski Signed-off-by: Paul Dagnelie Closes #10911 Closes #10916 --- module/zfs/dmu_send.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/module/zfs/dmu_send.c b/module/zfs/dmu_send.c index 33e99c2e0..07c2d6ef2 100644 --- a/module/zfs/dmu_send.c +++ b/module/zfs/dmu_send.c @@ -643,7 +643,7 @@ dump_freeobjects(dmu_send_cookie_t *dscp, uint64_t firstobj, uint64_t numobjs) * receiving side. */ if (maxobj > 0) { - if (maxobj < firstobj) + if (maxobj <= firstobj) return (0); if (maxobj < firstobj + numobjs) @@ -663,8 +663,6 @@ dump_freeobjects(dmu_send_cookie_t *dscp, uint64_t firstobj, uint64_t numobjs) return (SET_ERROR(EINTR)); dscp->dsc_pending_op = PENDING_NONE; } - if (numobjs == 0) - numobjs = UINT64_MAX - firstobj; if (dscp->dsc_pending_op == PENDING_FREEOBJECTS) { /*