moving zpool cross-endian results in incorrect user/group accounting
From Matt Ahrens's original bug report at Delphix:
When a zpool is moved to a different-endian machine (i.e. between SPARC and x86), we byteswap the data as we read it in. However, the SA (system attributes) data is stored as a byte array and is swapped by the SA code. This is fine, but the SA code in zfs_space_delta_cb() fails to swap the bytes.
It happens that the mis-calculated sa_hdrsize() is usually 0, which is handled specially and we end up charging uid=0,gid=0 (root/root). This can result in root's accounting going negative, which there is no guard against.
If the hdrsize happened to be mis-calculated differently, we would really go to crazy town and start subtracting from non-existant users' accounts.