some prework for r_io_reopen