mirror_zfs/tests/zfs-tests
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
..
callbacks Multi-modifier protection (MMP) 2017-07-13 13:54:00 -04:00
cmd Enable remaining tests 2017-05-22 12:34:32 -04:00
include Fix some ZFS Test Suite issues 2017-09-25 10:32:34 -07:00
tests receive_freeobjects() skips freeing some objects 2017-10-02 15:36:04 -07:00
Makefile.am OpenZFS 7503 - zfs-test should tail ::zfs_dbgmsg on test failure 2017-04-12 13:36:48 -07:00