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

Re: [libvirt] [PATCH 1/1] Add enospace option to qemu disk error policy



On Thu, Apr 08, 2010 at 10:33:53PM +0200, Daniel Veillard wrote:
> On Thu, Apr 08, 2010 at 04:11:33PM -0400, David Allan wrote:
> > * Dan Kenigsberg requested explicit support for the qemu default disk error policy which is enospace
> > ---
> >  docs/schemas/domain.rng                            |    1 +
> >  src/conf/domain_conf.c                             |    3 +-
> >  src/conf/domain_conf.h                             |    1 +
> >  src/qemu/qemu_conf.c                               |    2 +
> >  tests/qemuargv2xmltest.c                           |    3 ++
> >  ...uxml2argv-disk-drive-error-policy-enospace.args |    1 +
> >  ...muxml2argv-disk-drive-error-policy-enospace.xml |   32 ++++++++++++++++++++
> >  7 files changed, 42 insertions(+), 1 deletions(-)
> >  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.args
> >  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.xml
> > 
> > diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng
> > index 58c9fcb..56b6705 100644
> > --- a/docs/schemas/domain.rng
> > +++ b/docs/schemas/domain.rng
> > @@ -629,6 +629,7 @@
> >        <choice>
> >          <value>stop</value>
> >          <value>ignore</value>
> > +        <value>enospace</value>
> >        </choice>
> >      </attribute>
> >    </define>
> > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> > index 3cd43eb..2de838b 100644
> > --- a/src/conf/domain_conf.c
> > +++ b/src/conf/domain_conf.c
> > @@ -129,7 +129,8 @@ VIR_ENUM_IMPL(virDomainDiskCache, VIR_DOMAIN_DISK_CACHE_LAST,
> >  VIR_ENUM_IMPL(virDomainDiskErrorPolicy, VIR_DOMAIN_DISK_ERROR_POLICY_LAST,
> >                "default",
> >                "stop",
> > -              "ignore")
> > +              "ignore",
> > +              "enospace")
> > 


> 
>   Apart from being really late, that looks fine, with the exception
> that I don't see where the actual qemu command line is being modified
> I would have expected some conversion from def->error_policy new value
> in qemu_driver.c ?

The actual command line value is generated based on the ENUM declaration,
so just adding to the VIR_ENUM_IMPL is sufficient to make it work here

REgards,
Daniel
-- 
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


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