qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC v4 14/21] blockjobs: add block_job_txn_apply funct


From: Eric Blake
Subject: Re: [Qemu-devel] [RFC v4 14/21] blockjobs: add block_job_txn_apply function
Date: Tue, 27 Feb 2018 13:52:53 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 02/23/2018 05:51 PM, John Snow wrote:
Simply apply a function transaction-wide.
A few more uses of this in forthcoming patches.

Signed-off-by: John Snow <address@hidden>
---
  blockjob.c | 24 +++++++++++++++---------
  1 file changed, 15 insertions(+), 9 deletions(-)


@@ -565,13 +577,7 @@ static void block_job_completed_txn_success(BlockJob *job)
          }
      }
      /* We are the last completed job, commit the transaction. */
-    QLIST_FOREACH_SAFE(other_job, &txn->jobs, txn_list, next) {
-        ctx = blk_get_aio_context(other_job->blk);
-        aio_context_acquire(ctx);
-        assert(other_job->ret == 0);

We lost this assertion.  Hopefully that doesn't matter in the long run.

-        block_job_completed_single(other_job);
-        aio_context_release(ctx);
-    }
+    block_job_txn_apply(txn, block_job_completed_single);
  }
/* Assumes the block_job_mutex is held */


Reviewed-by: Eric Blake <address@hidden>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]