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

Re: [libvirt] [PATCH 2/9] Add public API for volume zeroing



On Tue, Mar 02, 2010 at 05:13:27PM -0500, David Allan wrote:
> ---
>  include/libvirt/libvirt.h.in |    2 ++
>  src/libvirt_public.syms      |    1 +
>  2 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
> index 0d1b5b5..6f755c5 100644
> --- a/include/libvirt/libvirt.h.in
> +++ b/include/libvirt/libvirt.h.in
> @@ -1224,6 +1224,8 @@ virStorageVolPtr        virStorageVolCreateXMLFrom      (virStoragePoolPtr pool,
>                                                           unsigned int flags);
>  int                     virStorageVolDelete             (virStorageVolPtr vol,
>                                                           unsigned int flags);
> +int                     virStorageVolZeroOut            (virStorageVolPtr vol,
> +                                                         unsigned int flags);
>  int                     virStorageVolRef                (virStorageVolPtr vol);
>  int                     virStorageVolFree               (virStorageVolPtr vol);


How about we call this  virStorageVolWipe() instead. I'm thinking perhaps some
of the 'flags' we might add in te future would imply writing something that is
not just zeros, at which point the current name is a little odd. eg we might
have

  VIR_STORAGE_VOL_WIPE_ZEROS   = 0,   /* fill with zeros */
  VIR_STORAGE_VOL_WIPE_PATTERN = 2    /* fill with 123456 */
  VIR_STORAGE_VOL_WIPE_RANDOM  = 1    /* fill with random data */

zeroes of course being the default

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]