/* Mark an image clean once it passes check or has been repaired  */
static void qed_check_mark_clean(BDRVQEDState *s, BdrvCheckResult *result)
/* Mark an image clean once it passes check or has been repaired  */
static void qed_check_mark_clean(BDRVQEDState *s, BdrvCheckResult *result)
{
    if (result->corruptions > 0 || result->check_errors > 0) {
        return;
    }
    if (!(s->header.features & QED_F_NEED_CHECK)) {
        return;
    }
    bdrv_flush(s->bs);
    s->header.features &= ~QED_F_NEED_CHECK;
    qed_write_header_sync(s);
}