static void bdrv_qed_invalidate_cache(BlockDriverState *bs, Error **errp)

{

    BDRVQEDState *s = bs->opaque;

    Error *local_err = NULL;

    int ret;



    bdrv_qed_close(bs);



    memset(s, 0, sizeof(BDRVQEDState));

    ret = bdrv_qed_do_open(bs, NULL, bs->open_flags, &local_err);

    if (local_err) {

        error_propagate(errp, local_err);

        error_prepend(errp, "Could not reopen qed layer: ");

        return;

    } else if (ret < 0) {

        error_setg_errno(errp, -ret, "Could not reopen qed layer");

        return;

    }

}

static void bdrv_qed_invalidate_cache(BlockDriverState *bs, Error **errp)

{

    BDRVQEDState *s = bs->opaque;

    Error *local_err = NULL;

    int ret;



    bdrv_qed_close(bs);



    memset(s, 0, sizeof(BDRVQEDState));

    ret = bdrv_qed_do_open(bs, NULL, bs->open_flags, &local_err);

    if (local_err) {

        error_propagate(errp, local_err);

        error_prepend(errp, "Could not reopen qed layer: ");

        return;

    } else if (ret < 0) {

        error_setg_errno(errp, -ret, "Could not reopen qed layer");

        return;

    }

}

static void FUNC_0(BlockDriverState *VAR_0, Error **VAR_1)

{

    BDRVQEDState *s = VAR_0->opaque;

    Error *local_err = NULL;

    int VAR_2;



    bdrv_qed_close(VAR_0);



    memset(s, 0, sizeof(BDRVQEDState));

    VAR_2 = bdrv_qed_do_open(VAR_0, NULL, VAR_0->open_flags, &local_err);

    if (local_err) {

        error_propagate(VAR_1, local_err);

        error_prepend(VAR_1, "Could not reopen qed layer: ");

        return;

    } else if (VAR_2 < 0) {

        error_setg_errno(VAR_1, -VAR_2, "Could not reopen qed layer");

        return;

    }

}

static void FUNC_0(BlockDriverState *VAR_0, Error **VAR_1)
{ BDRVQEDState *s = VAR_0->opaque; Error *local_err = NULL; int VAR_2; bdrv_qed_close(VAR_0); memset(s, 0, sizeof(BDRVQEDState)); VAR_2 = bdrv_qed_do_open(VAR_0, NULL, VAR_0->open_flags, &local_err); if (local_err) { error_propagate(VAR_1, local_err); error_prepend(VAR_1, "Could not reopen qed layer: "); return; } else if (VAR_2 < 0) { error_setg_errno(VAR_1, -VAR_2, "Could not reopen qed layer"); return; } }