Re: [libvirt] [PATCH] qemu: Support to detach redirdev device

2016-03-05 Thread Osier Yang
On 2016年03月05日 19:52, John Ferlan wrote: On 02/27/2016 04:50 AM, Osier Yang wrote: Attaching redirdev device has been supported for a while, but detaching is not never implemented. Simple procedure to test: % lsusb Bus 001 Device 014: ID 0781:5567 SanDisk Corp. Cruzer Blade

[libvirt] [PATCH] qemu: Support to detach redirdev device

2016-02-27 Thread Osier Yang
Attaching redirdev device has been supported for a while, but detaching is not never implemented. Simple procedure to test: % lsusb Bus 001 Device 014: ID 0781:5567 SanDisk Corp. Cruzer Blade % usbredirserver -p 4000 0781:5567 % virsh attach-device test usb.xml % cat usb.xml % vi

Re: [libvirt] [PATCH V2] Fix bug of attaching redirdev device

2016-02-25 Thread Osier Yang
On 2016年02月25日 16:18, Michal Privoznik wrote: On 22.02.2016 18:41, Michal Privoznik wrote: On 22.02.2016 17:44, Osier Yang wrote: RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1298070 The corresponding chardev must be attached first, otherwise the the qemu command line won't be com

[libvirt] [PATCH V2] Fix bug of attaching redirdev device

2016-02-22 Thread Osier Yang
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1298070 The corresponding chardev must be attached first, otherwise the the qemu command line won't be complete (missing the host part), --- src/qemu/qemu_hotplug.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git

Re: [libvirt] [PATCH] Fix bug of attaching redirdev device

2016-02-22 Thread Osier Yang
On 2016年02月23日 00:21, Michal Privoznik wrote: On 18.02.2016 17:02, Osier Yang wrote: RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1298070 Hey! It's nice to see people returning :) Have been about two years! :-) The corresponding chardev must be attached first, otherwise th

Re: [libvirt] [PATCH] Fix bug of attaching redirdev device

2016-02-22 Thread Osier Yang
ping? > >> On 18 Feb 2016, at 16:02, Osier Yang wrote: > >>> RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1298070 > >>> > >>> The corresponding chardev must be attached first, otherwise the > >>> the qemu command line won't

[libvirt] [PATCH] Fix bug of attaching redirdev device

2016-02-18 Thread Osier Yang
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1298070 The corresponding chardev must be attached first, otherwise the the qemu command line won't be complete (missing the host part), --- src/qemu/qemu_hotplug.c | 27 ++- 1 file changed, 22 insertions(+), 5 deletions(-)

Re: [libvirt] [PATCH] qemu: Forbid "sgio" support for SCSI generic host device

2014-03-13 Thread Osier Yang
On 13/03/14 15:50, Jiri Denemark wrote: On Wed, Mar 12, 2014 at 23:13:24 +0800, Osier Yang wrote: On 12/03/14 21:54, Jiri Denemark wrote: On Fri, Mar 07, 2014 at 22:23:26 +0800, Osier Yang wrote: The kernel didn't support the unprivileged SGIO for SCSI generic device finally, and since

Re: [libvirt] [PATCH] qemu: Forbid "sgio" support for SCSI generic host device

2014-03-12 Thread Osier Yang
On 12/03/14 21:54, Jiri Denemark wrote: On Fri, Mar 07, 2014 at 22:23:26 +0800, Osier Yang wrote: The kernel didn't support the unprivileged SGIO for SCSI generic device finally, and since it's unknow whether the way to support unprivileged SGIO for SCSI generic device will be simi

Re: [libvirt] [PATCH] qemu: Forbid "sgio" support for SCSI generic host device

2014-03-11 Thread Osier Yang
On 07/03/14 22:23, Osier Yang wrote: The kernel didn't support the unprivileged SGIO for SCSI generic device finally, and since it's unknow whether the way to support unprivileged SGIO for SCSI generic device will be similar as for SCSI block device or not, even it's simliar (I.e.

Re: [libvirt] [PATCH] libvirt-tck: Ignore SIGPIPE in 051-daemon-hook.t

2014-03-10 Thread Osier Yang
On 07/03/14 23:46, Mike Latimer wrote: On Friday, March 07, 2014 05:16:48 PM Osier Yang wrote: $hook->cleanup(); + +# Restarting libvirtd broke the tck connection, so ignore sigpipe and +# undefine $tck to avoid a return code of 141 +$SIG{PIPE} = 'IGNORE'; +

Re: [libvirt] [PATCH] virscsi: Introduce virSCSIDeviceUsedByInfoFree

2014-03-07 Thread Osier Yang
On 07/03/14 22:55, John Ferlan wrote: This resolves a Coverity RESOURCE_LEAK issue introduced by commit id 'de6fa535' where the virSCSIDeviceSetUsedBy() didn't VIR_FREE the 'copy' or possibly VIR_STRDUP()'d values. Signed-off-by: John Ferlan --- src/util/virscsi.c | 26 +++

[libvirt] [PATCH] qemu: Forbid "sgio" support for SCSI generic host device

2014-03-07 Thread Osier Yang
The kernel didn't support the unprivileged SGIO for SCSI generic device finally, and since it's unknow whether the way to support unprivileged SGIO for SCSI generic device will be similar as for SCSI block device or not, even it's simliar (I.e. via sysfs, for SCSI block device, it's /sys/dev/block/

Re: [libvirt] [PATCH] libvirt-tck: prefer kvm if multiple domain types exist

2014-03-07 Thread Osier Yang
On 07/03/14 01:39, Mike Latimer wrote: When matching capabilities of a guest, if multiple domain types exist (for example, 'qemu' and 'kvm') the order in which they are returned can change. To avoid unpredictable test results, this patch prefers kvm if that domain type exists. If not, the behavi

Re: [libvirt] [PATCH] libvirt-tck: Ignore SIGPIPE in 051-daemon-hook.t

2014-03-07 Thread Osier Yang
On 07/03/14 01:11, Mike Latimer wrote: This test completes successfully, but results in a return code of 141 due to a broken pipe when restarting libvirtd. This patch just masks the SIGPIPE and undefines $tck to avoid the 141 return code. If there is a way to reestablish the tck connection after

Re: [libvirt] [PATCH] libvirt-tck: Update hook syntax for libvirt 0.9.0+

2014-03-07 Thread Osier Yang
On 07/03/14 00:27, Mike Latimer wrote: Starting with libvirt 0.9.0+, hook scripts can be called from several new locations. These locations must also be reflected in the expected logs of the hook tests. The final test in 052-domain-hook.t intentionally produces a failed start, which should show

Re: [libvirt] [PATCH] tests: Fix the build failure on s390

2014-02-11 Thread Osier Yang
On 11/02/14 18:21, Martin Kletzander wrote: On Tue, Feb 11, 2014 at 11:10:16AM +0800, Osier Yang wrote: On 11/02/14 00:48, Eric Blake wrote: On 02/10/2014 06:35 AM, Osier Yang wrote: The build works fine on other architectures with commit 0b4f76fc5, but for s390: TEST: virscsitest 1

Re: [libvirt] [PATCH] tests: Fix the build failure on s390

2014-02-10 Thread Osier Yang
On 11/02/14 00:48, Eric Blake wrote: On 02/10/2014 06:35 AM, Osier Yang wrote: The build works fine on other architectures with commit 0b4f76fc5, but for s390: TEST: virscsitest 1) test1 ... OK 2) test2 ... libvirt: error : SCSI device '1:0:0:0': could not access /builddir/b

Re: [libvirt] [PATCH] tests: Fix the build failure on s390

2014-02-10 Thread Osier Yang
On 10/02/14 22:31, Osier Yang wrote: On 10/02/14 21:48, Jiri Denemark wrote: On Mon, Feb 10, 2014 at 21:35:18 +0800, Osier Yang wrote: The build works fine on other architectures with commit 0b4f76fc5, but for s390: TEST: virscsitest 1) test1 ... OK 2) test2 ... libvirt: error : SCSI

Re: [libvirt] [PATCH] tests: Fix the build failure on s390

2014-02-10 Thread Osier Yang
On 10/02/14 21:48, Jiri Denemark wrote: On Mon, Feb 10, 2014 at 21:35:18 +0800, Osier Yang wrote: The build works fine on other architectures with commit 0b4f76fc5, but for s390: TEST: virscsitest 1) test1 ... OK 2) test2 ... libvirt: error : SCSI device '1:0:0:0': could

[libvirt] [PATCH] tests: Fix the build failure on s390

2014-02-10 Thread Osier Yang
The build works fine on other architectures with commit 0b4f76fc5, but for s390: TEST: virscsitest 1) test1 ... OK 2) test2 ... libvirt: error : SCSI device '1:0:0:0': could not access /builddir/build/BUILD/libvirt-1.1.1/tests/virscsidata/sg8: No such file or directory FAILED It's caused b

Re: [libvirt] [PATCH 0/2] Fix the scsi util test failure

2014-01-30 Thread Osier Yang
On 30/01/14 23:37, Pavel Hrdina wrote: On 30.1.2014 14:20, Pavel Hrdina wrote: On 30.1.2014 12:48, Osier Yang wrote: Detected by Pavel reported. Osier Yang (2): util: Accept test data path for scsi device's sg_path tests: Modify the scsi util tests src/util/virs

Re: [libvirt] [PATCH 0/2] Fix the scsi util test failure

2014-01-30 Thread Osier Yang
On 30/01/14 19:48, Osier Yang wrote: Detected by Pavel reported. Sorry, s/Pavel reported/Hrdina Pavel/, Osier Yang (2): util: Accept test data path for scsi device's sg_path tests: Modify the scsi util tests src/util/virscsi.c | 3 ++- tests/virscs

[libvirt] [PATCH 1/2] util: Accept test data path for scsi device's sg_path

2014-01-30 Thread Osier Yang
Commit 10c9ceff6d intended to introduce new argument for the testing purpose, but it missed the similar changing of the device's sg_path. The problem was hidden since my laptop has the /dev/sg0 and /dev/sg1. A later patch will modify the tests accordingly. Signed-off-by: Osier Yang Report

[libvirt] [PATCH 2/2] tests: Modify the scsi util tests

2014-01-30 Thread Osier Yang
Add tests/virscsidata/sg0 and tests/virscsidata/sg8 as the test input for constructing scsi->sg_path. And change the scsi generic number of "1:0:0:0", because it's easy to hide the problem (assuming most machines have a CDROM drive). Signed-off-by: Osier Yang --- tests/v

[libvirt] [PATCH 0/2] Fix the scsi util test failure

2014-01-30 Thread Osier Yang
Detected by Pavel reported. Osier Yang (2): util: Accept test data path for scsi device's sg_path tests: Modify the scsi util tests src/util/virscsi.c | 3 ++- tests/virscsidata/1:0:0:0/block/sdh/dev| 1 + tests/virscsidata/1:0:0:0/block/sr

Re: [libvirt] [PATCH] qemu: Fix the error message for scsi host device's shareable checking

2014-01-30 Thread Osier Yang
On 30/01/14 18:22, Jiri Denemark wrote: On Thu, Jan 30, 2014 at 16:58:18 +0800, Osier Yang wrote: This fixes the wrong argument order. --- Pushed under trivial rule. --- src/qemu/qemu_hostdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_hostdev.c b

[libvirt] [PATCH] qemu: Fix the error message for scsi host device's shareable checking

2014-01-30 Thread Osier Yang
This fixes the wrong argument order. --- Pushed under trivial rule. --- src/qemu/qemu_hostdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c index 2b11d6c..1b16386 100644 --- a/src/qemu/qemu_hostdev.c +++ b/src/qemu/qemu

Re: [libvirt] [PATCH 2/2] util: Add tests for scsi utils

2014-01-29 Thread Osier Yang
On 30/01/14 03:35, Eric Blake wrote: On 01/29/2014 10:22 AM, Osier Yang wrote: To support to pass the path of the test data to the utils, one s/to pass/passing/ Changed. more argument is added to virSCSIDeviceGetSgName, virSCSIDeviceGetDevName, and virSCSIDeviceNew, and the related code

Re: [libvirt] [PATCH 1/2] qemu: Don't fail if the SCSI host device is shareable between domains

2014-01-29 Thread Osier Yang
On 30/01/14 03:31, Eric Blake wrote: On 01/29/2014 10:22 AM, Osier Yang wrote: It doesn't make sense to fail if the SCSI host device is specified as "shareable" explicitly between domains (NB, it works if and only if the device is specified as "shareable" for *all* do

[libvirt] [PATCH 0/2 v4] qemu: Don't fail if the SCSI host device is shareable between domains

2014-01-29 Thread Osier Yang
*** BLURB HERE *** Osier Yang (2): qemu: Don't fail if the SCSI host device is shareable between domains tests: Add tests for scsi utils docs/formatdomain.html.in| 5 ++ src/libvirt_private.syms | 2 +- src/qemu/qemu_cgroup.c | 3 +- src/qemu/qemu_comm

[libvirt] [PATCH 2/2] util: Add tests for scsi utils

2014-01-29 Thread Osier Yang
To support to pass the path of the test data to the utils, one more argument is added to virSCSIDeviceGetSgName, virSCSIDeviceGetDevName, and virSCSIDeviceNew, and the related code is changed accordingly. Signed-off-by: Osier Yang --- src/qemu/qemu_cgroup.c | 3 +- src/qemu

[libvirt] [PATCH 1/2] qemu: Don't fail if the SCSI host device is shareable between domains

2014-01-29 Thread Osier Yang
eable" value in driver->activeScsiHostdevs. - qemuDomainReAttachHostScsiDevices: Change the logic according to the changes on helpers. Signed-off-by: Osier Yang --- docs/formatdomain.html.in | 5 +++ src/libvirt_private.syms | 2 +- src/qemu/qemu_hostdev.c | 77 +++

Re: [libvirt] [PATCH v3] qemu: Don't fail if the SCSI host device is shareable between domains

2014-01-23 Thread Osier Yang
On 23/01/14 23:04, Osier Yang wrote: It doesn't make sense to fail if the SCSI host device is specified as "shareable" explicitly between domains (NB, it works if and only if the device is specified as "shareable" for *all* domains, otherwise it fails). To fix the probl

[libvirt] [PATCH v3] qemu: Don't fail if the SCSI host device is shareable between domains

2014-01-23 Thread Osier Yang
It doesn't make sense to fail if the SCSI host device is specified as "shareable" explicitly between domains (NB, it works if and only if the device is specified as "shareable" for *all* domains, otherwise it fails). To fix the problem, this patch introduces an array for virSCSIDevice struct, whic

Re: [libvirt] [PATCH python] Fix calling of virStreamSend method

2014-01-23 Thread Osier Yang
On 23/01/14 22:25, Daniel P. Berrange wrote: About the subject prefix, [libvirt-python] should be better, like what we did for Perl binding. Change d40861 removed the 'len' argument from the virStreamSend C level wrapper, but forgot to remove it from the python level wrapper. Reported-by: Robi

Re: [libvirt] [PATCH 1/2] storage: Fix autostart of pool with "fc_host" type adapter

2014-01-23 Thread Osier Yang
On 23/01/14 21:35, John Ferlan wrote: On 01/23/2014 04:45 AM, Osier Yang wrote: On 22/01/14 21:36, John Ferlan wrote: On 01/07/2014 06:07 AM, Osier Yang wrote: On 07/01/14 01:21, John Ferlan wrote: On 01/06/2014 05:19 AM, Osier Yang wrote: The "checkPool" is a bit different for

Re: [libvirt] [PATCH] storage: Fix the memory leak

2014-01-23 Thread Osier Yang
On 23/01/14 19:06, Martin Kletzander wrote: On Thu, Jan 23, 2014 at 06:23:32PM +0800, Osier Yang wrote: The return value of virGetFCHostNameByWWN is a strdup'ed string. Also add comments to declare that the caller should take care of freeing it. --- src/storage/storage_backend_scsi.c

[libvirt] [PATCH] storage: Fix the memory leak

2014-01-23 Thread Osier Yang
The return value of virGetFCHostNameByWWN is a strdup'ed string. Also add comments to declare that the caller should take care of freeing it. --- src/storage/storage_backend_scsi.c | 15 ++- src/util/virutil.c | 5 - 2 files changed, 14 insertions(+), 6 deletions(-

Re: [libvirt] Build failed in Jenkins: libvirt-syntax-check #1898

2014-01-23 Thread Osier Yang
On 23/01/14 18:11, Jenkins CI wrote: See -- Started by upstream project "libvirt-build" build number 2132 Started by upstream project "libvirt-build" build number 2133 Building on master in work

Re: [libvirt] [PATCH 1/2] util: Add "shareable" field for virSCSIDevice struct

2014-01-23 Thread Osier Yang
On 16/01/14 08:51, John Ferlan wrote: On 01/08/2014 09:51 AM, Osier Yang wrote: <...> diff --git a/src/util/virscsi.c b/src/util/virscsi.c index 751eaf0..3998c3a 100644 --- a/src/util/virscsi.c +++ b/src/util/virscsi.c @@ -58,6 +58,7 @@ struct _virSCSIDevice { const char *u

Re: [libvirt] [PATCH 1/2] storage: Fix autostart of pool with "fc_host" type adapter

2014-01-23 Thread Osier Yang
On 22/01/14 21:36, John Ferlan wrote: On 01/07/2014 06:07 AM, Osier Yang wrote: On 07/01/14 01:21, John Ferlan wrote: On 01/06/2014 05:19 AM, Osier Yang wrote: The "checkPool" is a bit different for pool with "fc_host" type source adapter, since the vHBA it's base

Re: [libvirt] [PATCH 2/2 v2] storage: Add document for possible problem on volume detection

2014-01-22 Thread Osier Yang
On 23/01/14 13:44, Osier Yang wrote: On 22/01/14 23:15, John Ferlan wrote: On 01/22/2014 09:39 AM, Osier Yang wrote: For pool which relies on remote resources, such as a "iscsi" type pool, since how long it takes to export the corresponding devices to host's sysfs is really dep

Re: [libvirt] [PATCH 2/2 v2] storage: Add document for possible problem on volume detection

2014-01-22 Thread Osier Yang
On 22/01/14 23:15, John Ferlan wrote: On 01/22/2014 09:39 AM, Osier Yang wrote: For pool which relies on remote resources, such as a "iscsi" type pool, since how long it takes to export the corresponding devices to host's sysfs is really depended, it could depend on the network

Re: [libvirt] [PATCH] util: Correct the NUMA node range checking

2014-01-22 Thread Osier Yang
On 23/01/14 08:04, Eric Blake wrote: On 01/22/2014 04:45 AM, Osier Yang wrote: There are 2 issues here: First we shouldn't add "1" to the return value of numa_max_node(), since the semanteme of the error message s/semanteme/semantics/ was changed, it's not saying about

Re: [libvirt] [PATCH 1/2] storage: Fix autostart of pool with "fc_host" type adapter

2014-01-22 Thread Osier Yang
On 22/01/14 21:36, John Ferlan wrote: On 01/07/2014 06:07 AM, Osier Yang wrote: On 07/01/14 01:21, John Ferlan wrote: On 01/06/2014 05:19 AM, Osier Yang wrote: The "checkPool" is a bit different for pool with "fc_host" type source adapter, since the vHBA it's base

[libvirt] [PATCH 2/2 v2] storage: Add document for possible problem on volume detection

2014-01-22 Thread Osier Yang
For pool which relies on remote resources, such as a "iscsi" type pool, since how long it takes to export the corresponding devices to host's sysfs is really depended, it could depend on the network connection, it also could depend on the host's udev procedures. So it's likely that the volumes are

Re: [libvirt] [PATCH 2/2] storage: Polling the sysfs for pool with "fc_host" type adapter

2014-01-22 Thread Osier Yang
On 22/01/14 22:02, John Ferlan wrote: On 01/07/2014 05:37 AM, Osier Yang wrote: On 07/01/14 02:30, John Ferlan wrote: On 01/06/2014 05:19 AM, Osier Yang wrote: The SCSI device corresponding to the vHBA might not show up in sysfs yet when we trying to scan the LUNs. As a result, we will end

[libvirt] [PATCH] util: Correct the NUMA node range checking

2014-01-22 Thread Osier Yang
There are 2 issues here: First we shouldn't add "1" to the return value of numa_max_node(), since the semanteme of the error message was changed, it's not saying about the number of total NUMA nodes anymore. Second, the value of "bit" is the position of the first bit which exceeds either numa_max_

Re: [libvirt] [PATCH] qemu: Avoid crash in qemuDiskGetActualType

2014-01-22 Thread Osier Yang
On 22/01/14 18:18, Peter Krempa wrote: Libvirtd would crash if a domain contained an empty cdrom drive of type='volume' as the disk def->srcpool member would be dereferenced. Fix it by checking if the source pool is present before dereferencing it. Also alter tests to catch this issue in the fut

Re: [libvirt] [PATCH 3/3] Doc: Add "note" for node-memory-tune

2014-01-22 Thread Osier Yang
On 22/01/14 17:33, Ján Tomko wrote: On 01/22/2014 07:55 AM, Osier Yang wrote: To let the user know the command onlys work for KSM under Linux. --- tools/virsh.pod | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/virsh.pod b/tools/virsh.pod index 35a7292..07f4397 100644 --- a

Re: [libvirt] [PATCH 2/3] Doc: Improve the document for nodesuspend

2014-01-22 Thread Osier Yang
On 22/01/14 17:32, Ján Tomko wrote: On 01/22/2014 07:55 AM, Osier Yang wrote: Explicitly lists the possible values for "--target" option; Gets rid of the confused strings like "Suspend-to-RAM"; Emphasises the node *has to* be suspended in the time duration specified by "

[libvirt] [PATCH 3/3] Doc: Add "note" for node-memory-tune

2014-01-21 Thread Osier Yang
To let the user know the command onlys work for KSM under Linux. --- tools/virsh.pod | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/virsh.pod b/tools/virsh.pod index 35a7292..07f4397 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -317,6 +317,9 @@ different numa nodes can be me

[libvirt] [PATCH 0/3] Doc fixes

2014-01-21 Thread Osier Yang
*** BLURB HERE *** Osier Yang (3): virsh: Fix the string breaking style Doc: Improve the document for nodesuspend Doc: Add "note" for node-memory-tune tools/virsh-host.c | 6 +++--- tools/virsh.pod| 16 +++- 2 files changed, 14 insertions(+), 8 deletions(-) -

[libvirt] [PATCH 2/3] Doc: Improve the document for nodesuspend

2014-01-21 Thread Osier Yang
Explicitly lists the possible values for "--target" option; Gets rid of the confused strings like "Suspend-to-RAM"; Emphasises the node *has to* be suspended in the time duration specified by "--duration". And rewords the entire document a bit according to the API's implementation and document. ---

[libvirt] [PATCH 1/3] virsh: Fix the string breaking style

2014-01-21 Thread Osier Yang
--- Pushed under trivial rule. --- tools/virsh-host.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/virsh-host.c b/tools/virsh-host.c index 967bd52..3438ae7 100644 --- a/tools/virsh-host.c +++ b/tools/virsh-host.c @@ -516,7 +516,7 @@ static const vshCmdInfo info_n

Re: [libvirt] [PATCH 2/2] qemu: Don't fail if the SCSI host device is shareable between domains

2014-01-20 Thread Osier Yang
On 17/01/14 21:44, John Ferlan wrote: On 01/17/2014 02:06 AM, Osier Yang wrote: <...snip...> As a conclusion, I think the only concern from you is about the problem on the running domain of an old libvirt (without these 2 patches). Right? If so, my thought is to add document somewhere,

Re: [libvirt] [PATCH 2/2] qemu: Don't fail if the SCSI host device is shareable between domains

2014-01-16 Thread Osier Yang
On 16/01/14 23:39, John Ferlan wrote: On 01/16/2014 08:53 AM, Osier Yang wrote: <...snip...> It took some thinking, but I convinced myself that this path doesn't need the shared check since it's only called from qemuProcessReconnect; however, if something else did call it so

Re: [libvirt] [PATCH 2/2] qemu: Don't fail if the SCSI host device is shareable between domains

2014-01-16 Thread Osier Yang
[ shrinked ] --- src/libvirt_private.syms | 2 +- src/qemu/qemu_hostdev.c | 75 ++-- src/util/virscsi.c | 48 +-- src/util/virscsi.h | 7 +++-- 4 files changed, 84 insertions(+), 48 deletions(-) diff --git

Re: [libvirt] [PATCH 2/2] qemu: Don't fail if the SCSI host device is shareable between domains

2014-01-16 Thread Osier Yang
On 16/01/14 08:51, John Ferlan wrote: On 01/08/2014 09:51 AM, Osier Yang wrote: It doesn't make sense to fail if the SCSI host device is specified as "shareable" explicitly between domains (NB, it works if and only if the device is specified as "shareable" for *all* do

Re: [libvirt] [PATCH 0/6] Fix some memory leaks and other issues find by coverity tool

2014-01-14 Thread Osier Yang
On 14/01/14 01:17, John Ferlan wrote: On 01/13/2014 11:12 AM, Pavel Hrdina wrote: This patch series fixes few memory leaks found by coverity tool to make that tool happy. The last patch is adding only one comment to hide "double_close" error as coverity tool is wrong about this and we don't ha

Re: [libvirt] [PATCH 0/2 v2] Fixes on shareable SCSI host device

2014-01-08 Thread Osier Yang
On 08/01/14 22:51, Osier Yang wrote: Forgot to mention that the lacked tests for scsi utils will come soon. *** BLURB HERE *** Osier Yang (2): util: Add "shareable" field for virSCSIDevice struct qemu: Don't fail if the SCSI host device is shareable between

[libvirt] [PATCH 2/2] qemu: Don't fail if the SCSI host device is shareable between domains

2014-01-08 Thread Osier Yang
It doesn't make sense to fail if the SCSI host device is specified as "shareable" explicitly between domains (NB, it works if and only if the device is specified as "shareable" for *all* domains, otherwise it fails). To fix the problem, this patch introduces an array for virSCSIDevice struct, whic

Re: [libvirt] [PATCH] util: Use new array management macros

2014-01-08 Thread Osier Yang
On 07/01/14 23:16, Eric Blake wrote: On 01/07/2014 08:03 AM, Osier Yang wrote: Like commit 94a26c7e from Eric Blake, the old fuzzy code should be replaced by the new array management macros now. And the type of scsi->count should be changed into "size_t", and thus virSCSIDeviceLis

[libvirt] [PATCH 0/2 v2] Fixes on shareable SCSI host device

2014-01-08 Thread Osier Yang
*** BLURB HERE *** Osier Yang (2): util: Add "shareable" field for virSCSIDevice struct qemu: Don't fail if the SCSI host device is shareable between domains src/libvirt_private.syms | 3 +- src/qemu/qemu_cgroup.c | 3 +- src/qemu/qemu_hostdev.

[libvirt] [PATCH 1/2] util: Add "shareable" field for virSCSIDevice struct

2014-01-08 Thread Osier Yang
Unlike the host devices of other types, SCSI host device XML supports "shareable" tag. This patch introduces it for the virSCSIDevice struct for a later patch use (to detect if the SCSI device is shareable when preparing the SCSI host device in QEMU driver). --- src/libvirt_private.syms |

[libvirt] [PATCH] util: Use new array management macros

2014-01-07 Thread Osier Yang
Like commit 94a26c7e from Eric Blake, the old fuzzy code should be replaced by the new array management macros now. And the type of scsi->count should be changed into "size_t", and thus virSCSIDeviceListCount should return size_t instead, similar for vir{PCI,USB}DeviceListCount. --- src/util/virp

Re: [libvirt] [PATCH 2/2] qemu: Don't fail if the SCSI host device is shareable between domains

2014-01-07 Thread Osier Yang
On 06/01/14 23:54, John Ferlan wrote: On 01/02/2014 09:45 AM, Osier Yang wrote: It doesn't make sense to fail if the SCSI host device is specified as "shareable" explicitly between domains (NB, it works if and only if the device is specified as "shareable" for *all* do

Re: [libvirt] [PATCH 1/2] storage: Fix autostart of pool with "fc_host" type adapter

2014-01-07 Thread Osier Yang
On 07/01/14 01:21, John Ferlan wrote: On 01/06/2014 05:19 AM, Osier Yang wrote: The "checkPool" is a bit different for pool with "fc_host" type source adapter, since the vHBA it's based on might be not created yet (it's created by "startPool"

Re: [libvirt] [PATCH 2/2] storage: Polling the sysfs for pool with "fc_host" type adapter

2014-01-07 Thread Osier Yang
On 07/01/14 02:30, John Ferlan wrote: On 01/06/2014 05:19 AM, Osier Yang wrote: The SCSI device corresponding to the vHBA might not show up in sysfs yet when we trying to scan the LUNs. As a result, we will end up with an empty volume set for the pool after pool-start, even if there are LUNs

Re: [libvirt] [PATCH 2/2] event: make deregister return value match docs

2014-01-06 Thread Osier Yang
On 04/01/14 03:31, Eric Blake wrote: Ever since their introduction (commit 1509b80 in v0.5.0 for virConnectDomainEventRegister, commit 4445723 in v0.8.0 for virConnectDomainEventDeregisterAny), the event deregistration functions have been documented as returning 0 on success; likewise for older r

Re: [libvirt] [PATCH 1/2] event: use bool in more places

2014-01-06 Thread Osier Yang
On 04/01/14 03:31, Eric Blake wrote: No need to use an int that only ever stores 0 and 1. * src/conf/object_event_private.h (_virObjectEventCallback): Change deleted to bool. * src/conf/object_event.c (virObjectEventDispatchMatchCallback): Switch return type to bool. (virObjectEventCallbackListM

[libvirt] [PATCH 1/2] storage: Fix autostart of pool with "fc_host" type adapter

2014-01-06 Thread Osier Yang
The "checkPool" is a bit different for pool with "fc_host" type source adapter, since the vHBA it's based on might be not created yet (it's created by "startPool", which is involked after "checkPool" in storageDriverAutostart). So it should not fail, otherwise the "autostart" of the pool will fail

[libvirt] [PATCH 0/2] Storage: Fixes for the "fc_host" type pool

2014-01-06 Thread Osier Yang
*** Enough details in the patch commits *** Osier Yang (2): storage: Fix autostart of pool with "fc_host" type adapter storage: Polling the sysfs for pool with "fc_host" type adapter src/storage/storage_backend_scsi.c | 30 -- 1 file changed,

[libvirt] [PATCH 2/2] storage: Polling the sysfs for pool with "fc_host" type adapter

2014-01-06 Thread Osier Yang
The SCSI device corresponding to the vHBA might not show up in sysfs yet when we trying to scan the LUNs. As a result, we will end up with an empty volume set for the pool after pool-start, even if there are LUNs. Though the time of the device showing up is rather depended, better than doing nothi

[libvirt] [PATCH 1/2] util: Add "shareable" field for virSCSIDevice struct

2014-01-02 Thread Osier Yang
Unlike the host devices of other types, SCSI host device XML supports "shareable" tag. This patch introduces it for the virSCSIDevice struct for a later patch use (to detect if the SCSI device is shareable when preparing the SCSI host device in QEMU driver). --- src/libvirt_private.syms |

[libvirt] [PATCH 2/2] qemu: Don't fail if the SCSI host device is shareable between domains

2014-01-02 Thread Osier Yang
It doesn't make sense to fail if the SCSI host device is specified as "shareable" explicitly between domains (NB, it works if and only if the device is specified as "shareable" for *all* domains, otherwise it fails). Also don't try to add the device to the activeScsiHostdevs list if it's already t

[libvirt] [PATCH 0/2] Fixes on shareable SCSI host device

2014-01-02 Thread Osier Yang
It's easy to reproduce with two domains using the same SCSI generic device, both with specified. It's expected to work. But the fact is: % virsh start f20-1 error: Failed to start domain b error: Requested operation is not valid: SCSI device 1:0:0:0 is in use by domain f20-0 Osi

Re: [libvirt] [PATCH] Doc: Explicitly declaring that nodedev-destroy only works for vHBA

2013-12-03 Thread Osier Yang
On 03/12/13 00:56, Eric Blake wrote: On 11/22/2013 05:55 AM, Osier Yang wrote: Though trying to destroy a physical HBA doesn't make sense at all, it's still a bit misleading with saying "only works for HBA". Signed-off-by: Osier Yang --- src/libvirt.c | 5 +++--

Re: [libvirt] [PATCHv2 4/4] qemu: Refactor qemuTranslatePool source

2013-11-28 Thread Osier Yang
On 27/11/13 23:14, Peter Krempa wrote: Before this patch, the translation function still needs a second ugly helper function to actually format the command line for qemu. But if we do the right stuff in the translation functio, we don't have to bother s/functio/function/, with the second func

Re: [libvirt] [PATCHv2 3/4] qemuxml2argv: Add test for disk type='volume' with iSCSI pools

2013-11-28 Thread Osier Yang
On 27/11/13 23:14, Peter Krempa wrote: Tweak the existing file so that it can be tested for command line corectness. --- tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool-mode.args | 10 ++ tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool-mode.xml | 4 ++-- tests/qemuxml2argv

Re: [libvirt] [PATCHv2 2/4] qemuxml2argv: Add test to verify correct usage of disk type="volume"

2013-11-28 Thread Osier Yang
On 27/11/13 23:14, Peter Krempa wrote: Tweak the existing file to test command line generator too. --- tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.args | 8 tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.xml | 2 +- tests/qemuxml2argvtest.c

Re: [libvirt] [PATCHv2 1/4] test: Implement fake storage pool driver in qemuxml2argv test

2013-11-28 Thread Osier Yang
On 27/11/13 23:14, Peter Krempa wrote: To support testing of "volume" disk backing, we need to implement a few disk driver backend functions. The fake storage driver uses files in storagepoolxml2xmlout/POOLNAME.xml as XML files for pool definitions and volume names are in format "VOL_TYPE+VOL_PA

Re: [libvirt] [PATCHv1.5 02/27] test: Implement fake storage pool driver in qemuxml2argv test

2013-11-28 Thread Osier Yang
On 27/11/13 17:58, Peter Krempa wrote: On 11/27/13 08:47, Osier Yang wrote: On 27/11/13 00:48, Peter Krempa wrote: To support testing of "volume" disk backing, we need to implement a few disk driver backend functions. The fake storage driver uses files in storagepoolxml2xmlout/POOLN

Re: [libvirt] [PATCH] Doc: Explicitly declaring that nodedev-destroy only works for vHBA

2013-11-28 Thread Osier Yang
On 22/11/13 20:55, Osier Yang wrote: Can someone give an obvious ACK? Though trying to destroy a physical HBA doesn't make sense at all, it's still a bit misleading with saying "only works for HBA". Signed-off-by: Osier Yang --- src/libvirt.c | 5 +++-- tools/virs

Re: [libvirt] [PATCH] libvirt-perl: Fix the wrong binding of virNodeDeviceLookupSCSIHostByWWN

2013-11-27 Thread Osier Yang
On 27/11/13 17:29, Daniel P. Berrange wrote: On Wed, Nov 27, 2013 at 03:04:26PM +0800, Osier Yang wrote: The second parameter for virNodeDeviceLookupSCSIHostByWWN is "wwnn" instead of "wwpn", and the API supports "flags". --- AUTHORS| 1 +

Re: [libvirt] [PATCHv1.5 04/27] qemuxml2argv: Add test for disk type='volume' with iSCSI pools

2013-11-27 Thread Osier Yang
On 27/11/13 00:48, Peter Krempa wrote: Tweak the existing file so that it can be tested for command line corectness. It's actually lots of change, should provide detailed commit log. --- src/conf/domain_conf.h | 1 + src/libvirt_private.syms

Re: [libvirt] [PATCHv1.5 02/27] test: Implement fake storage pool driver in qemuxml2argv test

2013-11-26 Thread Osier Yang
On 27/11/13 00:48, Peter Krempa wrote: To support testing of "volume" disk backing, we need to implement a few disk driver backend functions. The fake storage driver uses files in storagepoolxml2xmlout/POOLNAME.xml as XML files for pool definitions and volume names are in format "VOL_TYPE+VOL_PA

[libvirt] [PATCH] libvirt-perl: Fix the wrong binding of virNodeDeviceLookupSCSIHostByWWN

2013-11-26 Thread Osier Yang
AUTHORS index d53f191..c2af49a 100644 --- a/AUTHORS +++ b/AUTHORS @@ -12,5 +12,6 @@ Patches contributed by: Stepan Kasal Ludwig Nussel Zhe Peng + Osier Yang -- End diff --git a/lib/Sys/Virt/NodeDevice.pm b/lib/Sys/Virt/NodeDevice.pm index 984910d..29c

Re: [libvirt] [PATCH] storage: skip selinux cleanup when fd not available

2013-11-26 Thread Osier Yang
On 27/11/13 12:00, Eric Blake wrote: When attempting to backport gluster pools to an older version where there is no VIR_STRDUP, I got a crash from calling strdup(,NULL). Rather than relying on the current else branch safely doing nothing when there is no fd, it is easier to just skip it. While

Re: [libvirt] [PATCH] Memory Leak Fix: Check def->info->alias before assigning

2013-11-26 Thread Osier Yang
On 27/11/13 06:31, Nehal J Wani wrote: On running the command make -C tests valgrind, there used to be a bunch of memory leaks shown by valgrind. Specifically, one can check it by running: libtool --mode=execute valgrind --quiet --leak-check=full --suppressions=./.valgrind.supp qemuhotplugtest T

Re: [libvirt] [PATCH] Fix three minor typos

2013-11-26 Thread Osier Yang
On 26/11/13 15:15, Yuri Chornoivan wrote: -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list ACK and pushed. Thanks for the patch, but please consider posting the patch with git-email. Regards, Osier -- libvir-list mailing list libvir-list

Re: [libvirt] VirtIO-SCSI disks limitation

2013-11-26 Thread Osier Yang
e issue as been discussed as part of: http://gerrit.ovirt.org/#/c/20630] Thanks, Daniel - Original Message - From: "Dave Allan" To: "Daniel Erez" Cc: "Ayal Baron" , "Osier Yang" , "John Ferlan" Sent: Monday, November 25, 2013 8:19:42

Re: [libvirt] [PATCHv4 0/8] glusterfs storage pool

2013-11-24 Thread Osier Yang
On 23/11/13 11:20, Eric Blake wrote: v3: https://www.redhat.com/archives/libvir-list/2013-November/msg00348.html Depends on: https://www.redhat.com/archives/libvir-list/2013-November/msg00955.html Changes since then, addressing review feedback: - rebase to other improvements in the meantime - N

Re: [libvirt] [PATCH]lxc: don't do duplicate work when getting pagesize

2013-11-24 Thread Osier Yang
On 18/11/13 16:03, Chen Hanxiao wrote: From: Chen Hanxiao Don't do duplicate work when getting pagesize. With some debug logs added. Signed-off-by: Chen Hanxiao --- src/lxc/lxc_container.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/lxc/lxc_con

Re: [libvirt] [PATCH] storage: expose volume meta-type in XML

2013-11-24 Thread Osier Yang
On 23/11/13 06:26, Eric Blake wrote: I got annoyed at having to use both 'virsh vol-list $pool --details' AND 'virsh vol-dumpxml $vol $pool' to learn if I had populated the volume correctly. Since two-thirds of the data present in virStorageVolGetInfo() already appears in virStorageVolGetXMLDesc

Re: [libvirt] [PATCHv2] storage: allow interleave in volume XML

2013-11-24 Thread Osier Yang
On 23/11/13 03:54, Eric Blake wrote: The RNG grammar did not allow arbitrary interleaving, which makes it harder than necessary to create a new volume from handwritten XML. (Compare also to commit caf516db for pools). * docs/schemas/storagevol.rng: Support interleaving. * tests/storagevolxml2xml

[libvirt] [PATCH] Doc: Explicitly declaring that nodedev-destroy only works for vHBA

2013-11-22 Thread Osier Yang
Though trying to destroy a physical HBA doesn't make sense at all, it's still a bit misleading with saying "only works for HBA". Signed-off-by: Osier Yang --- src/libvirt.c | 5 +++-- tools/virsh.pod | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --g

Re: [libvirt] [PATCH] storage: Returns earlier if source adapter of the scsi pool is a HBA

2013-11-20 Thread Osier Yang
On 20/11/13 23:57, Eric Blake wrote: On 11/20/2013 05:44 AM, Osier Yang wrote: It makes no sense to go forward to get the parent host number of a HBA, and treat the HBA as a vHBA with trying to delete it. --- src/storage/storage_backend_scsi.c | 8 1 file changed, 8 insertions

Re: [libvirt] [PATCH] python: add virConnectGetCPUModelNames to skip_impl

2013-11-20 Thread Osier Yang
On 20/11/13 06:17, Doug Goldstein wrote: In commit de51dc9c9, we removed virConnectGetCPUModelNames from skip_impl but without this the module will always generate a symbol for libvirt_virConnectGetCPUModelNames which we don't always want. CC: Giuseppe Scrivano --- I don't really understan

  1   2   3   4   5   6   7   8   9   10   >