block: Make errp the last parameter of commit_active_start
Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170421122710.15373-9-famz@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
		
							parent
							
								
									51ccfa2dbf
								
							
						
					
					
						commit
						78bbd910bb
					
				| 
						 | 
				
			
			@ -1290,8 +1290,8 @@ void commit_active_start(const char *job_id, BlockDriverState *bs,
 | 
			
		|||
                         BlockDriverState *base, int creation_flags,
 | 
			
		||||
                         int64_t speed, BlockdevOnError on_error,
 | 
			
		||||
                         const char *filter_node_name,
 | 
			
		||||
                         BlockCompletionFunc *cb, void *opaque, Error **errp,
 | 
			
		||||
                         bool auto_complete)
 | 
			
		||||
                         BlockCompletionFunc *cb, void *opaque,
 | 
			
		||||
                         bool auto_complete, Error **errp)
 | 
			
		||||
{
 | 
			
		||||
    int orig_base_flags;
 | 
			
		||||
    Error *local_err = NULL;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -656,7 +656,7 @@ static void replication_stop(ReplicationState *rs, bool failover, Error **errp)
 | 
			
		|||
        s->replication_state = BLOCK_REPLICATION_FAILOVER;
 | 
			
		||||
        commit_active_start(NULL, s->active_disk->bs, s->secondary_disk->bs,
 | 
			
		||||
                            BLOCK_JOB_INTERNAL, 0, BLOCKDEV_ON_ERROR_REPORT,
 | 
			
		||||
                            NULL, replication_done, bs, errp, true);
 | 
			
		||||
                            NULL, replication_done, bs, true, errp);
 | 
			
		||||
        break;
 | 
			
		||||
    default:
 | 
			
		||||
        aio_context_release(aio_context);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3142,7 +3142,7 @@ void qmp_block_commit(bool has_job_id, const char *job_id, const char *device,
 | 
			
		|||
        }
 | 
			
		||||
        commit_active_start(has_job_id ? job_id : NULL, bs, base_bs,
 | 
			
		||||
                            BLOCK_JOB_DEFAULT, speed, on_error,
 | 
			
		||||
                            filter_node_name, NULL, NULL, &local_err, false);
 | 
			
		||||
                            filter_node_name, NULL, NULL, false, &local_err);
 | 
			
		||||
    } else {
 | 
			
		||||
        BlockDriverState *overlay_bs = bdrv_find_overlay(bs, top_bs);
 | 
			
		||||
        if (bdrv_op_is_blocked(overlay_bs, BLOCK_OP_TYPE_COMMIT_TARGET, errp)) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -805,16 +805,16 @@ void commit_start(const char *job_id, BlockDriverState *bs,
 | 
			
		|||
 * a node name should be autogenerated.
 | 
			
		||||
 * @cb: Completion function for the job.
 | 
			
		||||
 * @opaque: Opaque pointer value passed to @cb.
 | 
			
		||||
 * @errp: Error object.
 | 
			
		||||
 * @auto_complete: Auto complete the job.
 | 
			
		||||
 * @errp: Error object.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
void commit_active_start(const char *job_id, BlockDriverState *bs,
 | 
			
		||||
                         BlockDriverState *base, int creation_flags,
 | 
			
		||||
                         int64_t speed, BlockdevOnError on_error,
 | 
			
		||||
                         const char *filter_node_name,
 | 
			
		||||
                         BlockCompletionFunc *cb, void *opaque, Error **errp,
 | 
			
		||||
                         bool auto_complete);
 | 
			
		||||
                         BlockCompletionFunc *cb, void *opaque,
 | 
			
		||||
                         bool auto_complete, Error **errp);
 | 
			
		||||
/*
 | 
			
		||||
 * mirror_start:
 | 
			
		||||
 * @job_id: The id of the newly-created job, or %NULL to use the
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -984,7 +984,7 @@ static int img_commit(int argc, char **argv)
 | 
			
		|||
    aio_context_acquire(aio_context);
 | 
			
		||||
    commit_active_start("commit", bs, base_bs, BLOCK_JOB_DEFAULT, 0,
 | 
			
		||||
                        BLOCKDEV_ON_ERROR_REPORT, NULL, common_block_job_cb,
 | 
			
		||||
                        &cbi, &local_err, false);
 | 
			
		||||
                        &cbi, false, &local_err);
 | 
			
		||||
    aio_context_release(aio_context);
 | 
			
		||||
    if (local_err) {
 | 
			
		||||
        goto done;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue