qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] block: do not allow read-only=on and snapshot=o


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH] block: do not allow read-only=on and snapshot=on to be used together
Date: Thu, 16 Jan 2014 10:39:30 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Am 14.01.2014 um 20:12 hat Jeff Cody geschrieben:
> Having both read-only=on and snapshot=on together does not make sense;
> currently, the read-only argument is effectively ignored for the
> temporary snapshot.  To prevent confusion, disallow the usage of both
> 'snapshot=on' and 'read-only=on'.
> 
> Signed-off-by: Jeff Cody <address@hidden>

I believe the reason why this was allowed was so that you can use a
read-only file with -snapshot. It might not be necessary any more since
I switched -snapshot implementation to modify the options QDict instead
of manually doing a second bdrv_open().

Did you test that this still works now?

The other question is about this code in bdrv_open_flags():

    /*
     * Snapshots should be writable.
     */
    if (bs->is_temporary) {
        open_flags |= BDRV_O_RDWR;
    }

Is this dead code now because the flag is always already set?

Kevin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]