backport erasure code fixes to giant