]> git.proxmox.com Git - mirror_zfs.git/commit
Update resume token at object receive.
authorAlexander Motin <mav@FreeBSD.org>
Thu, 21 Mar 2024 00:22:36 +0000 (20:22 -0400)
committerGitHub <noreply@github.com>
Thu, 21 Mar 2024 00:22:36 +0000 (17:22 -0700)
commit45e23abed55cc1c7216e98df28f1b6c6f172b790
treec04c10c70fef6c6fe3d54cc1441e3e850745584b
parentef08a4d4065d21414d7fedccac20da6bfda4dfd0
Update resume token at object receive.

Before this change resume token was updated only on data receive.
Usually it is enough to resume replication without much overlap.
But we've got a report of a curios case, where replication source
was traversed with recursive grep, which through enabled atime
modified every object without modifying any data.  It produced
several gigabytes of replication traffic without a single data
write and so without a single resume point.

While the resume token was not designed to resume from an object,
I've found that the send implementation always sends object before
any data. So by requesting resume from offset 0 we are effectively
resuming from the object, followed (or not) by the data at offset
0, just as we need it.

Reviewed-by: Allan Jude <allan@klarasystems.com>
Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #15927
module/zfs/dmu_recv.c