An (almost) catastrophic OpenZFS bug and the humans that made it (and Rust is here too)
A couple of weeks ago I fixed a nasty bug in this function in OpenZFS:
/*
* This code converts an asize into the largest psize that can safely be written
* to an allocation of that size for this vdev.
*
* Note that this function will not take into account the effect of gang
* headers, which also modify the ASIZE of the DVAs. It is purely a reverse of
* the psize_to_asize function.
*/
static uint64_t
vdev_raidz_asize_to_psize(vdev_t *vd, uint64_t asize, uint64_t txg)
{
vdev_raidz_t *vdrz = vd->vd...
Read more at despairlabs.com