Block size change during zfs receive drops spill block
Replication code in receive_object() falsely assumes that if received object block size is different from local, then it must be a new object and calls dmu_object_reclaim() to wipe it out. In most cases it is not a problem, since all dnode, bonus buffer and data block(s) are immediately rewritten any way, but the problem is that spill block (if used) is not. This means loss of ACLs, extended attributes, etc.
This issue can be triggered in very simple way:
1. create 4KB file with 10+ ACL entries;
2. take snapshot and send it to different dataset;
3. append another 4KB to the file;
4. take another snapshot and send incrementally;
5. witness ACL loss on receive side.
Updated by Jerry Jelinek 2 months ago
This is a duplicate of openzfs#8668:
caf9dd209 Fix send/recv lost spill block
We pulled this fix in to illumos as part of the integration of:
eb633035c8 8727 Native data and metadata encryption for zfs
That commit included a large set of openzfs commits, including caf9dd209.