Rearrange ReadFromFDResult and WriteToFDResult to save space.