I think that the problem fixed by this change is still present in FreeBSD as 
well as in illumos.

The fix looks good to me.  I think that the problem that it solves is that the 
current code stops adding to `hdrsize` once we get into the trailing 
`blkptr_t`-sized area. So, if we (almost) fill the bonus buffer but do not 
actually spill over, then the calculated header size could be less than it 
should be.

P.S. another problem still present in illumos is the one fixed by the following 
ZoL and FreeBSD commits:
zfsonlinux/zfs@5d862cb0d9a4b6dcc97a88fa0d5a7a717566e5ab
freebsd/freebsd@a7cf665d5f7e2a94346c692418677188cca0356f
I think that ZoL commit message is much clearer while FreeBSD code is a little 
bit nicer :-)
Fusing those two commits together would be even better.

---
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/14#issuecomment-150617253
_______________________________________________
developer mailing list
developer@open-zfs.org
http://lists.open-zfs.org/mailman/listinfo/developer

Reply via email to