[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 6/6] block: add -drive copy-on-read=on|off
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [RFC 6/6] block: add -drive copy-on-read=on|off |
Date: |
Thu, 3 Nov 2011 16:21:34 +0000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Nov 03, 2011 at 03:32:17PM +0100, Kevin Wolf wrote:
> Am 17.10.2011 17:47, schrieb Stefan Hajnoczi:
> > This patch adds the -drive copy-on-read=on|off command-line option:
> >
> > copy-on-read=on|off
> > copy-on-read is "on" or "off" and enables whether to copy read backing
> > file sectors into the image file. Copy-on-read avoids accessing the
> > same backing file sectors repeatedly and is useful when the backing
> > file is over a slow network. By default copy-on-read is off.
> >
> > Signed-off-by: Stefan Hajnoczi <address@hidden>
> > ---
> > blockdev.c | 6 ++++++
> > hmp-commands.hx | 5 +++--
> > qemu-config.c | 4 ++++
> > qemu-options.hx | 9 ++++++++-
> > 4 files changed, 21 insertions(+), 3 deletions(-)
> >
> > diff --git a/blockdev.c b/blockdev.c
> > index 0827bf7..1dd0f23 100644
> > --- a/blockdev.c
> > +++ b/blockdev.c
> > @@ -236,6 +236,7 @@ DriveInfo *drive_init(QemuOpts *opts, int
> > default_to_scsi)
> > const char *devaddr;
> > DriveInfo *dinfo;
> > int snapshot = 0;
> > + int copy_on_read;
>
> Another s/int/bool/ :-)
In general I use bool but in this case I hesitated since the other
variables are int I tried to stick with the style. I'm happy to change
it if you prefer bool.
Stefan