[libvirt] [PATCH] Virsh command vol-rename
Daniel P. Berrange
berrange at redhat.com
Fri Apr 19 09:46:14 UTC 2013
On Thu, Apr 18, 2013 at 09:03:59AM -0600, Eric Blake wrote:
> On 04/18/2013 06:21 AM, harryxiyou wrote:
> > On Thu, Apr 18, 2013 at 5:30 PM, Daniel P. Berrange <berrange at redhat.com> wrote:
> >> On Thu, Apr 18, 2013 at 04:29:45PM +0800, harryxiyou at gmail.com wrote:
> >>> From: Harry Wei <harryxiyou at gmail.com>
> >>>
> >>> Vol-rename is a convenience function, requiring when
> >>> one wanna rename a volume name.
> >>>
> >>> Signed-off-by: Harry Wei <harryxiyou at gmail.com>
> >>> ---
> >>> tools/virsh-volume.c | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++
> >>> 1 file changed, 103 insertions(+)
> >>
> >> NACK copying & deleting volumes is totally not what people
> >> want from a "rename" command.
> >>
> >
> > Hmmm..., maybe this is not direct for us. However, i am not sure
> > about what kind of "rename" command we need. Actually, i am
> > investigating what kind of "rename" we need. Let me give another
> > way.
> >
> > Only change the name of volume and need not copying and
> > deleting volume. To back-end storage volume(Offline storage),
> > Libvirt just call relevant storage driver and the storage volume(with
> > a volume name) is created by back-end storage driver. If we wanna
> > change the volume name without copying and deleting, we may
> > need give hook function to let back-end driver to realize relevant
> > driver for rename stuffs.
>
> Exactly - we need to add a new libvirt API that can support renames at
> the backend driver level, with instant effect (a directory pool
> forwarding to rename(2), other pools using pool-specific renaming commands).
>
> It might be worth still having virsh vol-rename have an option to do a
> long-running copy/delete in the case of a backend that doesn't support
> instant renames, but the default should be instant rename or failure.
I don't think we should ever do a copy+delete as part of any rename
command. It just isn't appropriate for the semantics of 'rename' IMHO
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list