From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:52461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqT2e-0003pY-Vl for qemu-devel@nongnu.org; Thu, 26 Jan 2012 12:23:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RqT2a-0003Kg-IA for qemu-devel@nongnu.org; Thu, 26 Jan 2012 12:23:20 -0500 Received: from mail-iy0-f173.google.com ([209.85.210.173]:60416) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqT2a-0003D7-DJ for qemu-devel@nongnu.org; Thu, 26 Jan 2012 12:23:16 -0500 Received: by mail-iy0-f173.google.com with SMTP id k25so1227300iah.4 for ; Thu, 26 Jan 2012 09:23:16 -0800 (PST) Sender: Paolo Bonzini From: Paolo Bonzini Date: Thu, 26 Jan 2012 18:22:37 +0100 Message-Id: <1327598569-5199-7-git-send-email-pbonzini@redhat.com> In-Reply-To: <1327598569-5199-1-git-send-email-pbonzini@redhat.com> References: <1327598569-5199-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH v2 06/18] block: move flag bits together List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com Signed-off-by: Paolo Bonzini --- 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