diff options
| author | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2011-10-27 10:54:27 +0100 |
|---|---|---|
| committer | Kevin Wolf <kwolf@redhat.com> | 2011-10-28 19:25:49 +0200 |
| commit | e7c637967e6aad195b5f30cfd995913c9e0b4666 (patch) | |
| tree | bdb6b7464a29eed0258efc6221b2b89dc61110b5 /hw/scsi-disk.c | |
| parent | b46578555c4bce64e3daba4591334aba2d12c156 (diff) | |
| download | focaccia-qemu-e7c637967e6aad195b5f30cfd995913c9e0b4666.tar.gz focaccia-qemu-e7c637967e6aad195b5f30cfd995913c9e0b4666.zip | |
block: set bs->read_only before .bdrv_open()
Several block drivers set bs->read_only in .bdrv_open() but block.c:bdrv_open_common() clobbers its value. Additionally, QED uses bdrv_is_read_only() in .bdrv_open() to decide whether to perform consistency checks. The correct ordering is to initialize bs->read_only from the open flags before calling .bdrv_open(). This way block drivers can override it if necessary and can use bdrv_is_read_only() in .bdrv_open(). Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/scsi-disk.c')
0 files changed, 0 insertions, 0 deletions