block: fix error handling in sg_io