qed: replace is_write with flags field