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

{

    BDRVRawState *s = bs->opaque;

    int ret;



    assert(!(bdrv_get_flags(bs) & BDRV_O_INACTIVE));

    ret = raw_handle_perm_lock(bs, RAW_PL_PREPARE, s->perm, s->shared_perm,

                               errp);

    if (ret) {

        return;

    }

    raw_handle_perm_lock(bs, RAW_PL_COMMIT, s->perm, s->shared_perm, NULL);

}

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

{

    BDRVRawState *s = bs->opaque;

    int ret;



    assert(!(bdrv_get_flags(bs) & BDRV_O_INACTIVE));

    ret = raw_handle_perm_lock(bs, RAW_PL_PREPARE, s->perm, s->shared_perm,

                               errp);

    if (ret) {

        return;

    }

    raw_handle_perm_lock(bs, RAW_PL_COMMIT, s->perm, s->shared_perm, NULL);

}

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

{

    BDRVRawState *s = VAR_0->opaque;

    int VAR_2;



    assert(!(bdrv_get_flags(VAR_0) & BDRV_O_INACTIVE));

    VAR_2 = raw_handle_perm_lock(VAR_0, RAW_PL_PREPARE, s->perm, s->shared_perm,

                               VAR_1);

    if (VAR_2) {

        return;

    }

    raw_handle_perm_lock(VAR_0, RAW_PL_COMMIT, s->perm, s->shared_perm, NULL);

}

static void FUNC_0(BlockDriverState *VAR_0, Error **VAR_1)
{ BDRVRawState *s = VAR_0->opaque; int VAR_2; assert(!(bdrv_get_flags(VAR_0) & BDRV_O_INACTIVE)); VAR_2 = raw_handle_perm_lock(VAR_0, RAW_PL_PREPARE, s->perm, s->shared_perm,
VAR_1); if (VAR_2) { return; } raw_handle_perm_lock(VAR_0, RAW_PL_COMMIT, s->perm, s->shared_perm, NULL); }