Clean-up a little bit the RW related bits of BDRV_O_FLAGS. BDRV_O_RDONLY gone (and so is BDRV_O_ACCESS). Default value for bdrv_flags (0/zero) is READ-ONLY. Need to explicitly request READ-WRITE.

Instead of using the field 'readonly' of the BlockDriverState struct for passing the request,
pass the request in the flags parameter to the function.

Signed-off-by: Naphtali Sprei <nsprei@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Naphtali Sprei 2010-01-17 16:48:13 +02:00 committed by Anthony Liguori
parent b196b1532f
commit f5edb014ed
11 changed files with 44 additions and 42 deletions

View file

@ -613,7 +613,7 @@ static int blk_init(struct XenDevice *xendev)
qflags = BDRV_O_RDWR;
} else {
mode = O_RDONLY;
qflags = BDRV_O_RDONLY;
qflags = 0;
info |= VDISK_READONLY;
}