Re: [PATCH 1.2.8] storage: zfs: fix double listing of new volumes

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

 



  John Ferlan wrote:

> 
> 
> On 08/27/2014 05:02 AM, Roman Bogorodskiy wrote:
> > Currently, after calling commands to create a new volumes,
> > virStorageBackendZFSCreateVol calls virStorageBackendZFSFindVols that
> > calls virStorageBackendZFSParseVol.
> > 
> > virStorageBackendZFSParseVol checks if a volume already exists by
> > trying to get it using virStorageVolDefFindByName.
> > 
> > For a just created volume it returns NULL, so volume is reported as
> > new and appended to pool->volumes. This causes a volume to be listed
> > twice as storageVolCreateXML appends this new volume to the list as
> > well.
> > 
> > Fix that by passing a new volume definition to
> > virStorageBackendZFSParseVol so it could determine if it needs to add
> > this volume to the list.
> > ---
> >  src/storage/storage_backend_zfs.c | 45 ++++++++++++++++++++++-----------------
> >  1 file changed, 26 insertions(+), 19 deletions(-)
> > 
> 
> ACK
> 
> Although it seems the "main" reason the create backend called the
> FindVols was to ascertain if the volume was successfully created via the
> virCommandRun call.
> 
> I believe this is safe for 1.2.8

Pushed, thanks!

Yeah, this schema looks a little awkward (that's not an excuse for me
placing a bug :-) ), but on the other hand, currently there's no
function to retrieve information about specific volume and probably it
doesn't make sense to introduce one.

Roman Bogorodskiy

Attachment: pgpy98cxw_DkO.pgp
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]