Lines Matching full:base
40 BlockBackend *base; member
59 /* Remove base node parent that still uses BLK_PERM_WRITE/RESIZE before in commit_prepare()
61 blk_unref(s->base); in commit_prepare()
62 s->base = NULL; in commit_prepare()
87 if (s->base) { in commit_abort()
88 blk_unref(s->base); in commit_abort()
101 * something to base, the intermediate images aren't valid any more. */ in commit_abort()
120 /* restore base open flags here if appropriate (e.g., change the base back in commit_clean()
139 /* Copy if allocated above the base */ in commit_iteration()
155 * If the top (sub)clusters are smaller than the base in commit_iteration()
160 ret = blk_co_pwrite_zeroes(s->base, offset, bytes, in commit_iteration()
174 ret = blk_co_pwrite(s->base, offset, bytes, buf, 0); in commit_iteration()
224 base_len = blk_co_getlength(s->base); in commit_run()
230 ret = blk_co_truncate(s->base, len, false, PREALLOC_MODE_OFF, 0, NULL); in commit_run()
306 BlockDriverState *base, BlockDriverState *top, in commit_start() argument
324 if (bdrv_skip_filters(top) == bdrv_skip_filters(base)) { in commit_start()
325 error_setg(errp, "Invalid files for merge: top and base are the same"); in commit_start()
331 base_size = bdrv_getlength(base); in commit_start()
333 error_setg_errno(errp, -base_size, "Could not inquire base image size"); in commit_start()
354 /* convert base to r/w, if necessary */ in commit_start()
355 s->base_read_only = bdrv_is_read_only(base); in commit_start()
357 if (bdrv_reopen_set_read_only(base, false, errp) != 0) { in commit_start()
388 * Block all nodes between top and base, because they will in commit_start()
391 * nodes (including R/W filters) between top and base. Assuring in commit_start()
397 s->base_overlay = bdrv_find_overlay(top, base); in commit_start()
402 * bdrv_skip_filters(filtered_base) == bdrv_skip_filters(base) in commit_start()
405 assert(bdrv_skip_filters(filtered_base) == bdrv_skip_filters(base)); in commit_start()
409 * at s->base (if writes are blocked for a node, they are also blocked in commit_start()
411 * driver above s->base. in commit_start()
415 for (iter = top; iter != base; iter = bdrv_filter_or_cow_bs(iter)) { in commit_start()
418 * From here on, all nodes are filters on the base. This in commit_start()
433 if (bdrv_freeze_backing_chain(commit_top_bs, base, errp) < 0) { in commit_start()
440 ret = block_job_add_bdrv(&s->common, "base", base, 0, BLK_PERM_ALL, errp); in commit_start()
448 s->base = blk_new(s->common.job.aio_context, in commit_start()
452 ret = blk_insert_bs(s->base, base, errp); in commit_start()
456 blk_set_disable_request_queuing(s->base, true); in commit_start()
457 s->base_bs = base; in commit_start()
471 trace_commit_start(bs, base, top, s); in commit_start()
478 bdrv_unfreeze_backing_chain(commit_top_bs, base); in commit_start()
481 if (s->base) { in commit_start()
482 blk_unref(s->base); in commit_start()
488 bdrv_reopen_set_read_only(base, true, NULL); in commit_start()