add r_io_reopen

pls review this