static int qcow2_check(BlockDriverState *bs, BdrvCheckResult *result,

                       BdrvCheckMode fix)

{

    int ret = qcow2_check_refcounts(bs, result, fix);

    if (ret < 0) {

        return ret;

    }



    if (fix && result->check_errors == 0 && result->corruptions == 0) {

        return qcow2_mark_clean(bs);

    }

    return ret;

}

static int qcow2_check(BlockDriverState *bs, BdrvCheckResult *result,

                       BdrvCheckMode fix)

{

    int ret = qcow2_check_refcounts(bs, result, fix);

    if (ret < 0) {

        return ret;

    }



    if (fix && result->check_errors == 0 && result->corruptions == 0) {

        return qcow2_mark_clean(bs);

    }

    return ret;

}

        return qcow2_mark_clean(bs);
static int FUNC_0(BlockDriverState *VAR_0, BdrvCheckResult *VAR_1,

                       BdrvCheckMode VAR_2)

{

    int VAR_3 = qcow2_check_refcounts(VAR_0, VAR_1, VAR_2);

    if (VAR_3 < 0) {

        return VAR_3;

    }



    if (VAR_2 && VAR_1->check_errors == 0 && VAR_1->corruptions == 0) {

        return qcow2_mark_clean(VAR_0);

    }

    return VAR_3;

}

static int FUNC_0(BlockDriverState *VAR_0, BdrvCheckResult *VAR_1,
BdrvCheckMode VAR_2)
{ int VAR_3 = qcow2_check_refcounts(VAR_0, VAR_1, VAR_2); if (VAR_3 < 0) { return VAR_3; } if (VAR_2 && VAR_1->check_errors == 0 && VAR_1->corruptions == 0) { return qcow2_mark_clean(VAR_0); } return VAR_3; }