qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 05/14] block: add unsafe_probe


From: Anthony Liguori
Subject: [Qemu-devel] [PATCH 05/14] block: add unsafe_probe
Date: Wed, 24 Aug 2011 13:43:00 -0500

Mark formats that cannot be probed with 100% reliability (just raw).  This is
necessary to implement change-blockdev.

Signed-off-by: Anthony Liguori <address@hidden>
---
 block/raw.c |    2 ++
 block_int.h |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/block/raw.c b/block/raw.c
index 555db4f..5c74bd6 100644
--- a/block/raw.c
+++ b/block/raw.c
@@ -145,6 +145,8 @@ static BlockDriver bdrv_raw = {
     .bdrv_create        = raw_create,
     .create_options     = raw_create_options,
     .bdrv_has_zero_init = raw_has_zero_init,
+
+    .unsafe_probe       = true,
 };
 
 static void bdrv_raw_init(void)
diff --git a/block_int.h b/block_int.h
index f6d02b3..db9ba4b 100644
--- a/block_int.h
+++ b/block_int.h
@@ -145,6 +145,8 @@ struct BlockDriver {
      */
     int (*bdrv_has_zero_init)(BlockDriverState *bs);
 
+    bool unsafe_probe;
+
     QLIST_ENTRY(BlockDriver) list;
 };
 
-- 
1.7.4.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]