[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/17] block: move flag bits together
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 06/17] block: move flag bits together |
Date: |
Tue, 13 Dec 2011 13:37:09 +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 f846f90..9324866 100644
--- a/block_int.h
+++ b/block_int.h
@@ -192,15 +192,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;
@@ -213,7 +216,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;
@@ -238,9 +240,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.1
- [Qemu-devel] [PATCH 00/17] Support mismatched host and guest logical block sizes, Paolo Bonzini, 2011/12/13
- [Qemu-devel] [PATCH 01/17] block: do not rely on open_flags for bdrv_is_snapshot, Paolo Bonzini, 2011/12/13
- [Qemu-devel] [PATCH 02/17] block: store actual flags in bs->open_flags, Paolo Bonzini, 2011/12/13
- [Qemu-devel] [PATCH 05/17] block: remove enable_write_cache, Paolo Bonzini, 2011/12/13
- [Qemu-devel] [PATCH 03/17] block: pass protocol flags up to the format, Paolo Bonzini, 2011/12/13
- [Qemu-devel] [PATCH 04/17] block: non-raw protocols never cache, Paolo Bonzini, 2011/12/13
- [Qemu-devel] [PATCH 06/17] block: move flag bits together,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 07/17] raw: remove the aligned_buf, Paolo Bonzini, 2011/12/13
- [Qemu-devel] [PATCH 08/17] block: rename buffer_alignment to guest_block_size, Paolo Bonzini, 2011/12/13
- [Qemu-devel] [PATCH 09/17] block: add host_block_size, Paolo Bonzini, 2011/12/13
- [Qemu-devel] [PATCH 11/17] iscsi: save host block size, Paolo Bonzini, 2011/12/13
- [Qemu-devel] [PATCH 12/17] block: allow waiting only for overlapping writes, Paolo Bonzini, 2011/12/13
- [Qemu-devel] [PATCH 10/17] raw: probe host_block_size, Paolo Bonzini, 2011/12/13
- [Qemu-devel] [PATCH 16/17] block: default physical block size to host block size, Paolo Bonzini, 2011/12/13
- [Qemu-devel] [PATCH 14/17] block: protect against "torn reads" for guest_block_size > host_block_size, Paolo Bonzini, 2011/12/13
- [Qemu-devel] [PATCH 15/17] block: align and serialize I/O when guest_block_size < host_block_size, Paolo Bonzini, 2011/12/13
- [Qemu-devel] [PATCH 13/17] block: allow waiting at arbitrary granularity, Paolo Bonzini, 2011/12/13