static void block_job_completed_single(BlockJob *job)

{

    if (!job->ret) {

        if (job->driver->commit) {

            job->driver->commit(job);


    } else {

        if (job->driver->abort) {

            job->driver->abort(job);








    if (job->cb) {

        job->cb(job->opaque, job->ret);


    if (block_job_is_cancelled(job)) {

        block_job_event_cancelled(job);

    } else {

        const char *msg = NULL;

        if (job->ret < 0) {

            msg = strerror(-job->ret);


        block_job_event_completed(job, msg);




    if (job->txn) {

        QLIST_REMOVE(job, txn_list);

        block_job_txn_unref(job->txn);


    block_job_unref(job);

static void block_job_completed_single(BlockJob *job)

{

    if (!job->ret) {

        if (job->driver->commit) {

            job->driver->commit(job);


    } else {

        if (job->driver->abort) {

            job->driver->abort(job);








    if (job->cb) {

        job->cb(job->opaque, job->ret);


    if (block_job_is_cancelled(job)) {

        block_job_event_cancelled(job);

    } else {

        const char *msg = NULL;

        if (job->ret < 0) {

            msg = strerror(-job->ret);


        block_job_event_completed(job, msg);




    if (job->txn) {

        QLIST_REMOVE(job, txn_list);

        block_job_txn_unref(job->txn);


    block_job_unref(job);

static void FUNC_0(BlockJob *VAR_0)

{

    if (!VAR_0->ret) {

        if (VAR_0->driver->commit) {

            VAR_0->driver->commit(VAR_0);


    } else {

        if (VAR_0->driver->abort) {

            VAR_0->driver->abort(VAR_0);








    if (VAR_0->cb) {

        VAR_0->cb(VAR_0->opaque, VAR_0->ret);


    if (block_job_is_cancelled(VAR_0)) {

        block_job_event_cancelled(VAR_0);

    } else {

        const char *VAR_1 = NULL;

        if (VAR_0->ret < 0) {

            VAR_1 = strerror(-VAR_0->ret);


        block_job_event_completed(VAR_0, VAR_1);




    if (VAR_0->txn) {

        QLIST_REMOVE(VAR_0, txn_list);

        block_job_txn_unref(VAR_0->txn);


    block_job_unref(VAR_0);

static void FUNC_0(BlockJob *VAR_0)
{ if (!VAR_0->ret) { if (VAR_0->driver->commit) { VAR_0->driver->commit(VAR_0); } else { if (VAR_0->driver->abort) { VAR_0->driver->abort(VAR_0); if (VAR_0->cb) { VAR_0->cb(VAR_0->opaque, VAR_0->ret); if (block_job_is_cancelled(VAR_0)) { block_job_event_cancelled(VAR_0); } else { const char *VAR_1 = NULL; if (VAR_0->ret < 0) { VAR_1 = strerror(-VAR_0->ret); block_job_event_completed(VAR_0, VAR_1); if (VAR_0->txn) { QLIST_REMOVE(VAR_0, txn_list); block_job_txn_unref(VAR_0->txn); block_job_unref(VAR_0);