make sure that io_flush() doesn't call writefd_unbuffered from within