[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 01/11] qemu-img: allow rebase to a NULL backing file
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 01/11] qemu-img: allow rebase to a NULL backing file when unsafe |
Date: |
Wed, 27 Apr 2011 15:43:00 +0200 |
From: Anthony Liguori <address@hidden>
QEMU can drop a backing file so that an image file no longer depends on
the backing file, but this feature has not been exposed in qemu-img.
This is useful in an image streaming usecase or when an image file has
been fully allocated and no reads can hit the backing file anymore.
Since the dropping the backing file can make the image unusable, only
allow this when the unsafe flag has been set.
Signed-off-by: Anthony Liguori <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
qemu-img.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/qemu-img.c b/qemu-img.c
index d9c2c12..ed5ba91 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -1240,7 +1240,7 @@ static int img_rebase(int argc, char **argv)
}
}
- if ((optind >= argc) || !out_baseimg) {
+ if ((optind >= argc) || (!unsafe && !out_baseimg)) {
help();
}
filename = argv[optind++];
--
1.7.2.3
- [Qemu-devel] [PULL 00/11] Block patches, Kevin Wolf, 2011/04/27
- [Qemu-devel] [PATCH 02/11] atapi: Add 'medium ready' to 'medium not ready' transition on cd change, Kevin Wolf, 2011/04/27
- [Qemu-devel] [PATCH 01/11] qemu-img: allow rebase to a NULL backing file when unsafe,
Kevin Wolf <=
- [Qemu-devel] [PATCH 03/11] Improve accuracy of block migration bandwidth calculation, Kevin Wolf, 2011/04/27
- [Qemu-devel] [PATCH 06/11] ide/atapi: Use table instead of switch for commands, Kevin Wolf, 2011/04/27
- [Qemu-devel] [PATCH 05/11] ide/atapi: Factor commands out, Kevin Wolf, 2011/04/27
- [Qemu-devel] [PATCH 08/11] ide/atapi: Introduce CHECK_READY flag for commands, Kevin Wolf, 2011/04/27
- [Qemu-devel] [PATCH 04/11] ide: Split atapi.c out, Kevin Wolf, 2011/04/27
- [Qemu-devel] [PATCH 11/11] Remove obsolete 'enabled' variable from progress state, Kevin Wolf, 2011/04/27
- [Qemu-devel] [PATCH 07/11] ide/atapi: Replace bdrv_get_geometry calls by s->nb_sectors, Kevin Wolf, 2011/04/27
- [Qemu-devel] [PATCH 09/11] qed: Fix consistency check on 32-bit hosts, Kevin Wolf, 2011/04/27
- [Qemu-devel] [PATCH 10/11] Add dd-style SIGUSR1 progress reporting, Kevin Wolf, 2011/04/27
- Re: [Qemu-devel] [PULL 00/11] Block patches, Aurelien Jarno, 2011/04/27