[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 30/46] qemu-img: add dirty flag status
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 30/46] qemu-img: add dirty flag status |
Date: |
Thu, 5 Apr 2012 17:52:08 +0200 |
From: Dong Xu Wang <address@hidden>
Some block drivers can verify their image files are clean or not. So we can show
it while using "qemu-img info".
Signed-off-by: Dong Xu Wang <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block.h | 1 +
qemu-img.c | 3 +++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/block.h b/block.h
index ea12f5d..4e99e18 100644
--- a/block.h
+++ b/block.h
@@ -15,6 +15,7 @@ typedef struct BlockDriverInfo {
int cluster_size;
/* offset at which the VM state can be saved (0 if not possible) */
int64_t vm_state_offset;
+ bool is_dirty;
} BlockDriverInfo;
typedef struct BlockFragInfo {
diff --git a/qemu-img.c b/qemu-img.c
index 4de48ba..6a61ca8 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -1132,6 +1132,9 @@ static int img_info(int argc, char **argv)
if (bdi.cluster_size != 0) {
printf("cluster_size: %d\n", bdi.cluster_size);
}
+ if (bdi.is_dirty) {
+ printf("cleanly shut down: no\n");
+ }
}
bdrv_get_backing_filename(bs, backing_filename, sizeof(backing_filename));
if (backing_filename[0] != '\0') {
--
1.7.6.5
- [Qemu-devel] [PATCH 29/46] qed: image fragmentation statistics, (continued)
- [Qemu-devel] [PATCH 29/46] qed: image fragmentation statistics, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 14/46] block: enforce constraints on block size properties, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 12/46] qerror: fix QERR_PROPERTY_VALUE_OUT_OF_RANGE description, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 45/46] qed: honor BDRV_O_INCOMING for incoming live migration, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 44/46] migration: clear BDRV_O_INCOMING flags on end of incoming live migration, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 34/46] sheepdog: fix send req helpers, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 31/46] qed: track dirty flag status, Kevin Wolf, 2012/04/06
- [Qemu-devel] [PATCH 40/46] block: Add new BDRV_O_INCOMING flag to notice incoming live migration, Kevin Wolf, 2012/04/06
- [Qemu-devel] [PATCH 46/46] qed: remove incoming live migration blocker, Kevin Wolf, 2012/04/06
- [Qemu-devel] [PATCH 16/46] vdi: move end-of-I/O handling at the end, Kevin Wolf, 2012/04/06
- [Qemu-devel] [PATCH 30/46] qemu-img: add dirty flag status,
Kevin Wolf <=
- [Qemu-devel] [PATCH 41/46] block: add a function to clear incoming live migration flags, Kevin Wolf, 2012/04/06
- [Qemu-devel] [PATCH 39/46] block stream: close unused files and update ->backing_hd, Kevin Wolf, 2012/04/06
- [Qemu-devel] [PATCH 26/46] block: set job->speed in block_set_speed, Kevin Wolf, 2012/04/06
- [Qemu-devel] [PATCH 35/46] qemu-iotests: qcow2.py, Kevin Wolf, 2012/04/06
- Re: [Qemu-devel] [PULL 00/46] Block patches, Anthony Liguori, 2012/04/10