update submodule and patches to 7.2.0
User-facing breaking change:
The slirp submodule for user networking got removed. It would be
necessary to add the --enable-slirp option to the build and/or install
the appropriate library to continue building it. Since PVE is not
explicitly supporting it, it would require additionally installing the
libslirp0 package on all installations and there is *very* little
mention on the community forum when searching for "slirp" or
"netdev user", the plan is to only enable it again if there is some
real demand for it.
Notable changes:
* The big change for this release is the rework of job locking, using
a job mutex and introducing _locked() variants of job API functions
moving away from call-side AioContext locking. See (in the qemu
submodule) commit 6f592e5aca ("job.c: enable job lock/unlock and
remove Aiocontext locks") and previous commits for context.
Changes required for the backup patches:
* Use WITH_JOB_LOCK_GUARD() and call the _locked() variant of job
API functions where appropriate (many are only availalbe as
a _locked() variant).
* Remove acquiring/releasing AioContext around functions taking the
job mutex lock internally.
The patch introducing sequential transaction support for jobs needs
to temporarily unlock the job mutex to call job_start() when
starting the next job in the transaction.
* The zeroinit block driver now marks its child as primary.
The documentation in include/block/block-common.h states:
> Filter node has exactly one FILTERED|PRIMARY child, and may have
> other children which must not have these bits
Without this, an assert will trigger when copying to a zeroinit target
with qemu-img convert, because bdrv_child_cb_attach() expects any
non-PRIMARY child to be not FILTERED:
> qemu-img convert -n -p -f raw -O raw input.raw zeroinit:output.raw
> qemu-img: ../block.c:1476: bdrv_child_cb_attach: Assertion
> `!(child->role & BDRV_CHILD_FILTERED)' failed.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
committed by
Wolfgang Bumiller
parent
55e33a045e
commit
d03e1b3ce3
+23
-23
@@ -29,7 +29,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
6 files changed, 142 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/block/monitor/block-hmp-cmds.c b/block/monitor/block-hmp-cmds.c
|
||||
index 89ca64444d..45da74d7a0 100644
|
||||
index 477044c54a..556af25861 100644
|
||||
--- a/block/monitor/block-hmp-cmds.c
|
||||
+++ b/block/monitor/block-hmp-cmds.c
|
||||
@@ -1042,6 +1042,7 @@ void hmp_backup(Monitor *mon, const QDict *qdict)
|
||||
@@ -41,10 +41,10 @@ index 89ca64444d..45da74d7a0 100644
|
||||
false, NULL, false, NULL, !!devlist,
|
||||
devlist, qdict_haskey(qdict, "speed"), speed, &error);
|
||||
diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
|
||||
index 1168773da7..4c1671e289 100644
|
||||
index a40b25e906..670f783515 100644
|
||||
--- a/monitor/hmp-cmds.c
|
||||
+++ b/monitor/hmp-cmds.c
|
||||
@@ -223,19 +223,42 @@ void hmp_info_backup(Monitor *mon, const QDict *qdict)
|
||||
@@ -225,19 +225,42 @@ void hmp_info_backup(Monitor *mon, const QDict *qdict)
|
||||
monitor_printf(mon, "End time: %s", ctime(&info->end_time));
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ index 1dda8b7d8f..8cbf645b2c 100644
|
||||
|
||||
|
||||
diff --git a/pve-backup.c b/pve-backup.c
|
||||
index 88f5ee133f..1c49cd178d 100644
|
||||
index 3d28975eaa..abd7062afe 100644
|
||||
--- a/pve-backup.c
|
||||
+++ b/pve-backup.c
|
||||
@@ -28,6 +28,8 @@
|
||||
@@ -162,7 +162,7 @@ index 88f5ee133f..1c49cd178d 100644
|
||||
BlockDriverState *target;
|
||||
} PVEBackupDevInfo;
|
||||
|
||||
@@ -105,11 +110,12 @@ static bool pvebackup_error_or_canceled(void)
|
||||
@@ -107,11 +112,12 @@ static bool pvebackup_error_or_canceled(void)
|
||||
return error_or_canceled;
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ index 88f5ee133f..1c49cd178d 100644
|
||||
qemu_mutex_unlock(&backup_state.stat.lock);
|
||||
}
|
||||
|
||||
@@ -148,7 +154,8 @@ pvebackup_co_dump_pbs_cb(
|
||||
@@ -150,7 +156,8 @@ pvebackup_co_dump_pbs_cb(
|
||||
pvebackup_propagate_error(local_err);
|
||||
return pbs_res;
|
||||
} else {
|
||||
@@ -186,7 +186,7 @@ index 88f5ee133f..1c49cd178d 100644
|
||||
}
|
||||
|
||||
return size;
|
||||
@@ -208,11 +215,11 @@ pvebackup_co_dump_vma_cb(
|
||||
@@ -210,11 +217,11 @@ pvebackup_co_dump_vma_cb(
|
||||
} else {
|
||||
if (remaining >= VMA_CLUSTER_SIZE) {
|
||||
assert(ret == VMA_CLUSTER_SIZE);
|
||||
@@ -200,7 +200,7 @@ index 88f5ee133f..1c49cd178d 100644
|
||||
remaining = 0;
|
||||
}
|
||||
}
|
||||
@@ -248,6 +255,18 @@ static void coroutine_fn pvebackup_co_cleanup(void *unused)
|
||||
@@ -250,6 +257,18 @@ static void coroutine_fn pvebackup_co_cleanup(void *unused)
|
||||
if (local_err != NULL) {
|
||||
pvebackup_propagate_error(local_err);
|
||||
}
|
||||
@@ -219,7 +219,7 @@ index 88f5ee133f..1c49cd178d 100644
|
||||
}
|
||||
|
||||
proxmox_backup_disconnect(backup_state.pbs);
|
||||
@@ -303,6 +322,12 @@ static void pvebackup_complete_cb(void *opaque, int ret)
|
||||
@@ -305,6 +324,12 @@ static void pvebackup_complete_cb(void *opaque, int ret)
|
||||
// remove self from job queue
|
||||
backup_state.di_list = g_list_remove(backup_state.di_list, di);
|
||||
|
||||
@@ -232,7 +232,7 @@ index 88f5ee133f..1c49cd178d 100644
|
||||
g_free(di);
|
||||
|
||||
qemu_mutex_unlock(&backup_state.backup_mutex);
|
||||
@@ -472,12 +497,18 @@ static bool create_backup_jobs(void) {
|
||||
@@ -469,12 +494,18 @@ static bool create_backup_jobs(void) {
|
||||
|
||||
assert(di->target != NULL);
|
||||
|
||||
@@ -253,7 +253,7 @@ index 88f5ee133f..1c49cd178d 100644
|
||||
JOB_DEFAULT, pvebackup_complete_cb, di, NULL, &local_err);
|
||||
|
||||
aio_context_release(aio_context);
|
||||
@@ -528,6 +559,8 @@ typedef struct QmpBackupTask {
|
||||
@@ -525,6 +556,8 @@ typedef struct QmpBackupTask {
|
||||
const char *fingerprint;
|
||||
bool has_fingerprint;
|
||||
int64_t backup_time;
|
||||
@@ -262,7 +262,7 @@ index 88f5ee133f..1c49cd178d 100644
|
||||
bool has_format;
|
||||
BackupFormat format;
|
||||
bool has_config_file;
|
||||
@@ -619,6 +652,7 @@ static void coroutine_fn pvebackup_co_prepare(void *opaque)
|
||||
@@ -616,6 +649,7 @@ static void coroutine_fn pvebackup_co_prepare(void *opaque)
|
||||
}
|
||||
|
||||
size_t total = 0;
|
||||
@@ -270,7 +270,7 @@ index 88f5ee133f..1c49cd178d 100644
|
||||
|
||||
l = di_list;
|
||||
while (l) {
|
||||
@@ -656,6 +690,8 @@ static void coroutine_fn pvebackup_co_prepare(void *opaque)
|
||||
@@ -653,6 +687,8 @@ static void coroutine_fn pvebackup_co_prepare(void *opaque)
|
||||
int dump_cb_block_size = PROXMOX_BACKUP_DEFAULT_CHUNK_SIZE; // Hardcoded (4M)
|
||||
firewall_name = "fw.conf";
|
||||
|
||||
@@ -279,7 +279,7 @@ index 88f5ee133f..1c49cd178d 100644
|
||||
char *pbs_err = NULL;
|
||||
pbs = proxmox_backup_new(
|
||||
task->backup_file,
|
||||
@@ -675,7 +711,8 @@ static void coroutine_fn pvebackup_co_prepare(void *opaque)
|
||||
@@ -672,7 +708,8 @@ static void coroutine_fn pvebackup_co_prepare(void *opaque)
|
||||
goto err;
|
||||
}
|
||||
|
||||
@@ -289,7 +289,7 @@ index 88f5ee133f..1c49cd178d 100644
|
||||
goto err;
|
||||
|
||||
/* register all devices */
|
||||
@@ -686,9 +723,40 @@ static void coroutine_fn pvebackup_co_prepare(void *opaque)
|
||||
@@ -683,9 +720,40 @@ static void coroutine_fn pvebackup_co_prepare(void *opaque)
|
||||
|
||||
const char *devname = bdrv_get_device_name(di->bs);
|
||||
|
||||
@@ -332,7 +332,7 @@ index 88f5ee133f..1c49cd178d 100644
|
||||
|
||||
if (!(di->target = bdrv_backup_dump_create(dump_cb_block_size, di->size, pvebackup_co_dump_pbs_cb, di, task->errp))) {
|
||||
goto err;
|
||||
@@ -697,6 +765,8 @@ static void coroutine_fn pvebackup_co_prepare(void *opaque)
|
||||
@@ -694,6 +762,8 @@ static void coroutine_fn pvebackup_co_prepare(void *opaque)
|
||||
di->dev_id = dev_id;
|
||||
}
|
||||
} else if (format == BACKUP_FORMAT_VMA) {
|
||||
@@ -341,7 +341,7 @@ index 88f5ee133f..1c49cd178d 100644
|
||||
vmaw = vma_writer_create(task->backup_file, uuid, &local_err);
|
||||
if (!vmaw) {
|
||||
if (local_err) {
|
||||
@@ -724,6 +794,8 @@ static void coroutine_fn pvebackup_co_prepare(void *opaque)
|
||||
@@ -721,6 +791,8 @@ static void coroutine_fn pvebackup_co_prepare(void *opaque)
|
||||
}
|
||||
}
|
||||
} else if (format == BACKUP_FORMAT_DIR) {
|
||||
@@ -350,7 +350,7 @@ index 88f5ee133f..1c49cd178d 100644
|
||||
if (mkdir(task->backup_file, 0640) != 0) {
|
||||
error_setg_errno(task->errp, errno, "can't create directory '%s'\n",
|
||||
task->backup_file);
|
||||
@@ -796,8 +868,10 @@ static void coroutine_fn pvebackup_co_prepare(void *opaque)
|
||||
@@ -793,8 +865,10 @@ static void coroutine_fn pvebackup_co_prepare(void *opaque)
|
||||
char *uuid_str = g_strdup(backup_state.stat.uuid_str);
|
||||
|
||||
backup_state.stat.total = total;
|
||||
@@ -361,7 +361,7 @@ index 88f5ee133f..1c49cd178d 100644
|
||||
|
||||
qemu_mutex_unlock(&backup_state.stat.lock);
|
||||
|
||||
@@ -821,6 +895,10 @@ err:
|
||||
@@ -818,6 +892,10 @@ err:
|
||||
PVEBackupDevInfo *di = (PVEBackupDevInfo *)l->data;
|
||||
l = g_list_next(l);
|
||||
|
||||
@@ -372,7 +372,7 @@ index 88f5ee133f..1c49cd178d 100644
|
||||
if (di->target) {
|
||||
bdrv_unref(di->target);
|
||||
}
|
||||
@@ -862,6 +940,7 @@ UuidInfo *qmp_backup(
|
||||
@@ -859,6 +937,7 @@ UuidInfo *qmp_backup(
|
||||
bool has_fingerprint, const char *fingerprint,
|
||||
bool has_backup_id, const char *backup_id,
|
||||
bool has_backup_time, int64_t backup_time,
|
||||
@@ -380,7 +380,7 @@ index 88f5ee133f..1c49cd178d 100644
|
||||
bool has_format, BackupFormat format,
|
||||
bool has_config_file, const char *config_file,
|
||||
bool has_firewall_file, const char *firewall_file,
|
||||
@@ -880,6 +959,8 @@ UuidInfo *qmp_backup(
|
||||
@@ -877,6 +956,8 @@ UuidInfo *qmp_backup(
|
||||
.backup_id = backup_id,
|
||||
.has_backup_time = has_backup_time,
|
||||
.backup_time = backup_time,
|
||||
@@ -389,7 +389,7 @@ index 88f5ee133f..1c49cd178d 100644
|
||||
.has_format = has_format,
|
||||
.format = format,
|
||||
.has_config_file = has_config_file,
|
||||
@@ -948,10 +1029,14 @@ BackupStatus *qmp_query_backup(Error **errp)
|
||||
@@ -945,10 +1026,14 @@ BackupStatus *qmp_query_backup(Error **errp)
|
||||
|
||||
info->has_total = true;
|
||||
info->total = backup_state.stat.total;
|
||||
@@ -405,7 +405,7 @@ index 88f5ee133f..1c49cd178d 100644
|
||||
qemu_mutex_unlock(&backup_state.stat.lock);
|
||||
|
||||
diff --git a/qapi/block-core.json b/qapi/block-core.json
|
||||
index 90ad07b7ee..3ad9eb5d1a 100644
|
||||
index c3b6b93472..992e6c1e3f 100644
|
||||
--- a/qapi/block-core.json
|
||||
+++ b/qapi/block-core.json
|
||||
@@ -753,8 +753,13 @@
|
||||
|
||||
Reference in New Issue
Block a user