Re: [PATCH 1/2]virsh: enable attatch-disk command option '--mode' accept two parameters

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

 



On Tue, Oct 15, 2013 at 06:06:54PM +0800, Chen Hanxiao wrote:
> 
> 
> > -----Original Message-----
> > From: Daniel P. Berrange [mailto:berrange@xxxxxxxxxx]
> > Sent: Tuesday, October 15, 2013 5:42 PM
> > To: Chen Hanxiao
> > Cc: libvir-list@xxxxxxxxxx
> > Subject: Re:  [PATCH 1/2]virsh: enable attatch-disk command option
> > '--mode' accept two parameters
> > 
> > On Tue, Oct 15, 2013 at 11:54:27AM +0800, Chen Hanxiao wrote:
> > > From: Chen Hanxiao <chenhanxiao@xxxxxxxxxxxxxx>
> > >
> > > Current disk could accept both 'readonly' and 'shareable'
> > > at the same time.
> > > But '--mode' could only accept one parameter.
> > >
> > > This patch enables '--mode' accept parameters like examples below:
> > >
> > > virsh # attach-disk domain /home/1.img sdd --mode shareable,readonly
> > 
> > That does not make sense - these options are mutually
> > exclusive. Anything 'readonly' is implicitly 'shareable'
> > without 'shareable' being required.
> 
> Do you mean that we should erase all about parameter 'shareable'?
> Not only '--shareable' but also in '--mode shareable'?
> If we decided to keep readonly and shareable in '--mode', we had to deal with
> accepting two parameters at the same command line.

No, a disk can be in one of three modes

  - Exclusive read-write. This is the default
  - Shared read-write. This is the <shareable/> flag
  - Shared read-only. This is the  <readonly/> flag

It makes no sense to support both <shareable/> and <readonly/> in the
same XML config at once.

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 :|

--
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]