Re: [PATCH v2 1/3] Drivers: hv: check vmbus_device_create() return value in vmbus_process_offer()

2015-01-20 Thread Vitaly Kuznetsov
Dan Carpenter dan.carpen...@oracle.com writes: On Mon, Jan 19, 2015 at 05:56:11PM +0100, Vitaly Kuznetsov wrote: vmbus_device_create() result is not being checked in vmbus_process_offer() and it can fail if kzalloc() fails. Add the check and do minor cleanup to avoid additional duplication

[PATCH v3 1/3] Drivers: hv: check vmbus_device_create() return value in vmbus_process_offer()

2015-01-20 Thread Vitaly Kuznetsov
vmbus_device_create() result is not being checked in vmbus_process_offer() and it can fail if kzalloc() fails. Add the check and do minor cleanup to avoid additional duplication of free_channel(); return; block. Reported-by: Jason Wang jasow...@redhat.com Signed-off-by: Vitaly Kuznetsov vkuzn

[PATCH v3 3/3] Drivers: hv: vmbus: serialize Offer and Rescind offer

2015-01-20 Thread Vitaly Kuznetsov
check it at the end of vmbus_process_offer() so such offer will not get lost. Suggested-by: Radim Krčmář rkrc...@redhat.com Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/channel_mgmt.c | 30 ++ 1 file changed, 22 insertions(+), 8 deletions(-) diff

[PATCH v3 2/3] Drivers: hv: rename sc_lock to the more generic lock

2015-01-20 Thread Vitaly Kuznetsov
sc_lock spinlock in struct vmbus_channel is being used to not only protect the sc_list field, e.g. vmbus_open() function uses it to implement test-and-set access to the state field. Rename it to the more generic 'lock' and add the description. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com

[PATCH v3 0/3] Drivers: hv: vmbus: protect Offer/Rescind offer processing

2015-01-20 Thread Vitaly Kuznetsov
for rescind and work fields. [K. Y. Srinivasan] Vitaly Kuznetsov (3): Drivers: hv: check vmbus_device_create() return value in vmbus_process_offer() Drivers: hv: rename sc_lock to the more generic lock Drivers: hv: vmbus: serialize Offer and Rescind offer drivers/hv/channel.c | 6

[PATCH v2 3/3] Drivers: hv: vmbus: serialize Offer and Rescind offer

2015-01-19 Thread Vitaly Kuznetsov
check it at the end of vmbus_process_offer() so such offer will not get lost. Suggested-by: Radim Krčmář rkrc...@redhat.com Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/channel_mgmt.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git

[PATCH v2 2/3] Drivers: hv: rename sc_lock to the more generic lock

2015-01-19 Thread Vitaly Kuznetsov
sc_lock spinlock in struct vmbus_channel is being used to not only protect the sc_list field, e.g. vmbus_open() function uses it to implement test-and-set access to the state field. Rename it to the more generic 'lock' and add the description. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com

[PATCH v2 1/3] Drivers: hv: check vmbus_device_create() return value in vmbus_process_offer()

2015-01-19 Thread Vitaly Kuznetsov
vmbus_device_create() result is not being checked in vmbus_process_offer() and it can fail if kzalloc() fails. Add the check and do minor cleanup to avoid additional duplication of free_channel(); return; block. Reported-by: Jason Wang jasow...@redhat.com Signed-off-by: Vitaly Kuznetsov vkuzn

[PATCH v2 0/3] Drivers: hv: vmbus: protect Offer/Rescind offer processing

2015-01-19 Thread Vitaly Kuznetsov
. Use renamed (in [PATCH v2 2/3]) spinlock to protect simulteneous test-and-set workflow for rescind and work fields. [K. Y. Srinivasan] Vitaly Kuznetsov (3): Drivers: hv: check vmbus_device_create() return value in vmbus_process_offer() Drivers: hv: rename sc_lock to the more generic lock

[PATCH] Drivers: hv: vmbus: serialize Offer and Rescind offer processing

2015-01-16 Thread Vitaly Kuznetsov
jasow...@redhat.com Suggested-by: Radim Krčmář rkrc...@redhat.com Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/channel_mgmt.c | 33 +++-- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv

Re: [PATCH v3] hv: hv_fcopy: drop the obsolete message on transfer failure

2015-01-13 Thread Vitaly Kuznetsov
this patch got lost and I don't see it in recent 'resend' series. K.Y., Dexuan, can you please take a look? Cc: Jason Wang jasow...@redhat.com Cc: Vitaly Kuznetsov vkuzn...@redhat.com Cc: K. Y. Srinivasan k...@microsoft.com Signed-off-by: Dexuan Cui de...@microsoft.com --- v2: I removed

[PATCH v3] Drivers: hv: vmbus: prevent cpu offlining on newer hypervisors

2015-01-12 Thread Vitaly Kuznetsov
on resume). Suspend still works. Tested with WS2008R2 and WS2012R2. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- Changes since v2: - repair the build when vmbus is builded as a module [Greg KH] by saving current cpu_disable pointer to previous_cpu_disable and restoring it on unload

Re: [PATCH 0/5] Tools: hv: fix compiler warnings and do minor cleanup

2015-01-08 Thread Vitaly Kuznetsov
KY Srinivasan k...@microsoft.com writes: -Original Message- From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On Behalf Of gre...@linuxfoundation.org Sent: Wednesday, December 10, 2014 6:48 AM To: Vitaly Kuznetsov Cc: de...@linuxdriverproject.org; Haiyang Zhang

Re: [PATCH v2] tools: hv: kvp_daemon: make IPv6-only-injection work

2015-01-02 Thread Vitaly Kuznetsov
for IPv4 according to Hyper-V host team), but we still need to proceed to parse the IPv6 information. Cc: Vitaly Kuznetsov vkuzn...@redhat.com Cc: K. Y. Srinivasan k...@microsoft.com Signed-off-by: Dexuan Cui de...@microsoft.com --- v2: removed the distro-specific logic as Vitaly suggested

Re: [PATCH] tools: hv: kvp_daemon: make IPv6-only-injection work

2014-12-10 Thread Vitaly Kuznetsov
Dexuan Cui de...@microsoft.com writes: Thanks, -- Dexuan -Original Message- From: Dexuan Cui Sent: Wednesday, December 10, 2014 15:34 PM To: 'Vitaly Kuznetsov' Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- de...@linuxdriverproject.org; o...@aepfle.de

Re: [PATCH 0/5] Tools: hv: fix compiler warnings and do minor cleanup

2014-12-10 Thread Vitaly Kuznetsov
Dexuan Cui de...@microsoft.com writes: -Original Message- From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] Sent: Tuesday, December 9, 2014 23:48 PM To: KY Srinivasan Cc: Haiyang Zhang; de...@linuxdriverproject.org; linux- ker...@vger.kernel.org; Dexuan Cui Subject: [PATCH 0/5

Re: [PATCH] tools: hv: kvp_daemon: make IPv6-only-injection work

2014-12-10 Thread Vitaly Kuznetsov
Dexuan Cui de...@microsoft.com writes: -Original Message- From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] Sent: Tuesday, December 9, 2014 21:06 PM To: Dexuan Cui Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- de...@linuxdriverproject.org; o...@aepfle.de

Re: [PATCH] tools: hv: kvp_daemon: make IPv6-only-injection work

2014-12-09 Thread Vitaly Kuznetsov
Dexuan Cui de...@microsoft.com writes: Currently IPv6-only-injection doesn't work because the daemon doesn't parse any IPv6 information at all once it finds the dhcp_enabled flag is true. But according to the Hyper-v host team, the flag is only for IPv4. In the case the host only injects 1

[PATCH 0/5] Tools: hv: fix compiler warnings and do minor cleanup

2014-12-09 Thread Vitaly Kuznetsov
() Vitaly Kuznetsov (5): Tools: hv: add mising fcopyd to the Makefile Tools: hv: remove unused bytes_written from kvp_update_file() Tools: hv: address compiler warnings for hv_kvp_daemon.c Tools: hv: address compiler warnings for hv_fcopy_daemon.c Tools: hv: do not add redundant

[PATCH 2/5] Tools: hv: remove unused bytes_written from kvp_update_file()

2014-12-09 Thread Vitaly Kuznetsov
’ set but not used [-Wunused-but-set-variable] Remove bytes_written completely. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- tools/hv/hv_kvp_daemon.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c index

[PATCH 1/5] Tools: hv: add mising fcopyd to the Makefile

2014-12-09 Thread Vitaly Kuznetsov
fcopyd in missing in the Makefile, add it there. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- tools/hv/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/hv/Makefile b/tools/hv/Makefile index bd22f78..99ffe61 100644 --- a/tools/hv/Makefile +++ b

[PATCH 3/5] Tools: hv: address compiler warnings for hv_kvp_daemon.c

2014-12-09 Thread Vitaly Kuznetsov
This patch addresses two types of compiler warnings: ... warning: comparison between signed and unsigned integer expressions [-Wsign-compare] and ... warning: pointer targets in passing argument N of ‘kvp_...’ differ in signedness [-Wpointer-sign] Signed-off-by: Vitaly Kuznetsov vkuzn

[PATCH 5/5] Tools: hv: do not add redundant '/' in hv_start_fcopy()

2014-12-09 Thread Vitaly Kuznetsov
We don't need to add additional '/' to smsg-path_name as snprintf(%s/%s) does the right thing. Without the patch we get doubled '//' in the log message. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- tools/hv/hv_fcopy_daemon.c | 6 -- 1 file changed, 6 deletions(-) diff --git

[PATCH 4/5] Tools: hv: address compiler warnings for hv_fcopy_daemon.c

2014-12-09 Thread Vitaly Kuznetsov
This patch addresses two types of compiler warnings: ... warning: unused variable ‘fd’ [-Wunused-variable] and ... warning: format ‘%s’ expects argument of type ‘char *’, but argument 5 has type ‘__u16 *’ [-Wformat=] Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- tools/hv

Re: [PATCH v3] hv: hv_fcopy: drop the obsolete message on transfer failure

2014-12-01 Thread Vitaly Kuznetsov
or fcopy_transaction.fcopy_msg will be used immediately. Cc: Jason Wang jasow...@redhat.com Cc: Vitaly Kuznetsov vkuzn...@redhat.com Cc: K. Y. Srinivasan k...@microsoft.com Signed-off-by: Dexuan Cui de...@microsoft.com --- v2: I removed the FCP prefix as Greg

[PATCH v2] Drivers: hv: vmbus: prevent cpu offlining on newer hypervisors

2014-12-01 Thread Vitaly Kuznetsov
on resume). Suspend still works. Tested with WS2008R2 and WS2012R2. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- Changes since v1: - introduce hv_cpu_hotplug_quirk() function to not spread #ifdefs [Greg KH] - add pr_notice() message hv_vmbus: CPU offlining is not supported by hypervisor

Re: [PATCH] Drivers: hv: vmbus: prevent cpu offlining on newer hypervisors

2014-11-27 Thread Vitaly Kuznetsov
Dexuan Cui de...@microsoft.com writes: -Original Message- From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On Behalf Of Greg Kroah-Hartman Sent: Thursday, November 27, 2014 11:03 AM To: Vitaly Kuznetsov Cc: de...@linuxdriverproject.org; Haiyang Zhang; linux- ker

[PATCH] Drivers: hv: vmbus: prevent cpu offlining on newer hypervisors

2014-11-26 Thread Vitaly Kuznetsov
on resume). Suspend still works. Tested with WS2008R2 and WS2012R2. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/vmbus_drv.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 4d6b269..9a82249 100644

Re: [PATCH v2] tools: hv: ignore ENOBUFS and ENOMEM in the KVP daemon

2014-11-20 Thread Vitaly Kuznetsov
user will re-try the R/W and hopefully it will succeed next time. We can also ignore the errors on sending. Cc: Vitaly Kuznetsov vkuzn...@redhat.com Cc: K. Y. Srinivasan k...@microsoft.com Signed-off-by: Dexuan Cui de...@microsoft.com --- v2: I also ignore the errors on sending, as Vitaly

Re: [PATCH] tools: hv: ignore ENOBUFS in the KVP daemon

2014-11-19 Thread Vitaly Kuznetsov
Dexuan Cui de...@microsoft.com writes: Under high memory pressure and very high KVP R/W test pressure, the netlink recvfrom() may transiently return ENOBUFS to the daemon -- we found this during a 2-week stress test. We'd better not terminate the daemon on this failure, because a typical KVP

Re: [PATCH] tools: hv: ignore ENOBUFS in the KVP daemon

2014-11-19 Thread Vitaly Kuznetsov
Dexuan Cui de...@microsoft.com writes: -Original Message- From: Vitaly Kuznetsov Sent: Wednesday, November 19, 2014 18:50 PM To: Dexuan Cui Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.com

Re: [PATCH] tools: hv: ignore ENOBUFS in the KVP daemon

2014-11-19 Thread Vitaly Kuznetsov
Dexuan Cui de...@microsoft.com writes: -Original Message- From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] Sent: Wednesday, November 19, 2014 20:41 PM To: Dexuan Cui Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org; driverdev- de...@linuxdriverproject.org; o

Re: [PATCH] tools: hv: ignore ENOBUFS in the KVP daemon

2014-11-19 Thread Vitaly Kuznetsov
Dexuan Cui de...@microsoft.com writes: -Original Message- From: Vitaly Kuznetsov -- Vitaly OK, I can add this new check: (I'll send out the v2 tomorrow in case people have new comments) Thanks! --- a/tools/hv/hv_kvp_daemon.c +++ b/tools/hv/hv_kvp_daemon.c

Re: [PATCH] hv: hv_fcopy: drop the obsolete message on transfer failure

2014-11-12 Thread Vitaly Kuznetsov
. Srinivasan k...@microsoft.com Signed-off-by: Dexuan Cui de...@microsoft.com Reviewed-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/hv_fcopy.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/hv/hv_fcopy.c b/drivers/hv/hv_fcopy.c index 23b2ce2..177122a 100644

Re: [PATCH 0/3] Tools: hv: vssdaemon: freeze/thaw logic improvement for the failure case

2014-11-10 Thread Vitaly Kuznetsov
Dexuan Cui de...@microsoft.com writes: -Original Message- From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] Sent: Saturday, November 8, 2014 1:09 AM To: KY Srinivasan; Haiyang Zhang; Greg Kroah-Hartman Cc: de...@linuxdriverproject.org; linux-ker...@vger.kernel.org; Dexuan Cui

[PATCH v2 2/2] Tools: hv: vssdaemon: skip all filesystems mounted readonly

2014-11-10 Thread Vitaly Kuznetsov
Instead of making a list of exceptions for readonly filesystems in addition to iso9660 we already have it is better to skip freeze operation for all readonly-mounted filesystems. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- tools/hv/hv_vss_daemon.c | 2 +- 1 file changed, 1 insertion

[PATCH 0/3] Tools: hv: vssdaemon: freeze/thaw logic improvement for the failure case

2014-11-07 Thread Vitaly Kuznetsov
This patch series addresses the following issues: - Wrong error reporting for multiple filesystems case. - Skip all readonly-mounted filesystems instead of skipping iso9660. - Thaw all filesystems after an unsuccessful freeze attempt. Vitaly Kuznetsov (3): Tools: hv: vssdaemon: consult

[PATCH 2/3] Tools: hv: vssdaemon: skip all filesystems mounted readonly

2014-11-07 Thread Vitaly Kuznetsov
Instead of making a list of exceptions for readonly filesystems in addition to iso9660 we already have it is better to skip freeze operation for all readonly-mounted filesystems. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- tools/hv/hv_vss_daemon.c | 2 +- 1 file changed, 1 insertion

[PATCH 3/3] Tools: hv: vssdaemon: thaw everything in case of freeze failure

2014-11-07 Thread Vitaly Kuznetsov
freeze/thaw requests at the same time they will collide with vss daemon. This issue can be addressed by introducing a freeze/thaw transaction and keeping track of what was actually frozen Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- tools/hv/hv_vss_daemon.c | 6 ++ 1 file changed, 6

[PATCH 0/2] Drivers: hv: kvp, vss: improve kernel-userspace communication in failure case

2014-11-06 Thread Vitaly Kuznetsov
discussing. In theory freeze/thaw ioctls should be fast. In case someone thinks 10 seconds is not enough we can easily increase it as we cover the most common failure scenario (when the daemon was stopped) with the second patch of this series. Vitaly Kuznetsov (2): Drivers: hv: vss: Introduce

[PATCH 2/2] Drivers: hv: kvp, vss: Fast propagation of userspace communication failure

2014-11-06 Thread Vitaly Kuznetsov
userspace daemon gets disconnected so we won't receive new requests. But I'm not sure it is possible. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/hv_kvp.c | 9 - drivers/hv/hv_snapshot.c | 8 +++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git

[PATCH 1/2] Drivers: hv: vss: Introduce timeout for communication with userspace

2014-11-06 Thread Vitaly Kuznetsov
schedule_delayed_work(). Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/hv/hv_snapshot.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/drivers/hv/hv_snapshot.c b/drivers/hv/hv_snapshot.c index 34f14fd..21e51be 100644 --- a/drivers/hv/hv_snapshot.c +++ b

Re: [PATCH] tools: hv: introduce -n/--no-daemon option

2014-11-04 Thread Vitaly Kuznetsov
KY Srinivasan k...@microsoft.com writes: -Original Message- From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] Sent: Wednesday, October 22, 2014 9:07 AM To: KY Srinivasan; Haiyang Zhang; de...@linuxdriverproject.org Cc: linux-ker...@vger.kernel.org Subject: [PATCH] tools: hv

[PATCH] tools: hv: introduce -n/--no-daemon option

2014-10-22 Thread Vitaly Kuznetsov
in foreground for that. Some distros already carry distro-specific patch for hv tools which switches off daemon(). Introduce -n/--no-daemon option for all 3 daemons in hv/tools. Parse options with getopt() to make this part easily expandable. Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- tools/hv

<    5   6   7   8   9   10