diff options
author | Naphtali Sprei <nsprei@redhat.com> | 2010-02-14 13:39:18 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-02-19 15:32:15 -0600 |
commit | 4dca4b639cb20fee38f6eec0a391aecc0ad8848d (patch) | |
tree | 4cdcfc8a46c1a041c53c5d590fefe71179101b76 /block_int.h | |
parent | e94a79364871e06767fc21506f0038f632e1386e (diff) | |
download | qemu-4dca4b639cb20fee38f6eec0a391aecc0ad8848d.tar.gz qemu-4dca4b639cb20fee38f6eec0a391aecc0ad8848d.tar.bz2 qemu-4dca4b639cb20fee38f6eec0a391aecc0ad8848d.zip |
block: more read-only changes, related to backing files
Open backing file read-only where possible
Upgrade backing file to read-write during commit, back to read-only after commit
If upgrade fail, back to read-only. If also fail, "disconnect" the drive.
Signed-off-by: Naphtali Sprei <nsprei@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'block_int.h')
-rw-r--r-- | block_int.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block_int.h b/block_int.h index 930a5a4d11..50e1a0b770 100644 --- a/block_int.h +++ b/block_int.h @@ -130,6 +130,8 @@ 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 removable; /* if true, the media can be removed */ int locked; /* if true, the media cannot temporarily be ejected */ int encrypted; /* if true, the media is encrypted */ |