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

Re: [libvirt] [PATCH 4/9] Implement the public API for vol zeroing



On Tue, Mar 02, 2010 at 04:31:19PM -0700, Eric Blake wrote:
> According to David Allan on 3/2/2010 3:13 PM:
> > + * @flags: future flags, use 0 for now
> > + *
> > + * Ensure that future reads from the storage volume return zeroes.
> > + *
> > + * Returns 0 on success, or -1 on error
> > + */
> > +int
> > +virStorageVolZeroOut(virStorageVolPtr vol,
> > +                     unsigned int flags)
> > +{
> > +    virConnectPtr conn;
> > +    VIR_DEBUG("vol=%p, flags=%u", vol, flags);
> 
> To be future-proof, we should explicitly reject non-zero flags.  That way,
> if a newer client contacts an older server with a new flag supported only
> by the client, the client doesn't get the mistaken impression that the
> server can honor the flag.

Agreed, but it should be done in the storage driver implementation, 
rather than this public API entry point. Since different implementations
of the API may support different flags. ie put it in PATH 8


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]