[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 06/18] block: move flag bits together
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH v2 06/18] block: move flag bits together |
Date: |
Thu, 26 Jan 2012 18:22:37 +0100 |
Signed-off-by: Paolo Bonzini <address@hidden>
---
block_int.h | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/block_int.h b/block_int.h
index 0bbebe4..6f23d4a 100644
--- a/block_int.h
+++ b/block_int.h
@@ -222,15 +222,18 @@ struct BlockDriver {
struct BlockDriverState {
int64_t total_sectors; /* if we are reading a disk image, give its
size in sectors */
- int read_only; /* if true, the media is read only */
- int keep_read_only; /* if true, the media was requested to stay read only
*/
int open_flags; /* flags used to open the file, re-used for re-open */
- int encrypted; /* if true, the media is encrypted */
- int valid_key; /* if true, a valid encryption key has been set */
- int sg; /* if true, the device is a /dev/sg* */
int copy_on_read; /* if true, copy read backing sectors into image
note this is a reference count */
+ unsigned read_only:1; /* if true, the media is read only */
+ unsigned keep_read_only:1; /* if true, the media was requested to stay
read only */
+ unsigned encrypted:1; /* if true, the media is encrypted */
+ unsigned valid_key:1; /* if true, a valid encryption key has been set */
+ unsigned sg:1; /* if true, the device is a /dev/sg* */
+ unsigned growable:1; /* if true, the disk can expand beyond total_sectors
*/
+ unsigned is_temporary:1; /* if true, the disk was created from a
snapshot */
+
BlockDriver *drv; /* NULL means no media */
void *opaque;
@@ -243,7 +246,6 @@ struct BlockDriverState {
char backing_file[1024]; /* if non zero, the image is a diff of
this file image */
char backing_format[16]; /* if non-zero and backing_file exists */
- int is_temporary;
BlockDriverState *backing_hd;
BlockDriverState *file;
@@ -271,9 +273,6 @@ struct BlockDriverState {
uint64_t total_time_ns[BDRV_MAX_IOTYPE];
uint64_t wr_highest_sector;
- /* Whether the disk can expand beyond total_sectors */
- int growable;
-
/* the memory alignment required for the buffers handled by this driver */
int buffer_alignment;
--
1.7.7.6
- [Qemu-devel] [PATCH v2 00/18] Support mismatched host and guest logical block sizes, Paolo Bonzini, 2012/01/26
- [Qemu-devel] [PATCH v2 01/18] block: do not rely on open_flags for bdrv_is_snapshot, Paolo Bonzini, 2012/01/26
- [Qemu-devel] [PATCH v2 03/18] block: pass protocol flags up to the format, Paolo Bonzini, 2012/01/26
- [Qemu-devel] [PATCH v2 02/18] block: store actual flags in bs->open_flags, Paolo Bonzini, 2012/01/26
- [Qemu-devel] [PATCH v2 04/18] block: non-raw protocols never cache, Paolo Bonzini, 2012/01/26
- [Qemu-devel] [PATCH v2 05/18] block: remove enable_write_cache, Paolo Bonzini, 2012/01/26
- [Qemu-devel] [PATCH v2 06/18] block: move flag bits together,
Paolo Bonzini <=
- [Qemu-devel] [PATCH v2 07/18] raw: remove the aligned_buf, Paolo Bonzini, 2012/01/26
- [Qemu-devel] [PATCH v2 09/18] block: add host_block_size, Paolo Bonzini, 2012/01/26
- [Qemu-devel] [PATCH v2 11/18] iscsi: save host block size, Paolo Bonzini, 2012/01/26
- [Qemu-devel] [PATCH v2 08/18] block: rename buffer_alignment to guest_block_size, Paolo Bonzini, 2012/01/26
- [Qemu-devel] [PATCH v2 10/18] raw: probe host_block_size, Paolo Bonzini, 2012/01/26
- [Qemu-devel] [PATCH v2 12/18] block: allow waiting only for overlapping writes, Paolo Bonzini, 2012/01/26
- [Qemu-devel] [PATCH v2 14/18] block: protect against "torn reads" for guest_block_size > host_block_size, Paolo Bonzini, 2012/01/26
- [Qemu-devel] [PATCH v2 17/18] block: default min_io_size to host block size when doing rmw, Paolo Bonzini, 2012/01/26
- [Qemu-devel] [PATCH v2 16/18] block: default physical block size to host block size, Paolo Bonzini, 2012/01/26
- [Qemu-devel] [PATCH v2 18/18] qemu-io: add blocksize argument to open, Paolo Bonzini, 2012/01/26