On Mon, May 11, 2015 at 07:04:24PM -0400, John Snow wrote:
> +static void drive_backup_cb(BlkActionState *common)
> +{
> + BlkActionCallbackData *cb_data = common->cb_data;
> + BlockDriverState *bs = cb_data->opaque;
> + DriveBackupState *state = DO_UPCAST(DriveBackupState, common, common);
> +
> + assert(state->bs == bs);
> + if (bs->job) {
> + assert(state->job == bs->job);
> + }What is the purpose of the if statement? Why is it not okay for a new job to have started? > + > + state->aio_context = bdrv_get_aio_context(bs); > + aio_context_acquire(state->aio_context); The bs->job access above should be protected by aio_context_acquire().
pgpAW7cn82r3_.pgp
Description: PGP signature
