[libvirt] [PATCH v3 UPDATED 0/2] Qemu/Gluster support in Libvirt
by Harsh Prateek Bora
Changelog:
v3 updated:
- Fix other network backends (nbd, rbd, sheepdog) to initialize new members
(transport, socket) of _virDomainDiskHostDef appropriately so that garbage
values doesnt break the argv2xml tests.
v3:
- RNG schema updated as required for unix transport [Paolo]
- introduced another new attribute 'socket' for unix transport [Paolo]
- Uses virURIFormat and virURIParse for URI parsing. [danpb]
- updated documentation as required. [Jirka]
v2:
- Addressed review comments by Jiri
- Updated patcheset as per new URI spec
Ref: http://lists.gnu.org/archive/html/qemu-devel/2012-09/msg05199.html
v1:
- Initial prototype
Harsh Prateek Bora (2):
Qemu/Gluster: Add Gluster protocol as supported network disk formats.
tests: Add tests for gluster protocol based network disks support
docs/formatdomain.html.in | 24 ++-
docs/schemas/domaincommon.rng | 35 ++++-
src/conf/domain_conf.c | 72 +++++++--
src/conf/domain_conf.h | 12 ++
src/libvirt_private.syms | 2 +
src/qemu/qemu_command.c | 168 ++++++++++++++++++++-
tests/qemuargv2xmltest.c | 1 +
.../qemuxml2argv-disk-drive-network-gluster.args | 1 +
.../qemuxml2argv-disk-drive-network-gluster.xml | 35 +++++
tests/qemuxml2argvtest.c | 2 +
10 files changed, 323 insertions(+), 29 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-gluster.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-gluster.xml
--
1.7.11.7
12 years
[libvirt] [PATCH] Add device operations for lxc v1
by Heiher
Hello,
Operations:
1. lxcDomainAttachDevice
2. lxcDomainAttachDeviceFlags
3. lxcDomainDetachDevice
4. lxcDomainDetachDeviceFlags
5. lxcDomainUpdateDeviceFlags
In live mode, set devices.allow/deny to instance's cgroup and insert
disk config into current domain.
In config mode, just insert disk config into current domain.
--
Best regards!
Heiher
https://heiher.info
12 years
[libvirt] [PATCH 0/5] Structured error logging and syslog support
by Miloslav Trmač
This is sort of a v2 of the "Structured syslog" series.
Patches 1-4 allow callers virLogMessage to add arbitrary additional data,
and use it in virRaiseErrorFull and its callers. This data is sent
to journal (and ignored for other outputs).
Because the additional fields for errors include virErrorDomain and
virErrorNumber, this allows _programs_ to _automatically_ detect the event
and react to it, perhaps alerting the user.
Patch 5 adds the "syslog/json" log output type, in a way that is comparably
async-signal-safe to the other log outputs (i.e. it's not safe by the letter
of the standard, but safe in practice). I still think that having this
format output is desirable, but I'll accept it if you decide that it is
not wanted in libvirt.
Miloslav Trmač (5):
Add a metadata parameter to virLog{,V}Message
Add metadata to virLogOutputFunc
Use helper functions to format the journal iov array
Add detailed error information to journal
Add "syslog/json" log output format.
docs/logging.html.in | 3 +
src/util/logging.c | 445 +++++++++++++++++++++++++++++++++++++++++++--------
src/util/logging.h | 27 +++-
src/util/viraudit.c | 4 +-
src/util/virterror.c | 33 +++-
tests/testutils.c | 1 +
6 files changed, 437 insertions(+), 76 deletions(-)
--
1.7.11.7
12 years
[libvirt] [PATCH v3] Autogenerate AUTHORS
by Cole Robinson
AUTHORS.in tracks the maintainers, as well as some folks who were
previously in AUTHORS but don't have a git commit with proper
attribution.
Generated output is sorted alphabetically and lacks pretty spacing, so
tweak AUTHORS.in to follow the same format.
Additionally, drop the syntax-check rule that previously validated
AUTHORS against git log.
---
I couldn't get the latter chunk of sed magic working... and since nothing
really makes me reach my frustration limit faster than Makefiles and
shell trickery, I just stuck with the basic changes.
v3:
Fix VPATH builds
Use sort -u
Sort AUTHORS.in
Condense bootstrap.conf change
.gitignore | 1 +
.mailmap | 15 +++-
AUTHORS | 279 ---------------------------------------------------------
AUTHORS.in | 90 +++++++++++++++++++
Makefile.am | 12 ++-
bootstrap.conf | 4 +-
cfg.mk | 15 ----
7 files changed, 118 insertions(+), 298 deletions(-)
delete mode 100644 AUTHORS
create mode 100644 AUTHORS.in
diff --git a/.gitignore b/.gitignore
index c185cbc..804eda4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,6 +26,7 @@
.memdump
.sc-start-sc_*
/ABOUT-NLS
+/AUTHORS
/COPYING
/ChangeLog
/GNUmakefile
diff --git a/.mailmap b/.mailmap
index 98ff6dc..c430200 100644
--- a/.mailmap
+++ b/.mailmap
@@ -3,7 +3,6 @@
# Email consolidation:
# <Preferred address in AUTHORS> <other alias used by same author>
-<amy.griffis(a)hp.com> <aron.griffis(a)hp.com>
<bozzolan(a)gmail.com> <redshift(a)gmx.com>
<charles_duffy(a)messageone.com> <charles(a)dyfis.net>
<dfj(a)redhat.com> <dfj(a)dfj.bne.redhat.com>
@@ -35,6 +34,8 @@
<gerd(a)egidy.de> <gerd.von.egidy(a)intra2net.com>
<benoar(a)dolka.fr> <benjamin.cama(a)telecom-bretagne.eu>
<zhlcindy(a)linux.vnet.ibm.com> <zhlcindy(a)gmail.com>
+<serge.hallyn(a)canonical.com> <serue(a)us.ibm.com>
+<pritesh.kothari(a)sun.com> <Pritesh.Kothari(a)Sun.COM>
# Name consolidation:
# Preferred author spelling <preferred email>
@@ -43,3 +44,15 @@ Royce Lv <lvroyce(a)linux.vnet.ibm.com>
Daniel J Walsh <dwalsh(a)redhat.com>
Ján Tomko <jtomko(a)redhat.com>
Gerd von Egidy <gerd(a)egidy.de>
+MATSUDA Daiki <matsudadik(a)intellilink.co.jp>
+Tang Chen <tangchen(a)cn.fujitsu.com>
+Peng Zhou <ailvpeng25(a)gmail.com>
+Dirk Herrendoerfer <d.herrendoerfer(a)herrendoerfer.name>
+Thibault VINCENT <thibault.vincent(a)smartjog.com>
+Aurelien Rougemont <beorn(a)binaries.fr>
+Serge E. Hallyn <serge.hallyn(a)canonical.com>
+Henrik Persson E <henrik.e.persson(a)ericsson.com>
+Philipp Hahn <hahn(a)univention.de>
+Marco Bozzolan <bozzolan(a)gmail.com>
+Marco Bozzolan <redshift(a)gmx.com>
+Pritesh Kothari <pritesh.kothari(a)sun.com>
diff --git a/AUTHORS b/AUTHORS
deleted file mode 100644
index 27c4eda..0000000
--- a/AUTHORS
+++ /dev/null
@@ -1,279 +0,0 @@
- libvirt Authors
- ===============
-
-The libvirt project was initiated by:
-
- Daniel Veillard <veillard(a)redhat.com> or <daniel(a)veillard.com>
-
-The primary maintainers and people with commit access rights:
-
- Daniel Veillard <veillard(a)redhat.com>
- Daniel Berrange <berrange(a)redhat.com>
- Richard W.M. Jones <rjones(a)redhat.com>
- Mark McLoughlin <markmc(a)redhat.com>
- Anthony Liguori <aliguori(a)us.ibm.com>
- Jim Meyering <meyering(a)redhat.com>
- Jim Fehlig <jfehlig(a)suse.com>
- Chris Lalancette <clalance(a)redhat.com>
- Cole Robinson <crobinso(a)redhat.com>
- Guido Günther <agx(a)sigxcpu.org>
- John Levon <john.levon(a)sun.com>
- Matthias Bolte <matthias.bolte(a)googlemail.com>
- Jiří Denemark <jdenemar(a)redhat.com>
- Dave Allan <dallan(a)redhat.com>
- Laine Stump <laine(a)redhat.com>
- Stefan Berger <stefanb(a)us.ibm.com>
- Eric Blake <eblake(a)redhat.com>
- Justin Clift <jclift(a)redhat.com>
- Osier Yang <jyang(a)redhat.com>
- Wen Congyang <wency(a)cn.fujitsu.com>
- Michal Prívozník <mprivozn(a)redhat.com>
- Peter Krempa <pkrempa(a)redhat.com>
- Christophe Fergeau <cfergeau(a)redhat.com>
- Alex Jia <ajia(a)redhat.com>
- Martin Kletzander <mkletzan(a)redhat.com>
-
-Previous maintainers:
- Karel Zak <kzak(a)redhat.com>
- Atsushi SAKAI <sakaia(a)jp.fujitsu.com>
- Dave Leskovec <dlesko(a)linux.vnet.ibm.com>
- Dan Smith <danms(a)us.ibm.com>
-
-Patches have also been contributed by:
-
- David Lutterkort <dlutter(a)redhat.com>
- Andrew Puch <apuch(a)redhat.com>
- Philippe Berthault <philippe.berthault(a)Bull.net>
- Hugh Brock <hbrock(a)redhat.com>
- Michel Ponceau <michel.ponceau(a)bull.net>
- Jeremy Katz <katzj(a)redhat.com>
- Pete Vetere <pvetere(a)redhat.com>
- Kazuki Mizushima <mizushima.kazuk(a)jp.fujitsu.com>
- Saori Fukuta <fukuta.saori(a)jp.fujitsu.com>
- Tatsuro Enokura <fj7716hz(a)aa.jp.fujitsu.com>
- Takahashi Tomohiro <takatom(a)jp.fujitsu.com>
- Nobuhiro Itou <fj0873gn(a)aa.jp.fujitsu.com>
- Masayuki Sunou <fj1826dm(a)aa.jp.fujitsu.com>
- Mark Johnson <johnson.nh(a)gmail.com>
- Christian Ehrhardt <ehrhardt(a)linux.vnet.ibm.com>
- Shuveb Hussain <shuveb(a)binarykarma.com>
- Jim Paris <jim(a)jtan.com>
- Daniel Hokka Zakrisson <daniel(a)hozac.com>
- Mads Chr. Olesen <shiyee(a)shiyee.dk>
- Anton Protopopov <aspsk2(a)gmail.com>
- Stefan de Konink <dekonink(a)kinkrsoftware.nl>
- Kaitlin Rupert <kaitlin(a)linux.vnet.ibm.com>
- Evgeniy Sokolov <evg(a)openvz.org>
- David Lively <dlively(a)virtualiron.com>
- Charles Duffy <Charles_Duffy(a)messageone.com>
- Nguyen Anh Quynh <aquynh(a)gmail.com>
- James Morris <jmorris(a)namei.org>
- Chris Wright <chrisw(a)redhat.com>
- Ben Guthro <ben.guthro(a)gmail.com>
- Shigeki Sakamoto <fj0588di(a)aa.jp.fujitsu.com>
- Gerd von Egidy <gerd(a)egidy.de>
- Itamar Heim <iheim(a)redhat.com>
- Markus Armbruster <armbru(a)redhat.com>
- Ryota Ozaki <ozaki.ryota(a)gmail.com>
- Daniel J Walsh <dwalsh(a)redhat.com>
- Maximilian Wilhelm <max(a)rfc2324.org>
- Pritesh Kothari <Pritesh.Kothari(a)Sun.COM>
- Amit Shah <amit.shah(a)redhat.com>
- Florian Vichot <florian.vichot(a)diateam.net>
- Serge E. Hallyn <serue(a)us.ibm.com>
- Soren Hansen <soren(a)linux2go.dk>
- Abel Míguez Rodríguez<amiguezr(a)pdi.ucm.es>
- Doug Goldstein <cardoe(a)cardoe.com>
- Javier Fontan <jfontan(a)gmail.com>
- Federico Simoncelli <fsimonce(a)redhat.com>
- Amy Griffis <amy.griffis(a)hp.com>
- Henrik Persson E <henrik.e.persson(a)ericsson.com>
- Satoru SATOH <satoru.satoh(a)gmail.com>
- Paolo Bonzini <pbonzini(a)redhat.com>
- Miloslav Trmač <mitr(a)redhat.com>
- Jamie Strandboge <jamie(a)canonical.com>
- Gerhard Stenzel <gerhard.stenzel(a)de.ibm.com>
- Matthew Booth <mbooth(a)redhat.com>
- Diego Elio Pettenò <flameeyes(a)gmail.com>
- Adam Litke <agl(a)us.ibm.com>
- Steve Yarmie <steve.yarmie(a)gmail.com>
- Dan Kenigsberg <danken(a)redhat.com>
- Yuji NISHIDA <nishidy(a)nict.go.jp>
- Dustin Xiong <x_k_123(a)hotmail.com>
- Rolf Eike Beer <eike(a)sf-mail.de>
- Wolfgang Mauerer <wolfgang.mauerer(a)siemens.com>
- Philipp Hahn <hahn(a)univention.de>
- Ed Swierk <eswierk(a)aristanetworks.com>
- Paolo Smiraglia <paolo.smiraglia(a)gmail.com>
- Sharadha Prabhakar <sharadha.prabhakar(a)citrix.com>
- Chris Wong <wongc-redhat(a)hoku.net>
- Daniel Berteaud <daniel(a)firewall-services.com>
- Dustin Kirkland <kirkland(a)canonical.com>
- Luiz Capitulino <lcapitulino(a)redhat.com>
- Ryan Harper <ryanh(a)us.ibm.com>
- Spencer Shimko <sshimko(a)tresys.com>
- Marco Bozzolan <bozzolan(a)gmail.com>
- Alex Williamson <alex.williamson(a)redhat.com>
- Ersek Laszlo <lacos(a)caesar.elte.hu>
- Kenneth Nagin <NAGIN(a)il.ibm.com>
- Klaus Ethgen <Klaus(a)Ethgen.de>
- Bryan Kearney <bkearney(a)redhat.com>
- Darry L. Pierce <dpierce(a)redhat.com>
- David Jorm <dfj(a)redhat.com>
- Eduardo Otubo <otubo(a)linux.vnet.ibm.com>
- Garry Dolley <gdolley(a)arpnetworks.com>
- Harshavardhana <harsha(a)gluster.com>
- Jonas Eriksson <jonas.j.eriksson(a)ericsson.com>
- Jun Koi <junkoi2004(a)gmail.com>
- Olivier Fourdan <ofourdan(a)redhat.com>
- Ron Yorston <rmy(a)tigress.co.uk>
- Shahar Klein <shaharklein(a)yahoo.com>
- Taizo ITO <taizo.ito(a)hde.co.jp>
- Thomas Treutner <thomas(a)scripty.at>
- Jean-Baptiste Rouault <jean-baptiste.rouault(a)diateam.net>
- Марк Коренберг <socketpair(a)gmail.com>
- Alan Pevec <apevec(a)redhat.com>
- Aurelien Rougemont <beorn(a)binaries.fr>
- Patrick Dignan <pat_dignan(a)dell.com>
- Serge Hallyn <serge.hallyn(a)canonical.com>
- Nikunj A. Dadhania <nikunj(a)linux.vnet.ibm.com>
- Lai Jiangshan <laijs(a)cn.fujitsu.com>
- Harsh Prateek Bora <harsh(a)linux.vnet.ibm.com>
- John Morrissey <jwm(a)horde.net>
- KAMEZAWA Hiroyuki <kamezawa.hiroyu(a)jp.fujitsu.com>
- Hu Tao <hutao(a)cn.fujitsu.com>
- Laurent Léonard <laurent(a)open-minds.org>
- MORITA Kazutaka <morita.kazutaka(a)lab.ntt.co.jp>
- Josh Durgin <josh.durgin(a)inktank.com>
- Roopa Prabhu <roprabhu(a)cisco.com>
- Paweł Krześniak <pawel.krzesniak(a)gmail.com>
- Kay Schubert <kayegypt(a)web.de>
- Marc-André Lureau <marcandre.lureau(a)redhat.com>
- Juerg Haefliger <juerg.haefliger(a)hp.com>
- Matthias Dahl <mdvirt(a)designassembly.de>
- Niels de Vos <ndevos(a)redhat.com>
- Davidlohr Bueso <dave(a)gnu.org>
- Alon Levy <alevy(a)redhat.com>
- Hero Phương <herophuong93(a)gmail.com>
- Zdenek Styblik <stybla(a)turnovfree.net>
- Gui Jianfeng <guijianfeng(a)cn.fujitsu.com>
- Michal Novotny <minovotn(a)redhat.com>
- Markus Groß <gross(a)univention.de>
- Phil Petty <phpetty(a)cisco.com>
- Taku Izumi <izumi.taku(a)jp.fujitsu.com>
- Minoru Usui <usui(a)mxm.nes.nec.co.jp>
- Tiziano Mueller <dev-zero(a)gentoo.org>
- Thibault VINCENT <thibault.vincent(a)smartjog.com>
- Naoya Horiguchi <n-horiguchi(a)ah.jp.nec.com>
- Jesse Cook <code.crashenx(a)gmail.com>
- Alexander Todorov <atodorov(a)otb.bg>
- Richard Laager <rlaager(a)wiktel.com>
- Mark Wu <dwu(a)redhat.com>
- Yufang Zhang <yuzhang(a)redhat.com>
- Supriya Kannery <supriyak(a)linux.vnet.ibm.com>
- Dirk Herrendoerfer <d.herrendoerfer(a)herrendoerfer.name>
- Taisuke Yamada <tai(a)rakugaki.org>
- Heath Petersen <HeathPetersen(a)Kandre.com>
- Neil Wilson <neil(a)aldur.co.uk>
- Ohad Levy <ohadlevy(a)gmail.com>
- Michael Chapman <mike(a)very.puzzling.org>
- Daniel Gollub <gollub(a)b1-systems.de>
- David S. Wang <dwang2(a)cisco.com>
- Ruben Kerkhof <ruben(a)rubenkerkhof.com>
- Scott Moser <smoser(a)ubuntu.com>
- Guannan Ren <gren(a)redhat.com>
- John Williams <john.williams(a)petalogix.com>
- Michael Santos <michael.santos(a)gmail.com>
- Oskari Saarenmaa <os(a)ohmu.fi>
- Nan Zhang <nzhang(a)redhat.com>
- Wieland Hoffmann <themineo(a)googlemail.com>
- Douglas Schilling Landgraf <dougsland(a)redhat.com>
- Tom Vijlbrief <tom.vijlbrief(a)xs4all.nl>
- Shradha Shah <sshah(a)solarflare.com>
- Steve Hodgson <shodgson(a)solarflare.com>
- Xu He Jie <xuhj(a)linux.vnet.ibm.com>
- Lei Li <lilei(a)linux.vnet.ibm.com>
- Matthias Witte <witte(a)netzquadrat.de>
- Tang Chen <tangchen(a)cn.fujitsu.com>
- Dan Horák <dan(a)danny.cz>
- Sage Weil <sage(a)newdream.net>
- David L Stevens <dlstevens(a)us.ibm.com>
- Tyler Coumbes <coumbes(a)gmail.com>
- Royce Lv <lvroyce(a)linux.vnet.ibm.com>
- Patrice LACHANCE <patlachance(a)gmail.com>
- Eli Qiao <taget(a)linux.vnet.ibm.com>
- Michael Wood <esiotrot(a)gmail.com>
- Bharata B Rao <bharata(a)linux.vnet.ibm.com>
- Srivatsa S. Bhat <srivatsa.bhat(a)linux.vnet.ibm.com>
- Chang Liu <lingjiao.lc(a)taobao.com>
- Lorin Hochstein <lorin(a)isi.edu>
- Christian Franke <nobody(a)nowhere.ws>
- Prerna Saxena <prerna(a)linux.vnet.ibm.com>
- Michael Ellerman <michael(a)ellerman.id.au>
- Rommer <rommer(a)active.by>
- Yuri Chornoivan <yurchor(a)ukr.net>
- Deepak C Shetty <deepakcs(a)linux.vnet.ibm.com>
- Laszlo Ersek <lersek(a)redhat.com>
- Zeeshan Ali (Khattak) <zeeshanak(a)gnome.org>
- Marcelo Cerri <mhcerri(a)linux.vnet.ibm.com>
- Hendrik Schwartke <hendrik(a)os-t.de>
- Ansis Atteka <aatteka(a)nicira.com>
- Dan Wendlandt <dan(a)nicira.com>
- Kyle Mestery <kmestery(a)cisco.com>
- Lincoln Myers <lincoln_myers(a)yahoo.com>
- Peter Robinson <pbrobinson(a)gmail.com>
- Benjamin Cama <benoar(a)dolka.fr>
- Duncan Rance <libvirt(a)dunquino.com>
- Peng Zhou <ailvpeng25(a)gmail.com>
- Li Zhang <zhlcindy(a)linux.vnet.ibm.com>
- Stef Walter <stefw(a)gnome.org>
- Christian Benvenuti <benve(a)cisco.com>
- Ilja Livenson <ilja.livenson(a)gmail.com>
- Stefan Bader <stefan.bader(a)canonical.com>
- MATSUDA Daiki <matsudadik(a)intellilink.co.jp>
- Jan Kiszka <jan.kiszka(a)siemens.com>
- Ryan Woodsmall <rwoodsmall(a)gmail.com>
- Wido den Hollander <wido(a)widodh.nl>
- Eugen Feller <eugen.feller(a)inria.fr>
- Dmitry Guryanov <dguryanov(a)parallels.com>
- William Jon McCann <william.jon.mccann(a)gmail.com>
- David Weber <wb(a)munzinger.de>
- Marti Raudsepp <marti(a)juffo.org>
- Radu Caragea <dmns_serp(a)yahoo.com>
- Beat Jörg <Beat.Joerg(a)ssatr.ch>
- Gao feng <gaofeng(a)cn.fujitsu.com>
- Dipankar Sarma <dipankar(a)in.ibm.com>
- Gerd Hoffmann <kraxel(a)redhat.com>
- Viktor Mihajlovski <mihajlov(a)linux.vnet.ibm.com>
- Thang Pham <thang.pham(a)us.ibm.com>
- Eiichi Tsukata <eiichi.tsukata.xh(a)hitachi.com>
- Sascha Peilicke <saschpe(a)suse.de>
- Chuck Short <chuck.short(a)canonical.com>
- Sebastian Wiedenroth <wiedi(a)frubar.net>
- Ata E Husain Bohra <ata.husain(a)hotmail.com>
- Ján Tomko <jtomko(a)redhat.com>
- Richa Marwaha <rmarwah(a)linux.vnet.ibm.com>
- Peter Feiner <peter(a)gridcentric.ca>
- Frido Roose <frido.roose(a)gmail.com>
- Asad Saeed <asad.saeed(a)acidseed.com>
- Sukadev Bhattiprolu <sukadev(a)linux.vnet.ibm.com>
- Thomas Woerner <twoerner(a)redhat.com>
- J.B. Joret <jb(a)linux.vnet.ibm.com>
- Stefan Hajnoczi <stefanha(a)linux.vnet.ibm.com>
- Gene Czarcinski <gene(a)czarc.net>
- Nishank Trivedi <nistrive(a)cisco.com>
- Jasper Lievisse Adriaanse <jasper(a)humppa.nl>
- Paul Eggert <eggert(a)cs.ucla.edu>
- Dwight Engen <dwight.engen(a)oracle.com>
- liguang <lig.fnst(a)cn.fujitsu.com>
- Chuck Short <zulcss(a)gmail.com>
- Alexander Larsson <alexl(a)redhat.com>
-
- [....send patches to get your name here....]
-
-The libvirt Logo was designed by Diana Fong
-
--- End
-;; Local Variables:
-;; coding: utf-8
-;; End:
diff --git a/AUTHORS.in b/AUTHORS.in
new file mode 100644
index 0000000..01339f2
--- /dev/null
+++ b/AUTHORS.in
@@ -0,0 +1,90 @@
+ libvirt Authors
+ ===============
+
+The libvirt project was initiated by:
+
+Daniel Veillard <veillard(a)redhat.com> or <daniel(a)veillard.com>
+
+The primary maintainers and people with commit access rights:
+
+Alex Jia <ajia(a)redhat.com>
+Martin Kletzander <mkletzan(a)redhat.com>
+Alex Jia <ajia(a)redhat.com>
+Anthony Liguori <aliguori(a)us.ibm.com>
+Chris Lalancette <clalance(a)redhat.com>
+Christophe Fergeau <cfergeau(a)redhat.com>
+Cole Robinson <crobinso(a)redhat.com>
+Daniel Berrange <berrange(a)redhat.com>
+Daniel Veillard <veillard(a)redhat.com>
+Dave Allan <dallan(a)redhat.com>
+Eric Blake <eblake(a)redhat.com>
+Guido Günther <agx(a)sigxcpu.org>
+Jim Fehlig <jfehlig(a)suse.com>
+Jim Meyering <meyering(a)redhat.com>
+Jiří Denemark <jdenemar(a)redhat.com>
+John Levon <john.levon(a)sun.com>
+Justin Clift <jclift(a)redhat.com>
+Laine Stump <laine(a)redhat.com>
+Mark McLoughlin <markmc(a)redhat.com>
+Martin Kletzander <mkletzan(a)redhat.com>
+Matthias Bolte <matthias.bolte(a)googlemail.com>
+Michal Prívozník <mprivozn(a)redhat.com>
+Osier Yang <jyang(a)redhat.com>
+Peter Krempa <pkrempa(a)redhat.com>
+Richard W.M. Jones <rjones(a)redhat.com>
+Stefan Berger <stefanb(a)us.ibm.com>
+Wen Congyang <wency(a)cn.fujitsu.com>
+
+Previous maintainers:
+
+Atsushi SAKAI <sakaia(a)jp.fujitsu.com>
+Dan Smith <danms(a)us.ibm.com>
+Dave Leskovec <dlesko(a)linux.vnet.ibm.com>
+Karel Zak <kzak(a)redhat.com>
+
+Patches have also been contributed by:
+
+Abel Míguez Rodríguez <amiguezr(a)pdi.ucm.es>
+Amit Shah <amit.shah(a)redhat.com>
+Andrew Puch <apuch(a)redhat.com>
+Anton Protopopov <aspsk2(a)gmail.com>
+Ben Guthro <ben.guthro(a)gmail.com>
+Christian Ehrhardt <ehrhardt(a)linux.vnet.ibm.com>
+Daniel Hokka Zakrisson <daniel(a)hozac.com>
+Dan Wendlandt <dan(a)nicira.com>
+David Lively <dlively(a)virtualiron.com>
+David Lutterkort <dlutter(a)redhat.com>
+Evgeniy Sokolov <evg(a)openvz.org>
+Hugh Brock <hbrock(a)redhat.com>
+Itamar Heim <iheim(a)redhat.com>
+James Morris <jmorris(a)namei.org>
+Javier Fontan <jfontan(a)gmail.com>
+Jeremy Katz <katzj(a)redhat.com>
+Kaitlin Rupert <kaitlin(a)linux.vnet.ibm.com>
+Kazuki Mizushima <mizushima.kazuk(a)jp.fujitsu.com>
+Mads Chr. Olesen <shiyee(a)shiyee.dk>
+Mark Johnson <johnson.nh(a)gmail.com>
+Markus Armbruster <armbru(a)redhat.com>
+Masayuki Sunou <fj1826dm(a)aa.jp.fujitsu.com>
+Matthias Witte <witte(a)netzquadrat.de>
+Michel Ponceau <michel.ponceau(a)bull.net>
+Nobuhiro Itou <fj0873gn(a)aa.jp.fujitsu.com>
+Pete Vetere <pvetere(a)redhat.com>
+Philippe Berthault <philippe.berthault(a)Bull.net>
+Saori Fukuta <fukuta.saori(a)jp.fujitsu.com>
+Shigeki Sakamoto <fj0588di(a)aa.jp.fujitsu.com>
+Shuveb Hussain <shuveb(a)binarykarma.com>
+Stefan de Konink <dekonink(a)kinkrsoftware.nl>
+Takahashi Tomohiro <takatom(a)jp.fujitsu.com>
+Tatsuro Enokura <fj7716hz(a)aa.jp.fujitsu.com>
+
+#authorslist#
+
+[....send patches to get your name here....]
+
+The libvirt logo was designed by Diana Fong
+
+-- End
+;; Local Variables:
+;; coding: utf-8
+;; End:
diff --git a/Makefile.am b/Makefile.am
index 333e300..5ab75b4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -28,6 +28,7 @@ EXTRA_DIST = \
cfg.mk \
examples/domain-events/events-python \
run.in \
+ AUTHORS.in \
$(XML_EXAMPLES)
pkgconfigdir = $(libdir)/pkgconfig
@@ -78,7 +79,7 @@ MAINTAINERCLEANFILES = .git-module-status
# disable this check
distuninstallcheck:
-dist-hook: gen-ChangeLog
+dist-hook: gen-ChangeLog gen-AUTHORS
# Generate the ChangeLog file (with all entries since the switch to git)
# and insert it into the directory we're about to use to create a tarball.
@@ -91,3 +92,12 @@ gen-ChangeLog:
rm -f $(distdir)/ChangeLog; \
mv $(distdir)/cl-t $(distdir)/ChangeLog; \
fi
+
+.PHONY: gen-AUTHORS
+gen-AUTHORS:
+ if test -d .git; then \
+ out="$$(git log --pretty=format:'%aN <%aE>' | sort -u)" && \
+ cat $(srcdir)/AUTHORS.in | perl -p -e "s/#authorslist#/$$out/" > \
+ $(distdir)/AUTHORS-tmp && \
+ mv -f $(distdir)/AUTHORS-tmp $(distdir)/AUTHORS ; \
+ fi
diff --git a/bootstrap.conf b/bootstrap.conf
index f8b7c4d..5d391fd 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -223,8 +223,8 @@ if `(${PYTHON_CONFIG-python-config} --version;
PYTHON_CONFIG=true
fi
-# Automake requires that ChangeLog exist.
-touch ChangeLog || exit 1
+# Automake requires that ChangeLog and AUTHORS exist.
+touch AUTHORS ChangeLog || exit 1
# Override bootstrap's list - we don't use mdate-sh or texinfo.tex.
gnulib_extra_files="
diff --git a/cfg.mk b/cfg.mk
index e1fbf4f..eed7fd8 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -43,7 +43,6 @@ _test_script_regex = \<\(init\|test-lib\)\.sh\>
# Tests not to run as part of "make distcheck".
local-checks-to-skip = \
changelog-check \
- check-AUTHORS \
makefile-check \
makefile_path_separator_check \
patch-check \
@@ -711,20 +710,6 @@ _autogen:
$(srcdir)/autogen.sh
./config.status
-# Give credit where due:
-# Ensure that each commit author email address (possibly mapped via
-# git log's .mailmap) appears in our AUTHORS file.
-sc_check_author_list:
- @fail=0; \
- for i in $$(git log --pretty=format:%aE%n|sort -u|grep -v '^$$'); do \
- sanitized=$$(echo "$$i"|LC_ALL=C sed 's/\([^a-zA-Z0-9_@-]\)/\\\1/g'); \
- grep -iq "<$$sanitized>" $(srcdir)/AUTHORS \
- || { printf '%s\n' "$$i" >&2; fail=1; }; \
- done; \
- test $$fail = 1 \
- && echo '$(ME): committer(s) not listed in AUTHORS' >&2; \
- test $$fail = 0
-
# regenerate HACKING as part of the syntax-check
syntax-check: $(top_srcdir)/HACKING
--
1.7.11.7
12 years
[libvirt] Is possible that cpu_maps.xml changed during different releases?
by Jiang, Yunhong
Hi, all
I have two questions to the cpu_maps.xml in different releases, hope someone can give me some hints:
a) Will it be possible that the features defined in cpu_maps.xml for one specific CPU model (like Nehalem) will be different? For example, one feature is not listed for Nehalem in release x.y, and added in release x.y+1?
2) Is the format of the cpu_maps.xml fine defined or will be it changed during releases? I asked this because currently the features defined in the capabilities only list features not included in the definition in cpu_maps.xml for the corresponding model. So if I want to get the full features supported by the host, I have to parse the capabilities and the cpu_maps.xml. I didn't find the definition for cpu_maps.xml format, although the capabilities format is well defined in http://libvirt.org/guide/html/Application_Development_Guide-Connections-C....
Thanks
--jyh
12 years
[libvirt] [PATCHv3 00/19] qemu block-commit support
by Eric Blake
This v3 posting resolves all the comments I had from Doug, Laine,
and myself, and has passed my testing with SELinux enabled.
v2 was here:
https://www.redhat.com/archives/libvir-list/2012-October/msg00633.html
See below for interdiff, and individual patches for more notes
about changes
Also available at:
http://repo.or.cz/w/libvirt/ericb.git/shortlog/refs/heads/blockjob
git fetch git://repo.or.cz/libvirt/ericb.git blockjob
Eric Blake (19):
storage: list more file types
storage: treat 'aio' like 'raw' at parse time
storage: match RNG to supported driver types
storage: use enum for default driver type
storage: use enum for disk driver type
storage: use enum for snapshot driver type
storage: don't probe non-files
storage: get entire metadata chain in one call
storage: don't require caller to pre-allocate metadata struct
storage: remember relative names in backing chain
storage: make it easier to find file within chain
storage: cache backing chain while qemu domain is live
storage: use cache to walk backing chain
blockjob: remove unused parameters after previous patch
blockjob: manage qemu block-commit monitor command
blockjob: wire up online qemu block-commit
blockjob: implement shallow commit flag in qemu
blockjob: refactor qemu disk chain permission grants
blockjob: properly label disks for qemu block-commit
docs/schemas/domaincommon.rng | 27 +-
docs/schemas/domainsnapshot.rng | 2 +-
src/conf/capabilities.h | 4 +-
src/conf/domain_conf.c | 165 +++------
src/conf/domain_conf.h | 8 +-
src/conf/snapshot_conf.c | 23 +-
src/conf/snapshot_conf.h | 2 +-
src/conf/storage_conf.c | 15 +-
src/libvirt.c | 2 -
src/libvirt_private.syms | 1 +
src/libxl/libxl_conf.c | 42 ++-
src/libxl/libxl_driver.c | 6 +-
src/qemu/qemu_capabilities.c | 3 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_cgroup.c | 14 +-
src/qemu/qemu_cgroup.h | 6 +-
src/qemu/qemu_command.c | 18 +-
src/qemu/qemu_domain.c | 33 +-
src/qemu/qemu_domain.h | 3 +
src/qemu/qemu_driver.c | 371 ++++++++++++++-------
src/qemu/qemu_hotplug.c | 13 +-
src/qemu/qemu_monitor.c | 30 ++
src/qemu/qemu_monitor.h | 7 +
src/qemu/qemu_monitor_json.c | 34 ++
src/qemu/qemu_monitor_json.h | 7 +
src/qemu/qemu_process.c | 11 +
src/security/security_dac.c | 7 -
src/security/security_selinux.c | 11 -
src/security/virt-aa-helper.c | 20 +-
src/storage/storage_backend_fs.c | 15 +-
src/util/storage_file.c | 282 ++++++++++++----
src/util/storage_file.h | 43 ++-
src/vbox/vbox_tmpl.c | 6 +-
src/xenxs/xen_sxpr.c | 26 +-
src/xenxs/xen_xm.c | 28 +-
tests/sexpr2xmldata/sexpr2xml-curmem.xml | 2 +-
.../sexpr2xml-disk-block-shareable.xml | 2 +-
.../sexpr2xml-disk-drv-blktap-raw.xml | 2 +-
.../sexpr2xml-disk-drv-blktap2-raw.xml | 2 +-
39 files changed, 859 insertions(+), 435 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 81cb3aa..afa4cfe 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -971,7 +971,7 @@ void virDomainDiskDefFree(virDomainDiskDefPtr def)
VIR_FREE(def->src);
VIR_FREE(def->dst);
VIR_FREE(def->driverName);
- virStorageFileFreeMetadata(def->chain);
+ virStorageFileFreeMetadata(def->backingChain);
VIR_FREE(def->mirror);
VIR_FREE(def->auth.username);
VIR_FREE(def->wwn);
@@ -3723,8 +3723,12 @@ virDomainDiskDefParseXML(virCapsPtr caps,
xmlStrEqual(cur->name, BAD_CAST "driver")) {
driverName = virXMLPropString(cur, "name");
driverType = virXMLPropString(cur, "type");
- if (STREQ_NULLABLE(driverType, "aio"))
- memcpy(driverType, "raw", strlen("raw"));
+ if (STREQ_NULLABLE(driverType, "aio")) {
+ /* In-place conversion to "raw", for Xen back-compat */
+ driverType[0] = 'r';
+ driverType[1] = 'a';
+ driverType[2] = 'w';
+ }
cachetag = virXMLPropString(cur, "cache");
error_policy = virXMLPropString(cur, "error_policy");
rerror_policy = virXMLPropString(cur, "rerror_policy");
@@ -4185,7 +4189,8 @@ virDomainDiskDefParseXML(virCapsPtr caps,
driverType);
goto error;
}
- } else {
+ } else if (def->type == VIR_DOMAIN_DISK_TYPE_FILE ||
+ def->type == VIR_DOMAIN_DISK_TYPE_BLOCK) {
def->format = caps->defaultDiskDriverType;
}
@@ -14763,10 +14768,10 @@ done:
/* Call iter(disk, name, depth, opaque) for each element of disk and
- its backing chain in the pre-populated disk->chain.
- ignoreOpenFailure determines whether to warn about a chain that
- mentions a backing file without also having metadata on that
- file. */
+ * its backing chain in the pre-populated disk->backingChain.
+ * ignoreOpenFailure determines whether to warn about a chain that
+ * mentions a backing file without also having metadata on that
+ * file. */
int virDomainDiskDefForeachPath(virDomainDiskDefPtr disk,
bool ignoreOpenFailure,
virDomainDiskDefPathIterator iter,
@@ -14782,7 +14787,7 @@ int virDomainDiskDefForeachPath(virDomainDiskDefPtr disk,
if (iter(disk, disk->src, 0, opaque) < 0)
goto cleanup;
- tmp = disk->chain;
+ tmp = disk->backingChain;
while (tmp && tmp->backingStoreIsFile) {
if (!ignoreOpenFailure && !tmp->backingMeta) {
virReportError(VIR_ERR_INTERNAL_ERROR,
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 9c3abec..10ef841 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -569,7 +569,7 @@ struct _virDomainDiskDef {
} auth;
char *driverName;
int format; /* enum virStorageFileFormat */
- virStorageFileMetadataPtr chain;
+ virStorageFileMetadataPtr backingChain;
char *mirror;
int mirrorFormat; /* enum virStorageFileFormat */
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index 428befd..db371a0 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -87,8 +87,7 @@ qemuSetupDiskPathAllow(virDomainDiskDefPtr disk,
}
-int qemuSetupDiskCgroup(struct qemud_driver *driver ATTRIBUTE_UNUSED,
- virDomainObjPtr vm,
+int qemuSetupDiskCgroup(virDomainObjPtr vm,
virCgroupPtr cgroup,
virDomainDiskDefPtr disk)
{
@@ -127,8 +126,7 @@ qemuTeardownDiskPathDeny(virDomainDiskDefPtr disk ATTRIBUTE_UNUSED,
}
-int qemuTeardownDiskCgroup(struct qemud_driver *driver ATTRIBUTE_UNUSED,
- virDomainObjPtr vm,
+int qemuTeardownDiskCgroup(virDomainObjPtr vm,
virCgroupPtr cgroup,
virDomainDiskDefPtr disk)
{
@@ -230,7 +228,7 @@ int qemuSetupCgroup(struct qemud_driver *driver,
for (i = 0; i < vm->def->ndisks ; i++) {
if (qemuDomainDetermineDiskChain(driver, vm->def->disks[i],
false) < 0 ||
- qemuSetupDiskCgroup(driver, vm, cgroup, vm->def->disks[i]) < 0)
+ qemuSetupDiskCgroup(vm, cgroup, vm->def->disks[i]) < 0)
goto cleanup;
}
diff --git a/src/qemu/qemu_cgroup.h b/src/qemu/qemu_cgroup.h
index 362080a..c552162 100644
--- a/src/qemu/qemu_cgroup.h
+++ b/src/qemu/qemu_cgroup.h
@@ -36,12 +36,10 @@ typedef struct _qemuCgroupData qemuCgroupData;
bool qemuCgroupControllerActive(struct qemud_driver *driver,
int controller);
-int qemuSetupDiskCgroup(struct qemud_driver *driver,
- virDomainObjPtr vm,
+int qemuSetupDiskCgroup(virDomainObjPtr vm,
virCgroupPtr cgroup,
virDomainDiskDefPtr disk);
-int qemuTeardownDiskCgroup(struct qemud_driver *driver,
- virDomainObjPtr vm,
+int qemuTeardownDiskCgroup(virDomainObjPtr vm,
virCgroupPtr cgroup,
virDomainDiskDefPtr disk);
int qemuSetupHostUsbDeviceCgroup(usbDevice *dev,
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index f071769..4196caf 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -2129,7 +2129,7 @@ qemuBuildDriveStr(virConnectPtr conn ATTRIBUTE_UNUSED,
disk->tray_status == VIR_DOMAIN_DISK_TRAY_OPEN)) {
if (disk->type == VIR_DOMAIN_DISK_TYPE_DIR) {
/* QEMU only supports magic FAT format for now */
- if (disk->format && disk->format != VIR_STORAGE_FILE_FAT) {
+ if (disk->format > 0 && disk->format != VIR_STORAGE_FILE_FAT) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("unsupported disk driver type for '%s'"),
virStorageFileFormatTypeToString(disk->format));
@@ -5210,7 +5210,7 @@ qemuBuildCommandLine(virConnectPtr conn,
if (disk->type == VIR_DOMAIN_DISK_TYPE_DIR) {
/* QEMU only supports magic FAT format for now */
- if (disk->format && disk->format != VIR_STORAGE_FILE_FAT) {
+ if (disk->format > 0 && disk->format != VIR_STORAGE_FILE_FAT) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("unsupported disk driver type for '%s'"),
virStorageFileFormatTypeToString(disk->format));
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 9675454..45f3a5e 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -2016,30 +2016,23 @@ qemuDomainDetermineDiskChain(struct qemud_driver *driver,
virDomainDiskDefPtr disk,
bool force)
{
- int format;
+ bool probe = driver->allowDiskFormatProbing;
if (!disk->src)
return 0;
- if (disk->chain) {
+ if (disk->backingChain) {
if (force) {
- virStorageFileFreeMetadata(disk->chain);
- disk->chain = NULL;
+ virStorageFileFreeMetadata(disk->backingChain);
+ disk->backingChain = NULL;
} else {
return 0;
}
}
- if (disk->format > 0)
- format = disk->format;
- else if (driver->allowDiskFormatProbing)
- format = VIR_STORAGE_FILE_AUTO;
- else
- format = VIR_STORAGE_FILE_RAW;
-
- disk->chain = virStorageFileGetMetadata(disk->src, format,
- driver->user, driver->group,
- driver->allowDiskFormatProbing);
- if (!disk->chain && !force)
+ disk->backingChain = virStorageFileGetMetadata(disk->src, disk->format,
+ driver->user, driver->group,
+ probe);
+ if (!disk->backingChain)
return -1;
return 0;
}
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 7a47cf7..3829a89 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -5826,7 +5826,7 @@ qemuDomainAttachDeviceDiskLive(virConnectPtr conn,
vm->def->name);
goto end;
}
- if (qemuSetupDiskCgroup(driver, vm, cgroup, disk) < 0)
+ if (qemuSetupDiskCgroup(vm, cgroup, disk) < 0)
goto end;
}
switch (disk->device) {
@@ -5862,7 +5862,7 @@ qemuDomainAttachDeviceDiskLive(virConnectPtr conn,
}
if (ret != 0 && cgroup) {
- if (qemuTeardownDiskCgroup(driver, vm, cgroup, disk) < 0)
+ if (qemuTeardownDiskCgroup(vm, cgroup, disk) < 0)
VIR_WARN("Failed to teardown cgroup for disk path %s",
NULLSTR(disk->src));
}
@@ -6058,7 +6058,7 @@ qemuDomainChangeDiskMediaLive(virDomainObjPtr vm,
vm->def->name);
goto end;
}
- if (qemuSetupDiskCgroup(driver, vm, cgroup, disk) < 0)
+ if (qemuSetupDiskCgroup(vm, cgroup, disk) < 0)
goto end;
}
@@ -6077,7 +6077,7 @@ qemuDomainChangeDiskMediaLive(virDomainObjPtr vm,
}
if (ret != 0 && cgroup) {
- if (qemuTeardownDiskCgroup(driver, vm, cgroup, disk) < 0)
+ if (qemuTeardownDiskCgroup(vm, cgroup, disk) < 0)
VIR_WARN("Failed to teardown cgroup for disk path %s",
NULLSTR(disk->src));
}
@@ -10462,7 +10462,8 @@ typedef enum {
/* Several operations end up adding or removing a single element of a
* disk backing file chain; this helper function ensures that the lock
* manager, cgroup device controller, and security manager labelling
- * are all aware of each new file before it is added to a chain. */
+ * are all aware of each new file before it is added to a chain, and
+ * can revoke access to a file no longer needed in a chain. */
static int
qemuDomainPrepareDiskChainElement(struct qemud_driver *driver,
virDomainObjPtr vm,
@@ -10476,26 +10477,26 @@ qemuDomainPrepareDiskChainElement(struct qemud_driver *driver,
* temporarily modify the disk in place. */
char *origsrc = disk->src;
int origformat = disk->format;
- virStorageFileMetadataPtr origchain = disk->chain;
+ virStorageFileMetadataPtr origchain = disk->backingChain;
bool origreadonly = disk->readonly;
int ret = -1;
disk->src = (char *) file; /* casting away const is safe here */
disk->format = VIR_STORAGE_FILE_RAW;
- disk->chain = NULL;
+ disk->backingChain = NULL;
disk->readonly = mode == VIR_DISK_CHAIN_READ_ONLY;
if (mode == VIR_DISK_CHAIN_NO_ACCESS) {
if (virSecurityManagerRestoreImageLabel(driver->securityManager,
vm->def, disk) < 0)
VIR_WARN("Unable to restore security label on %s", disk->src);
- if (cgroup && qemuTeardownDiskCgroup(driver, vm, cgroup, disk) < 0)
+ if (cgroup && qemuTeardownDiskCgroup(vm, cgroup, disk) < 0)
VIR_WARN("Failed to teardown cgroup for disk path %s", disk->src);
if (virDomainLockDiskDetach(driver->lockManager, vm, disk) < 0)
VIR_WARN("Unable to release lock on %s", disk->src);
} else if (virDomainLockDiskAttach(driver->lockManager, driver->uri,
vm, disk) < 0 ||
- (cgroup && qemuSetupDiskCgroup(driver, vm, cgroup, disk) < 0) ||
+ (cgroup && qemuSetupDiskCgroup(vm, cgroup, disk) < 0) ||
virSecurityManagerSetImageLabel(driver->securityManager,
vm->def, disk) < 0) {
goto cleanup;
@@ -10506,7 +10507,7 @@ qemuDomainPrepareDiskChainElement(struct qemud_driver *driver,
cleanup:
disk->src = origsrc;
disk->format = origformat;
- disk->chain = origchain;
+ disk->backingChain = origchain;
disk->readonly = origreadonly;
return ret;
}
@@ -10802,7 +10803,6 @@ cleanup:
return ret;
}
-
/* The domain is expected to hold monitor lock. */
static int
qemuDomainSnapshotCreateSingleDiskActive(struct qemud_driver *driver,
@@ -10848,14 +10848,14 @@ qemuDomainSnapshotCreateSingleDiskActive(struct qemud_driver *driver,
VIR_FORCE_CLOSE(fd);
}
- /* XXX Here, we know we are about to alter disk->chain if
+ /* XXX Here, we know we are about to alter disk->backingChain if
* successful, so we nuke the existing chain so that future
* commands will recompute it. Better would be storing the chain
* ourselves rather than reprobing, but this requires modifying
* domain_conf and our XML to fully track the chain across
* libvirtd restarts. */
- virStorageFileFreeMetadata(disk->chain);
- disk->chain = NULL;
+ virStorageFileFreeMetadata(disk->backingChain);
+ disk->backingChain = NULL;
if (qemuDomainPrepareDiskChainElement(driver, vm, cgroup, disk, source,
VIR_DISK_CHAIN_READ_WRITE) < 0) {
@@ -12737,8 +12737,9 @@ qemuDomainBlockCommit(virDomainPtr dom, const char *path, const char *base,
if (!top) {
top_canon = disk->src;
- top_meta = disk->chain;
- } else if (!(top_canon = virStorageFileChainLookup(disk->chain, disk->src,
+ top_meta = disk->backingChain;
+ } else if (!(top_canon = virStorageFileChainLookup(disk->backingChain,
+ disk->src,
top, &top_meta,
&top_parent))) {
virReportError(VIR_ERR_INVALID_ARG,
@@ -12762,6 +12763,9 @@ qemuDomainBlockCommit(virDomainPtr dom, const char *path, const char *base,
base ? base : "(default)", top_canon, path);
goto endjob;
}
+ /* Note that this code exploits the fact that
+ * virStorageFileChainLookup guarantees a simple pointer
+ * comparison will work, rather than needing full-blown STREQ. */
if ((flags & VIR_DOMAIN_BLOCK_COMMIT_SHALLOW) &&
base_canon != top_meta->backingStore) {
virReportError(VIR_ERR_INVALID_ARG,
@@ -14165,7 +14169,7 @@ static virDriver qemuDriver = {
.domainBlockJobSetSpeed = qemuDomainBlockJobSetSpeed, /* 0.9.4 */
.domainBlockPull = qemuDomainBlockPull, /* 0.9.4 */
.domainBlockRebase = qemuDomainBlockRebase, /* 0.9.10 */
- .domainBlockCommit = qemuDomainBlockCommit, /* 0.10.3 */
+ .domainBlockCommit = qemuDomainBlockCommit, /* 1.0.0 */
.isAlive = qemuIsAlive, /* 0.9.8 */
.nodeSuspendForDuration = nodeSuspendForDuration, /* 0.9.8 */
.domainSetBlockIoTune = qemuDomainSetBlockIoTune, /* 0.9.8 */
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index ca441f2..7381921 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -2006,7 +2006,7 @@ int qemuDomainDetachPciDiskDevice(struct qemud_driver *driver,
VIR_WARN("Unable to restore security label on %s", dev->data.disk->src);
if (cgroup != NULL) {
- if (qemuTeardownDiskCgroup(driver, vm, cgroup, dev->data.disk) < 0)
+ if (qemuTeardownDiskCgroup(vm, cgroup, dev->data.disk) < 0)
VIR_WARN("Failed to teardown cgroup for disk path %s",
NULLSTR(dev->data.disk->src));
}
@@ -2089,7 +2089,7 @@ int qemuDomainDetachDiskDevice(struct qemud_driver *driver,
VIR_WARN("Unable to restore security label on %s", dev->data.disk->src);
if (cgroup != NULL) {
- if (qemuTeardownDiskCgroup(driver, vm, cgroup, dev->data.disk) < 0)
+ if (qemuTeardownDiskCgroup(vm, cgroup, dev->data.disk) < 0)
VIR_WARN("Failed to teardown cgroup for disk path %s",
NULLSTR(dev->data.disk->src));
}
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index d0ecd1e..d1ce9cc 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -3284,7 +3284,7 @@ cleanup:
int
qemuMonitorJSONBlockCommit(qemuMonitorPtr mon, const char *device,
const char *top, const char *base,
- unsigned long speed)
+ unsigned long long speed)
{
int ret = -1;
virJSONValuePtr cmd;
diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h
index 71bc6aa..61127a7 100644
--- a/src/qemu/qemu_monitor_json.h
+++ b/src/qemu/qemu_monitor_json.h
@@ -239,7 +239,7 @@ int qemuMonitorJSONBlockCommit(qemuMonitorPtr mon,
const char *device,
const char *top,
const char *base,
- unsigned long bandwidth)
+ unsigned long long bandwidth)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
int qemuMonitorJSONArbitraryCommand(qemuMonitorPtr mon,
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 1eb93a6..3a087e2 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -4121,18 +4121,6 @@ void qemuProcessStop(struct qemud_driver *driver,
networkReleaseActualDevice(net);
}
- /* XXX For now, disk chains should only be cached while qemu is
- * running. Since we don't track the chain in XML, a user is free
- * to update the chain while the domain is offline, and then when
- * they next boot the domain we should re-read the chain from the
- * files at that point in time. Only when we track the chain in
- * XML can we forbid the user from altering the chain of an
- * offline domain. */
- for (i = 0; i < def->ndisks; i++) {
- virStorageFileFreeMetadata(def->disks[i]->chain);
- def->disks[i]->chain = NULL;
- }
-
retry:
if ((ret = qemuRemoveCgroup(driver, vm, 0)) < 0) {
if (ret == -EBUSY && (retries++ < 5)) {
diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
index 729c0d1..263fc92 100644
--- a/src/security/virt-aa-helper.c
+++ b/src/security/virt-aa-helper.c
@@ -919,21 +919,13 @@ get_files(vahControl * ctl)
}
for (i = 0; i < ctl->def->ndisks; i++) {
- int ret;
- int format;
virDomainDiskDefPtr disk = ctl->def->disks[i];
- if (disk->format > 0)
- format = disk->format;
- else if (ctl->allowDiskFormatProbing)
- format = VIR_STORAGE_FILE_AUTO;
- else
- format = VIR_STORAGE_FILE_RAW;
-
/* XXX - if we knew the qemu user:group here we could send it in
* so that the open could be re-tried as that user:group.
*/
- disk->chain = virStorageFileGetMetadata(disk->src, format, -1, -1,
+ disk->chain = virStorageFileGetMetadata(disk->src, disk->format,
+ -1, -1,
ctl->allowDiskFormatProbing,
NULL);
@@ -942,8 +934,7 @@ get_files(vahControl * ctl)
* be passing ignoreOpenFailure = false and handle open errors more
* careful than just ignoring them.
*/
- ret = virDomainDiskDefForeachPath(disk, true, add_file_path, &buf);
- if (ret != 0)
+ if (virDomainDiskDefForeachPath(disk, true, add_file_path, &buf) < 0)
goto clean;
}
diff --git a/src/util/storage_file.c b/src/util/storage_file.c
index 218891e..882df6e 100644
--- a/src/util/storage_file.c
+++ b/src/util/storage_file.c
@@ -271,7 +271,8 @@ qcow2GetBackingStoreFormat(int *format,
break;
*format = virStorageFileFormatTypeFromString(
((const char *)buf)+offset);
- break;
+ if (*format <= VIR_STORAGE_FILE_NONE)
+ return -1;
}
offset += len;
@@ -353,12 +354,10 @@ qcowXGetBackingStore(char **res,
* between the end of the header (QCOW2_HDR_TOTAL_SIZE)
* and the start of the backingStoreName (offset)
*/
- if (isQCow2 && format) {
+ if (isQCow2 && format &&
qcow2GetBackingStoreFormat(format, buf, buf_size, QCOW2_HDR_TOTAL_SIZE,
- offset);
- if (*format <= VIR_STORAGE_FILE_NONE)
- return BACKING_STORE_INVALID;
- }
+ offset) < 0)
+ return BACKING_STORE_INVALID;
return BACKING_STORE_OK;
}
@@ -517,7 +516,7 @@ qedGetBackingStore(char **res,
(*res)[size] = '\0';
if (flags & QED_F_BACKING_FORMAT_NO_PROBE)
- *format = virStorageFileFormatTypeFromString("raw");
+ *format = VIR_STORAGE_FILE_RAW;
else
*format = VIR_STORAGE_FILE_AUTO_SAFE;
@@ -954,7 +953,7 @@ virStorageFileGetMetadataRecurse(const char *path, int format,
ret = virStorageFileGetMetadataFromFD(path, fd, format);
if (VIR_CLOSE(fd) < 0)
- virReportSystemError(errno, _("could not close file %s"), path);
+ VIR_WARN("could not close file %s", path);
if (ret && ret->backingStoreIsFile) {
if (ret->backingStoreFormat == VIR_STORAGE_FILE_AUTO && !allow_probe)
@@ -1004,6 +1003,9 @@ virStorageFileGetMetadata(const char *path, int format,
if (!cycle)
return NULL;
+
+ if (format <= VIR_STORAGE_FILE_NONE)
+ format = allow_probe ? VIR_STORAGE_FILE_AUTO : VIR_STORAGE_FILE_RAW;
ret = virStorageFileGetMetadataRecurse(path, format, uid, gid,
allow_probe, cycle);
virHashFree(cycle);
@@ -1261,13 +1263,14 @@ const char *virStorageFileGetSCSIKey(const char *path)
}
#endif
-/* Given a CHAIN that starts at the named file START, return the
- * canonical name for the backing file NAME within that chain, or pass
- * NULL to find the base of the chain. If *META is not NULL, set it
+/* Given a CHAIN that starts at the named file START, return a string
+ * pointing to either START or within CHAIN that gives the preferred
+ * name for the backing file NAME within that chain. Pass NULL for
+ * NAME to find the base of the chain. If META is not NULL, set *META
* to the point in the chain that describes NAME (or to NULL if the
- * backing element is not a file). If *PARENT is not NULL, set it to
- * the canonical name of the parent (or to NULL if NAME matches
- * START). The results point within CHAIN, and must not be
+ * backing element is not a file). If PARENT is not NULL, set *PARENT
+ * to the preferred name of the parent (or to NULL if NAME matches
+ * START). Since the results point within CHAIN, they must not be
* independently freed. */
const char *
virStorageFileChainLookup(virStorageFileMetadataPtr chain, const char *start,
@@ -1301,12 +1304,12 @@ virStorageFileChainLookup(virStorageFileMetadataPtr chain, const char *start,
STREQ(name, owner->backingStore)) {
break;
} else if (owner->backingStoreIsFile) {
- char *abs = absolutePathFromBaseFile(*parent, name);
- if (abs && STREQ(abs, owner->backingStore)) {
- VIR_FREE(abs);
+ char *absName = absolutePathFromBaseFile(*parent, name);
+ if (absName && STREQ(absName, owner->backingStore)) {
+ VIR_FREE(absName);
break;
}
- VIR_FREE(abs);
+ VIR_FREE(absName);
}
*parent = owner->backingStore;
owner = owner->backingMeta;
--
1.7.11.7
12 years
[libvirt] Add hyperthreaded sibling info to virsh capabilities
by Dusty Mabe
Hi,
Would it be possible to augment the output produced in virsh
capabilities to also provide the hyperthreaded sibling of a processor?
For example the information would look something like:
<topology>
<cells num='2'>
<cell id='0'>
<cpus num='8'>
<cpu id='1' sibling='9'/>
<cpu id='3' sibling='11'/>
<cpu id='5' sibling='13'/>
<cpu id='7' sibling='15'/>
<cpu id='9' sibling='`1'/>
<cpu id='11' sibling='3'/>
<cpu id='13' sibling='5'/>
<cpu id='15' sibling='7'/>
</cpus>
</cell>
<cell id='1'>
<cpus num='8'>
<cpu id='0' sibling='8'/>
<cpu id='2' sibling='10'/>
<cpu id='4' sibling='12'/>
<cpu id='6' sibling='14'/>
<cpu id='8' sibling='0'/>
<cpu id='10' sibling='2'/>
<cpu id='12' sibling='4'/>
<cpu id='14' sibling='6'/>
</cpus>
</cell>
</cells>
</topology>
I notice that you guys are actually using some of the numactl stuff
(numa.h) to query for the cpus on a given node and I have combed
through that code to see if it provided any info about hyperthreaded
siblings but from what I can tell it does not. I have tinkered around
with the hwloc libraries (http://www.open-mpi.org/projects/hwloc/) and
have written a short program to print out each logical cpu and its
hyperthreaded sibling (see attached)
The output from it looks like so:
[root@hostname ~]# ./a.out
*** PU: 0 Hyperthreaded Sibling: 8
*** PU: 8 Hyperthreaded Sibling: 0
*** PU: 2 Hyperthreaded Sibling: 10
*** PU: 10 Hyperthreaded Sibling: 2
*** PU: 4 Hyperthreaded Sibling: 12
*** PU: 12 Hyperthreaded Sibling: 4
*** PU: 6 Hyperthreaded Sibling: 14
*** PU: 14 Hyperthreaded Sibling: 6
*** PU: 1 Hyperthreaded Sibling: 9
*** PU: 9 Hyperthreaded Sibling: 1
*** PU: 3 Hyperthreaded Sibling: 11
*** PU: 11 Hyperthreaded Sibling: 3
*** PU: 5 Hyperthreaded Sibling: 13
*** PU: 13 Hyperthreaded Sibling: 5
*** PU: 7 Hyperthreaded Sibling: 15
*** PU: 15 Hyperthreaded Sibling: 7
Would you guys ever consider adding something like this? I would be
willing to help create a patch if I had some guidance.
Thanks for your time,
Dusty Mabe
12 years
[libvirt] Using Generic Ethernet type with custom networking without lowering the host security level
by Ishimoto, Ryu
Hi Everyone,
I wanted to ask a question about the 'generic ethernet' NIC type. If I
understand its security concerns correctly, because it expects QEMU to
execute scripts to bring up/down the interface, it requires that the host
security level is lowered to allow QEMU to perform privileged operations.
While this is definitely not desirable, I'm have a situation where I want
to use libvirt to work with a custom networking solution that is neither
Linux bridge or OpenVSwitch. Currently, to make this happen, I would
create a tap interface myself, configure it(like adding it to the
datapath), and inform libvirt of this interface as a generic ethernet type
with script attribute set to ''. In order to make this work without the
security issue mentioned, I would like to suggest a new device type(or just
a modification of generic ethernet type) in which libvirt accepts an
interface name, opens it and gets its fd, and passes the fd to QEMU. QEMU
does not run any scripts and expects the tap interface to be already open.
Another solution might be to allow custom scripts to be plugged into
libvirt that allows you to add an interface to a bridge instead of running
brctl or ovs-vsctl. The latter solution lets libvirt create the tap
interface, whereas the former requires that the tap is 'plugged' into the
network before libvirt takes control for the VM to have connectivity when
it launches. I prefer the former because it seems less disruptive while
providing similar features.
I would be more than happy to send a patch for this, and I apologize that
this lacks details, but I just wanted to first make sure that what I'm
suggesting here makes sense and that I'm not missing something critical, as
I am fairly new to libvirt.
Thanks,
Ryu
12 years
[libvirt] [libvirt-glib] gobject: Add GVirDomainRebootFlags
by Zeeshan Ali (Khattak)
From: "Zeeshan Ali (Khattak)" <zeeshanak(a)gnome.org>
Add flags to be used with gvir_domain_reboot().
---
libvirt-gobject/libvirt-gobject-domain.c | 2 +-
libvirt-gobject/libvirt-gobject-domain.h | 13 +++++++++++++
libvirt-gobject/libvirt-gobject.sym | 5 +++++
3 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/libvirt-gobject/libvirt-gobject-domain.c b/libvirt-gobject/libvirt-gobject-domain.c
index 8ade3ea..c1ba5ce 100644
--- a/libvirt-gobject/libvirt-gobject-domain.c
+++ b/libvirt-gobject/libvirt-gobject-domain.c
@@ -688,7 +688,7 @@ gboolean gvir_domain_shutdown(GVirDomain *dom,
/**
* gvir_domain_reboot:
* @dom: the domain
- * @flags: the flags
+ * @flags: the %GVirDomainRebootFlags flags
*/
gboolean gvir_domain_reboot(GVirDomain *dom,
guint flags,
diff --git a/libvirt-gobject/libvirt-gobject-domain.h b/libvirt-gobject/libvirt-gobject-domain.h
index 6e7b10d..bd0cfc0 100644
--- a/libvirt-gobject/libvirt-gobject-domain.h
+++ b/libvirt-gobject/libvirt-gobject-domain.h
@@ -158,6 +158,19 @@ typedef enum {
GVIR_DOMAIN_SNAPSHOT_ATOMIC = VIR_DOMAIN_SNAPSHOT_CREATE_ATOMIC,
} GVirDomainSnapshotCreateFlags;
+/**
+ * GVirDomainRebootFlags:
+ * @GVIR_DOMAIN_REBOOT_NONE: No flags, hypervisor choice
+ * @GVIR_DOMAIN_REBOOT_ACPI_POWER_BTN: Send ACPI event
+ * @GVIR_DOMAIN_REBOOT_GUEST_AGENT: Use guest agent
+ *
+ */
+typedef enum {
+ GVIR_DOMAIN_REBOOT_NONE = 0,
+ GVIR_DOMAIN_REBOOT_ACPI_POWER_BTN = VIR_DOMAIN_REBOOT_ACPI_POWER_BTN,
+ GVIR_DOMAIN_REBOOT_GUEST_AGENT = VIR_DOMAIN_REBOOT_GUEST_AGENT,
+} GVirDomainRebootFlags;
+
typedef struct _GVirDomainInfo GVirDomainInfo;
struct _GVirDomainInfo
{
diff --git a/libvirt-gobject/libvirt-gobject.sym b/libvirt-gobject/libvirt-gobject.sym
index 3a40a8a..444a891 100644
--- a/libvirt-gobject/libvirt-gobject.sym
+++ b/libvirt-gobject/libvirt-gobject.sym
@@ -204,4 +204,9 @@ LIBVIRT_GOBJECT_0.1.3 {
gvir_domain_wakeup_finish;
} LIBVIRT_GOBJECT_0.1.2;
+LIBVIRT_GOBJECT_0.1.4 {
+ global:
+ gvir_domain_reboot_flags_get_type;
+} LIBVIRT_GOBJECT_0.1.3;
+
# .... define new API here using predicted next version number ....
--
1.7.12.1
12 years