freebsd-dev/module
Ned Bass 39f56627ae receive_freeobjects() skips freeing some objects
When receiving a FREEOBJECTS record, receive_freeobjects()
incorrectly skips a freed object in some cases. Specifically, this
happens when the first object in the range to be freed doesn't exist,
but the second object does. This leaves an object allocated on disk
on the receiving side which is unallocated on the sending side, which
may cause receiving subsequent incremental streams to fail.

The bug was caused by an incorrect increment of the object index
variable when current object being freed doesn't exist.  The
increment is incorrect because incrementing the object index is
handled by a call to dmu_object_next() in the increment portion of
the for loop statement.

Add test case that exposes this bug.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ned Bass <bass6@llnl.gov>
Closes #6694 
Closes #6695
2017-10-02 15:36:04 -07:00
..
avl OpenZFS 7028 - avl_destroy_nodes supports emptying, not just destroying, an avl tree 2017-08-30 12:08:38 -07:00
icp Retire legacy test infrastructure 2017-08-15 17:26:38 -07:00
nvpair OpenZFS 2976 - remove useless offsetof() macros 2017-08-30 15:53:38 -07:00
unicode codebase style improvements for OpenZFS 6459 port 2017-01-22 13:25:40 -08:00
zcommon Native Encryption for ZFS on Linux 2017-08-14 10:36:48 -07:00
zfs receive_freeobjects() skips freeing some objects 2017-10-02 15:36:04 -07:00
.gitignore Improve gitignore 2017-05-25 10:14:13 -07:00
Makefile.in Retire legacy test infrastructure 2017-08-15 17:26:38 -07:00