fix write() support arbitrary f_pos