mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2025-01-08 21:18:03 +03:00
8056ee3030
Previously, qemu_img_format() was called with the target storage's $scfg and the source storage's volume name. This mismatch should only be relevant for certain special kinds of storage plugins: - no path, but does support an additional QEMU image format besides 'raw', in short NPAF. - no path, volume name can match QEMU_FORMAT_RE, in short NPVM. Note that all integrated plugins are neither NPAF nor NPVM. Note that for NPAF plugins, qemu_img_format() already always returns 'raw' because there is no path. It's a bit unlikely such a plugin exists, because there were no bug reports about qemu_img_format() misbehaving there yet. Let's go through the cases: - If source and target storage both have or don't have a path, qemu_img_format($scfg, $volname) returns the same for both $scfg's. - If source storage has a path, but target storage does not, the format hint was previously 'raw', but can only be more correct now (being what the source image actually is): - For non-NPAF targets, since we know there is no path, it follows that 'raw' is the only supported QEMU image format. - For NPAF targets, the format will be preserved now (if actually supported). - If source storage does not have a path, but target storage does, the format hint will be 'raw' now. - For non-NPVM sources, QEMU_FORMAT_RE didn't match when qemu_img_format() was called with the target storage's $scfg, so the hint also was 'raw' before this commit. - For NPVM sources, qemu_img_format() might've guessed a format from the source volume name when called with the target's $scfg before this commit. If the target storage supports the previously guessed format, it was preserved before this commit, but will not be anymore. In theory, the guess might've also been wrong, and in this case, this commit avoids the wrong guess. To summarize, there is only one edge case with an exotic kind of third party storage plugin where format preservation would be lost and in another edge case, format preservation is gained. In preparation to simplify the format fallback logic implementation. Signed-off-by: Fiona Ebner <f.ebner@proxmox.com> |
||
---|---|---|
debian | ||
PVE | ||
qemu-configs | ||
qmeventd | ||
test | ||
vm-network-scripts | ||
.gitignore | ||
bootsplash.jpg | ||
bootsplash.xcf | ||
Makefile | ||
modules-load.conf | ||
qm | ||
qmextract | ||
qmrestore |