Illumos #2901: zfs receive fails for exabyte sparse files
authorSimon Klinkert <klinkert@webgods.de>
Fri, 22 Jun 2012 14:17:50 +0000 (10:17 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Sat, 25 Aug 2012 19:28:29 +0000 (12:28 -0700)
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@nexenta.com>

References:
  https://www.illumos.org/issues/2901

Ported by: Martin Matuska <martin@matuska.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
module/zfs/dmu_send.c

index 2f06132..9f90037 100644 (file)
@@ -95,6 +95,9 @@ dump_free(struct backuparg *ba, uint64_t object, uint64_t offset,
 {
        struct drr_free *drrf = &(ba->drr->drr_u.drr_free);
 
+       if (length != -1ULL && offset + length < offset)
+               length = -1ULL;
+
        /*
         * If there is a pending op, but it's not PENDING_FREE, push it out,
         * since free block aggregation can only be done for blocks of the