Am 26.10.2015 um 21:39 hat Max Reitz geschrieben: > Signed-off-by: Max Reitz <mre...@redhat.com>
> + if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_EJECT, errp)) { > + goto out; > + } > + > + /* This follows the convention established by bdrv_make_anon() */ > + if (bs->device_list.tqe_prev) { > + QTAILQ_REMOVE(&bdrv_states, bs, device_list); > + bs->device_list.tqe_prev = NULL; > + } > + > + blk_remove_bs(blk); Wouldn't it be nicer to move the bdrv_states update into blk_remove_bs() and blk_insert_bs()? Can be done on top of this series, though, if you don't need to respin for another reason. Kevin