[Qemu-devel] Re: [PATCH] block: Fix bdrv_commit

2010-05-06 Thread Naphtali Sprei
= bdrv_open(bs_ro, filename, open_flags & ~BDRV_O_RDWR, NULL); > +ret = bdrv_open(bs_ro, filename, open_flags & ~BDRV_O_RDWR, drv); > if (ret < 0) { > bdrv_delete(bs_ro); > /* drive not functional anymore */ Acked-by: Naphtali Sprei

[Qemu-devel] [PATCH] block: read-only: open cdrom as read-only when using monitor's change command

2010-04-25 Thread Naphtali Sprei
Current code of monitor command: 'change', used to open file for read-write uncoditionally. Change to open it as read-only for CDROM, and read-write for all others. Signed-off-by: Naphtali Sprei --- monitor.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a

[Qemu-devel] [PATCH v2] read-only: allow read-only CDROM with any interface

2010-03-23 Thread Naphtali Sprei
v1 -> v2 cosmetic change of if block arrangement Signed-off-by: Naphtali Sprei --- vl.c | 13 + 1 files changed, 5 insertions(+), 8 deletions(-) diff --git a/vl.c b/vl.c index d69250c..11c68f2 100644 --- a/vl.c +++ b/vl.c @@ -1222,19 +1222,16 @@ DriveInfo *drive_init(QemuO

[Qemu-devel] [PATCH] read-only: allow read-only CDROM with any interface

2010-03-21 Thread Naphtali Sprei
Signed-off-by: Naphtali Sprei --- vl.c | 13 + 1 files changed, 5 insertions(+), 8 deletions(-) diff --git a/vl.c b/vl.c index 2e38b77..d3863d7 100644 --- a/vl.c +++ b/vl.c @@ -1255,19 +1255,16 @@ DriveInfo *drive_init(QemuOpts *opts, void *opaque, bdrv_flags

[Qemu-devel] [PATCH v2 1/2] read-only: minor cleanup

2010-03-14 Thread Naphtali Sprei
Really use read-only flags for opening the file when asked for read-only Signed-off-by: Naphtali Sprei --- qemu-nbd.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index eac0c21..a393583 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -258,6 +258,7

[Qemu-devel] [PATCH 2/2] read-only: Another minor cleanup

2010-03-11 Thread Naphtali Sprei
Don't rely on CDROM hint for read_only attribute Signed-off-by: Naphtali Sprei --- hw/scsi-disk.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 8f7ffc1..5cd6ae6 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -612,8 +

[Qemu-devel] [PATCH 1/2] read-only: minor cleanup

2010-03-11 Thread Naphtali Sprei
Really use read-only flags for opening the file when asked for read-only Signed-off-by: Naphtali Sprei --- qemu-nbd.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index eac0c21..d803bfd 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -258,6 +258,7

Re: [Qemu-devel] [BUG] Regression: readonly raw images no longer work

2010-02-22 Thread Naphtali Sprei
Stefan Weil wrote: > This command used to work, but fails now: > > $ i386-softmmu/qemu -snapshot /dev/sda > qemu: could not open disk image /dev/sda: Permission denied > > $ ls -l /dev/sda > brw-rw-r-- 1 root disk 8, 0 13. Feb 08:55 /dev/sda > > The original file of a snapshot needs only read ac

[Qemu-devel] [PATCH v4 rebased] block: more read-only changes, related to backing files

2010-02-14 Thread Naphtali Sprei
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 --- block.c

Re: [Qemu-devel] [PATCH v2] qemu-img: Fix qemu-img can't create qcow image based on read-only image

2010-02-11 Thread Naphtali Sprei
Anthony Liguori wrote: > On 01/28/2010 08:15 PM, Sheng Yang wrote: >> Commit 03cbdac7 "Disable fall-back to read-only when cannot open drive's >> file for read-write" result in read-only image can't be used as backed >> image in qemu-img. >> >

[Qemu-devel] [PATCH v4] block: more read-only changes, related to backing files

2010-02-09 Thread Naphtali Sprei
option for qemu-img.c bdrv_new_open() to open file as read-only Signed-off-by: Naphtali Sprei --- block.c | 80 +++--- block_int.h |2 + qemu-img.c | 15 +++--- 3 files changed, 82 insertions(+), 15 deletions(-) diff --git a

[Qemu-devel] [PATCH v3] block: more read-only changes, related to backing files

2010-02-07 Thread Naphtali Sprei
patch by Sheng Yang Signed-off-by: Naphtali Sprei --- block.c | 75 +++ block_int.h |2 + qemu-img.c | 15 3 files changed, 77 insertions(+), 15 deletions(-) diff --git a/block.c b/block.c index 1919d19..be5f000

[Qemu-devel] [PATCH v2 resend 2/4] qemu-img: Fix qemu-img can't create qcow image based on read-only image

2010-02-04 Thread Naphtali Sprei
Open image file read-only where possible Patch originally written by Sheng Yang Signed-off-by: Naphtali Sprei --- qemu-img.c | 15 ++- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index cbba4fc..b0ac9eb 100644 --- a/qemu-img.c +++ b/qemu

[Qemu-devel] [PATCH v2 resend 3/4] Block: readonly changes

2010-02-04 Thread Naphtali Sprei
Open backing file for read-only During commit upgrade to read-write and back at end to read-only Signed-off-by: Naphtali Sprei --- block.c | 68 --- block_int.h |1 + 2 files changed, 61 insertions(+), 8 deletions(-) diff --git

[Qemu-devel] [PATCH v2 resend 4/4] Open backing file read-only also for snapshot mode

2010-02-04 Thread Naphtali Sprei
Signed-off-by: Naphtali Sprei --- block.c | 10 +- 1 files changed, 1 insertions(+), 9 deletions(-) diff --git a/block.c b/block.c index 4a9df91..780cea9 100644 --- a/block.c +++ b/block.c @@ -483,19 +483,11 @@ int bdrv_open2(BlockDriverState *bs, const char *filename, int flags

[Qemu-devel] [PATCH v2 resend 1/4] Add open_flags to BlockDriverState Will be used later

2010-02-04 Thread Naphtali Sprei
Signed-off-by: Naphtali Sprei --- block.c |1 + block_int.h |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c index 1919d19..66564de 100644 --- a/block.c +++ b/block.c @@ -363,6 +363,7 @@ int bdrv_open2(BlockDriverState *bs, const char *filename

[Qemu-devel] [PATCH v2 resend 0/4] block: more read-only changes, related to backing files

2010-02-04 Thread Naphtali Sprei
This is version 2. The change between previous patch (only 3/4) is the order of closing/re-opening the image. Naphtali Sprei (4): Add open_flags to BlockDriverState Will be used later qemu-img: Fix qemu-img can't create qcow image based on read-only image Block: readonly changes

[Qemu-devel] [PATCH v2 2/4] qemu-img: Fix qemu-img can't create qcow image based on read-only image

2010-02-04 Thread Naphtali Sprei
Open image file read-only where possible Patch originally written by Sheng Yang Signed-off-by: Naphtali Sprei --- qemu-img.c | 15 ++- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index cbba4fc..b0ac9eb 100644 --- a/qemu-img.c +++ b/qemu

[Qemu-devel] Re: [PATCH v2 0/4] block: more read-only changes, related to backing files

2010-02-04 Thread Naphtali Sprei
Naphtali Sprei wrote: > This is version 2. The change between previous patch (only 3/4) is the order > of closing/re-opening the image. Sorry, patch sent without the change of version 2 (in 3/4). Will send later. Naphtali

[Qemu-devel] [PATCH v2 4/4] Open backing file read-only also for snapshot mode

2010-02-04 Thread Naphtali Sprei
Signed-off-by: Naphtali Sprei --- block.c | 10 +- 1 files changed, 1 insertions(+), 9 deletions(-) diff --git a/block.c b/block.c index 527b146..1db9961 100644 --- a/block.c +++ b/block.c @@ -483,19 +483,11 @@ int bdrv_open2(BlockDriverState *bs, const char *filename, int flags

[Qemu-devel] [PATCH v2 3/4] Block: readonly changes

2010-02-04 Thread Naphtali Sprei
Open backing file for read-only During commit upgrade to read-write and back at end to read-only Signed-off-by: Naphtali Sprei --- block.c | 64 +++--- block_int.h |1 + 2 files changed, 57 insertions(+), 8 deletions(-) diff --git a

[Qemu-devel] [PATCH v2 1/4] Add open_flags to BlockDriverState Will be used later

2010-02-04 Thread Naphtali Sprei
Signed-off-by: Naphtali Sprei --- block.c |1 + block_int.h |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c index 1919d19..66564de 100644 --- a/block.c +++ b/block.c @@ -363,6 +363,7 @@ int bdrv_open2(BlockDriverState *bs, const char *filename

[Qemu-devel] [PATCH v2 0/4] block: more read-only changes, related to backing files

2010-02-04 Thread Naphtali Sprei
-write only for commit, and back to read-only when done. Naphtali Sprei (4): Add open_flags to BlockDriverState Will be used later qemu-img: Fix qemu-img can't create qcow image based on read-only image Block: readonly changes Open backing file read-only also for snapshot mode

[Qemu-devel] [PATCH v2 2/4] qemu-img: Fix qemu-img can't create qcow image based on read-only image

2010-02-04 Thread Naphtali Sprei
Open image file read-only where possible Patch originally written by Sheng Yang Signed-off-by: Naphtali Sprei --- qemu-img.c | 15 ++- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index cbba4fc..b0ac9eb 100644 --- a/qemu-img.c +++ b/qemu

Re: [Qemu-devel] [PATCH 3/4] Block: readonly changes

2010-02-04 Thread Naphtali Sprei
Jamie Lokier wrote: > Naphtali Sprei wrote: >> Open backing file for read-only >> During commit upgrade to read-write and back at end to read-only > >> +if (ro) { /* re-open as RO */ >> +bs_ro = bdrv_new(""); >> +ret = bdrv_

[Qemu-devel] [PATCH 4/4] Open backing file read-only also for snapshot mode

2010-02-03 Thread Naphtali Sprei
Signed-off-by: Naphtali Sprei --- block.c | 10 +- 1 files changed, 1 insertions(+), 9 deletions(-) diff --git a/block.c b/block.c index 527b146..1db9961 100644 --- a/block.c +++ b/block.c @@ -483,19 +483,11 @@ int bdrv_open2(BlockDriverState *bs, const char *filename, int flags

[Qemu-devel] [PATCH 3/4] Block: readonly changes

2010-02-03 Thread Naphtali Sprei
Open backing file for read-only During commit upgrade to read-write and back at end to read-only Signed-off-by: Naphtali Sprei --- block.c | 64 +++--- block_int.h |1 + 2 files changed, 57 insertions(+), 8 deletions(-) diff --git a

[Qemu-devel] [PATCH 2/4] qemu-img: Fix qemu-img can't create qcow image based on read-only image

2010-02-03 Thread Naphtali Sprei
Open image file read-only where possible Patch originally written by Sheng Yang Signed-off-by: Naphtali Sprei --- qemu-img.c | 15 ++- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index cbba4fc..b0ac9eb 100644 --- a/qemu-img.c +++ b/qemu

[Qemu-devel] [PATCH 1/4] Add open_flags to BlockDriverState Will be used later

2010-02-03 Thread Naphtali Sprei
Signed-off-by: Naphtali Sprei --- block.c |1 + block_int.h |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c index 1919d19..66564de 100644 --- a/block.c +++ b/block.c @@ -363,6 +363,7 @@ int bdrv_open2(BlockDriverState *bs, const char *filename

[Qemu-devel] [PATCH 0/4] block: more read-only changes, related to backing files

2010-02-03 Thread Naphtali Sprei
The read-only changes broke qemu-img create with read-only base image These changes fix it. It also make things a little safer, opening the backing file for read-only, upgrading to read-write only for commit, and back to read-only when done. Naphtali Sprei (4): Add open_flags to

[Qemu-devel] Question on qcow2 image with base image

2010-02-02 Thread Naphtali Sprei
Hi, when I use a qcow2 image based on a base image, what should happen when I invoke the commit command from the qemu monitor ? Is it expected/intended to "flush" the data into the base image ? IIUC, that is what happening in the released qemu (0.12). I would expect it not to touch the base image.

[Qemu-devel] [PATCH] block: Enable fall-back to read-only for backing file

2010-01-31 Thread Naphtali Sprei
file with read-only mode ? this will be more consistent/predictable ? Or is it better not to fall-back to read-only ? Will a warning message help ? TIA, Naphtali >From 4a10750f5c91b1383118e4421f6b8d3ff3e79b2f Mon Sep 17 00:00:00 2001 From: Naphtali Sprei Date: Sun, 31 Jan 2010 18:2

[Qemu-devel] Re: [PATCH v2] qemu-img: Fix qemu-img can't create qcow image based on read-only image

2010-01-31 Thread Naphtali Sprei
Sheng Yang wrote: > Commit 03cbdac7 "Disable fall-back to read-only when cannot open drive's > file for read-write" result in read-only image can't be used as backed > image in qemu-img. > > Cc: Naphtali Sprei > Signed-off-by: Sheng Yang Acked-by: Napht

[Qemu-devel] Re: [PATCH] Fix qemu-img can't create qcow image based on read-only image

2010-01-28 Thread Naphtali Sprei
Sheng Yang wrote: > Commit 03cbdac7 "Disable fall-back to read-only when cannot open drive's > file for read-write" result in read-only image can't be used as backed > image in qemu-img. > > CC: Naphtali Sprei > Signed-off-by: Sheng Yang > --- > &g

Re: [Qemu-devel] [PATCH v2 0/4] Modifications to the drives' readonly attribute

2010-01-21 Thread Naphtali Sprei
Christoph Hellwig wrote: > Looking at the version of this that landed in git I don't think the > read-only handling is entirely clean after this. I fixed what I could, still I got some questions below. > > - we now normally set the read_only flag from bdrv_open2 when we do >not have the O_R

[Qemu-devel] [PATCH 3/3] Read-only device changed to opens it's file for read-only.

2010-01-21 Thread Naphtali Sprei
Signed-off-by: Naphtali Sprei --- block/bochs.c |6 ++ block/parallels.c |6 ++ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/block/bochs.c b/block/bochs.c index 3489258..fb83594 100644 --- a/block/bochs.c +++ b/block/bochs.c @@ -116,11 +116,9 @@ static int

[Qemu-devel] [PATCH 2/3] Ask for read-write permissions when opening files where needed

2010-01-21 Thread Naphtali Sprei
Found some places that seems needs this explicitly, now that read-write is not the default. Signed-off-by: Naphtali Sprei --- block/qcow2.c |2 +- block/vvfat.c |2 +- qemu-img.c|4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c

[Qemu-devel] [PATCH 2/3] Ask for read-write permissions when opening files

2010-01-21 Thread Naphtali Sprei
Found some places that seems needs this explicitly, now that read-write is not the default. Signed-off-by: Naphtali Sprei --- block/qcow2.c |2 +- block/vvfat.c |2 +- qemu-img.c|4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c

[Qemu-devel] [PATCH 1/3] No need anymore for bdrv_set_read_only

2010-01-21 Thread Naphtali Sprei
Signed-off-by: Naphtali Sprei --- block.c |7 --- block.h |1 - 2 files changed, 0 insertions(+), 8 deletions(-) diff --git a/block.c b/block.c index 73c26ec..8378c18 100644 --- a/block.c +++ b/block.c @@ -1009,13 +1009,6 @@ int bdrv_is_read_only(BlockDriverState *bs) return

[Qemu-devel] [PATCH 1/3] No need anymoe for bdrv_set_read_only

2010-01-21 Thread Naphtali Sprei
Signed-off-by: Naphtali Sprei --- block.c |7 --- block.h |1 - 2 files changed, 0 insertions(+), 8 deletions(-) diff --git a/block.c b/block.c index 73c26ec..8378c18 100644 --- a/block.c +++ b/block.c @@ -1009,13 +1009,6 @@ int bdrv_is_read_only(BlockDriverState *bs) return

[Qemu-devel] [PATCH 0/3] *** SUBJECT HERE ***

2010-01-21 Thread Naphtali Sprei
*** BLURB HERE *** Naphtali Sprei (3): No need anymore for bdrv_set_read_only Ask for read-write permissions when opening files where needed Read-only device changed to opens it's file for read-only. block.c |7 --- block.h |1 - block/bochs.c |

[Qemu-devel] [PATCH 0/3] *** SUBJECT HERE ***

2010-01-21 Thread Naphtali Sprei
*** BLURB HERE *** Naphtali Sprei (3): No need anymoe for bdrv_set_read_only Ask for read-write permissions when opening files Read-only device changed to opens it's file for read-only. block.c |7 --- block.h |1 - block/bochs.c |6 ++

[Qemu-devel] [PATCH 0/3] Even more read-write/read-only fixes and cleanup

2010-01-21 Thread Naphtali Sprei
o check return value. Naphtali Sprei (3): No need anymore for bdrv_set_read_only Ask for read-write permissions when opening files where needed Read-only device changed to opens it's file for read-only. block.c |7 --- block.h |1 - block/bochs.c

[Qemu-devel] Re: [PATCH v2 4/4] Disable fall-back to read-only when cannot open drive's file for read-write

2010-01-18 Thread Naphtali Sprei
Michael S. Tsirkin wrote: > On Sun, Jan 17, 2010 at 04:48:15PM +0200, Naphtali Sprei wrote: >> Signed-off-by: Naphtali Sprei >> --- >> block.c |6 -- >> 1 files changed, 0 insertions(+), 6 deletions(-) >> >> diff --git a/block.c b/block.c >> i

[Qemu-devel] Re: [PATCH v2 2/4] 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 exp

2010-01-18 Thread Naphtali Sprei
Michael S. Tsirkin wrote: > On Sun, Jan 17, 2010 at 04:48:13PM +0200, Naphtali Sprei wrote: >> Instead of using the field 'readonly' of the BlockDriverState struct for >> passing the request, >> pass the request in the flags parameter to the function. >

[Qemu-devel] [PATCH v2 4/4] Disable fall-back to read-only when cannot open drive's file for read-write

2010-01-17 Thread Naphtali Sprei
Signed-off-by: Naphtali Sprei --- block.c |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/block.c b/block.c index 8def3c4..f90e983 100644 --- a/block.c +++ b/block.c @@ -444,8 +444,6 @@ int bdrv_open2(BlockDriverState *bs, const char *filename, int flags, if

[Qemu-devel] [PATCH v2 3/4] Added drives' readonly option

2010-01-17 Thread Naphtali Sprei
Signed-off-by: Naphtali Sprei --- qemu-options.hx |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index e2edd71..4617867 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -103,7 +103,7 @@ DEF("drive", HAS_ARG, QEMU_OP

[Qemu-devel] [PATCH v2 2/4] 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 explici

2010-01-17 Thread Naphtali Sprei
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 --- block.c | 31 +-- block.h |2 -- block/r

[Qemu-devel] [PATCH v2 1/4] Make CDROM a read-only drive

2010-01-17 Thread Naphtali Sprei
Signed-off-by: Naphtali Sprei --- vl.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 06cb40d..76ef8ca 100644 --- a/vl.c +++ b/vl.c @@ -2233,6 +2233,13 @@ DriveInfo *drive_init(QemuOpts *opts, void *opaque, } (void

[Qemu-devel] [PATCH v2 0/4] Modifications to the drives' readonly attribute

2010-01-17 Thread Naphtali Sprei
This is version 2, to replace previous set. Addresses all Kevin comments. Naphtali Sprei (4): Make CDROM a read-only drive 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

[Qemu-devel] [PATCH 3/3] Disable fall-back to read-only when cannot open drive's file for read-write

2010-01-14 Thread Naphtali Sprei
Signed-off-by: Naphtali Sprei --- block.c |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/block.c b/block.c index cbd72cc..0b4b9ad 100644 --- a/block.c +++ b/block.c @@ -457,10 +457,6 @@ int bdrv_open2(BlockDriverState *bs, const char *filename, int flags

[Qemu-devel] [PATCH 2/3] Switch to bit-flags based read-only drive option implementation

2010-01-14 Thread Naphtali Sprei
uest, pass the request in the flags parameter to the function. Signed-off-by: Naphtali Sprei --- block.c | 33 + block.h |4 ++-- block/raw-posix.c |2 +- block/raw-win32.c |4 ++-- block/vmdk.c |9 + hw/

[Qemu-devel] [PATCH 1/3] Make CDROM a read-only drive

2010-01-14 Thread Naphtali Sprei
Signed-off-by: Naphtali Sprei --- vl.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 06cb40d..4f19505 100644 --- a/vl.c +++ b/vl.c @@ -2234,6 +2234,10 @@ DriveInfo *drive_init(QemuOpts *opts, void *opaque, (void)bdrv_set_read_only(dinfo

[Qemu-devel] [PATCH 0/3] Modifications to the drives' readonly attribute

2010-01-14 Thread Naphtali Sprei
Naphtali Sprei (3): Make CDROM a read-only drive Switch to bit-flags based read-only drive option implementation Disable fall-back to read-only when cannot open drive's file for read-write block.c | 29 + block.h |4 ++-- bloc

Re: [Qemu-devel] [PATCH] Added 'access' option to -drive flag

2010-01-05 Thread Naphtali Sprei
Jamie Lokier wrote: > Anthony Liguori wrote: >> On 12/24/2009 03:09 AM, Markus Armbruster wrote: >>> Naphtali Sprei writes: >>> >>>> Added 'access' option to -drive flag >>>> >>>> The new option is: access=[rw|ro|auto] >

[Qemu-devel] [PATCH v2] Added 'access' option to -drive flag

2009-12-24 Thread Naphtali Sprei
The new option is: access=[rw|ro|auto] rw: open the drive's file with Read and Write permission, don't continue if failed ro: open the file only with Read permission auto: open the file with Read and Write permission, if failed, try only Read permision For compatibility reasons, the default is

Re: [Qemu-devel] [PATCH] Added 'access' option to -drive flag

2009-12-24 Thread Naphtali Sprei
Simon Horman wrote: > On Wed, Dec 23, 2009 at 02:12:23PM +0200, Naphtali Sprei wrote: >> Added 'access' option to -drive flag >> >> The new option is: access=[rw|ro|auto] >> rw: open the drive's file with Read and Write permission, don't continue if

[Qemu-devel] [PATCH] Added 'access' option to -drive flag

2009-12-23 Thread Naphtali Sprei
st in the flags parameter to the function. Signed-off-by: Naphtali Sprei --- block.c | 27 +++ block.h |6 -- block/raw-posix.c |2 +- block/raw-win32.c |4 ++-- hw/xen_disk.c |3 ++- monitor.c |2 +- qemu-

[Qemu-devel] [PATCH] A different way to ask for readonly drive

2009-12-14 Thread Naphtali Sprei
write permission and if fails, fall-back to read-only (the default if nothing specified) Suggestions for better naming for flag/values welcomed. I've tried to explicitly pass the required flags for the bdrv_open function in callers, but probably missed some. Naphtali Signed-off-by: N

[Qemu-devel] [PATCH] Fix for cdrom un-eject

2009-11-26 Thread Naphtali Sprei
UNIT ATTENTION state upon reset (as per spec) o always print the file-name in info block command (if applicable) Relevant Spec: Mt. Fuji Commands for Multimedia Devices Version 7: ftp://ftp.seagate.com/sff/INF-8090.PDF Signed-off-by: Naphtali Sprei --- block.c |

Re: [Qemu-devel] Stack corruption problem with SeaBIOS/gPXE under QEMU

2009-11-15 Thread Naphtali Sprei
Kevin O'Connor wrote: > Hi, > > On Thu, Nov 12, 2009 at 01:20:58PM +0200, Naphtali Sprei wrote: >> I've found a problem with the usage of SeaBIOS/gPXE in Qemu. The >> scenario is when failing to boot from network and falling back to >> booting from hard-disk

[Qemu-devel] Stack corruption problem with SeaBIOS/gPXE under QEMU

2009-11-12 Thread Naphtali Sprei
, Naphtali Patch against current SeaBIOS git Signed-off-by: Naphtali Sprei --- src/arch/i386/prefix/pxeprefix.S |2 +- src/arch/i386/prefix/romprefix.S |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arch/i386/prefix/pxeprefix.S b/src/arch/i386/prefix/pxepr

[Qemu-devel] [PATCH] Pass the drive's readonly attribute to the guest OS

2009-10-29 Thread Naphtali Sprei
aging tree, nor committed. So here is the missing patch again, against current head. Naphtali Subject: [PATCH] Pass the drive's readonly attribute to the guest OS Implemented for virtio-blk and for scsi Signed-off-by: Naphtali Sprei --- hw/scsi-disk.c |3 ++- hw/virtio-blk.c |3 ++

[Qemu-devel] [PATCH] Added imlpementation for qemu_error for non-qemu executables

2009-10-28 Thread Naphtali Sprei
Now qemu_error can be called also from shared files, e.g. block.c. Signed-off-by: Naphtali Sprei --- qemu-tool.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/qemu-tool.c b/qemu-tool.c index ba24aa2..186c4f7 100644 --- a/qemu-tool.c +++ b/qemu-tool.c @@ -88,3

[Qemu-devel] Usage of qemu_error withing shared object

2009-10-28 Thread Naphtali Sprei
Hi, I've added a call to qemu_error in block.c file, and got a link error on the qemu-utilities: qemu-img, qemu-nbd and qemu-io. Should there be a stub that implements a qemu_error to be linked with those apps ? Am I missing something ? In my case, I couldn't let the caller report the error (and

[Qemu-devel] [PATCH v2] Added readonly flag to -drive command

2009-10-26 Thread Naphtali Sprei
nly flag. Also, return error code from bdrv_truncate for readonly drive. Signed-off-by: Naphtali Sprei --- block.c | 19 +++ block.h |1 + qemu-config.c |3 +++ vl.c | 10 ++ 4 files changed, 29 insertions(+), 4 deletions(-) diff --