[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging-4.9] libxl: qemu_disk_scsi_drive_string: Break out common parts of disk config
commit c257e35a2eb1e9f465026dbbabd5bcb5153115b6 Author: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> AuthorDate: Thu Jun 28 10:00:09 2018 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Thu Jun 28 10:00:09 2018 +0200 libxl: qemu_disk_scsi_drive_string: Break out common parts of disk config The generated configurations are identical apart from, in some cases, reordering of the id=%s element. So, overall, no functional change. This is part of XSA-266. Reported-by: Andrew Reimers <andrew.reimers@xxxxxxxxxxx> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> master commit: 724e5aa31b58d1e430ad36b484cf0ec021497399 master date: 2018-06-28 09:04:55 +0200 --- tools/libxl/libxl_dm.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index 40f9dc759b..96d57025f8 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -773,6 +773,7 @@ static char *qemu_disk_scsi_drive_string(libxl__gc *gc, const char *target_path, int colo_mode) { char *drive = NULL; + char *common = GCSPRINTF("cache=writeback"); const char *exportname = disk->colo_export; const char *active_disk = disk->active_disk; const char *hidden_disk = disk->hidden_disk; @@ -780,8 +781,8 @@ static char *qemu_disk_scsi_drive_string(libxl__gc *gc, const char *target_path, switch (colo_mode) { case LIBXL__COLO_NONE: drive = libxl__sprintf - (gc, "file=%s,if=scsi,bus=0,unit=%d,format=%s,cache=writeback", - target_path, unit, format); + (gc, "%s,file=%s,if=scsi,bus=0,unit=%d,format=%s", + common, target_path, unit, format); break; case LIBXL__COLO_PRIMARY: /* @@ -794,13 +795,13 @@ static char *qemu_disk_scsi_drive_string(libxl__gc *gc, const char *target_path, * vote-threshold=1 */ drive = GCSPRINTF( - "if=scsi,bus=0,unit=%d,cache=writeback,driver=quorum," + "%s,if=scsi,bus=0,unit=%d,,driver=quorum," "id=%s," "children.0.file.filename=%s," "children.0.driver=%s," "read-pattern=fifo," "vote-threshold=1", - unit, exportname, target_path, format); + common, unit, exportname, target_path, format); break; case LIBXL__COLO_SECONDARY: /* @@ -814,7 +815,7 @@ static char *qemu_disk_scsi_drive_string(libxl__gc *gc, const char *target_path, * file.backing.backing=exportname, */ drive = GCSPRINTF( - "if=scsi,id=top-colo,bus=0,unit=%d,cache=writeback," + "%s,if=scsi,id=top-colo,bus=0,unit=%d," "driver=replication," "mode=secondary," "top-id=top-colo," @@ -823,7 +824,7 @@ static char *qemu_disk_scsi_drive_string(libxl__gc *gc, const char *target_path, "file.backing.driver=qcow2," "file.backing.file.filename=%s," "file.backing.backing=%s", - unit, active_disk, hidden_disk, exportname); + common, unit, active_disk, hidden_disk, exportname); break; default: abort(); -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.9 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |