qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] vhost: Fix typo in comment
@ 2011-08-31  7:43 Amos Kong
  2011-08-31  7:48 ` Michael S. Tsirkin
  0 siblings, 1 reply; 3+ messages in thread
From: Amos Kong @ 2011-08-31  7:43 UTC (permalink / raw)
  To: qemu-devel, mst

vhost_dev_stop() and vhost_dev_disable_notifiers() are called in
vhost_net_stop(), correct this comment.

Signed-off-by: Amos Kong <akong@redhat.com>
---
 hw/vhost.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/vhost.c b/hw/vhost.c
index 0870cb7..640aff0 100644
--- a/hw/vhost.c
+++ b/hw/vhost.c
@@ -797,7 +797,7 @@ fail:
     return r;
 }
 
-/* Host notifiers must be enabled at this point. */
+/* Host notifiers must be disabled at this point. */
 void vhost_dev_stop(struct vhost_dev *hdev, VirtIODevice *vdev)
 {
     int i, r;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] vhost: Fix typo in comment
  2011-08-31  7:43 [Qemu-devel] [PATCH] vhost: Fix typo in comment Amos Kong
@ 2011-08-31  7:48 ` Michael S. Tsirkin
  2011-08-31  8:53   ` Amos Kong
  0 siblings, 1 reply; 3+ messages in thread
From: Michael S. Tsirkin @ 2011-08-31  7:48 UTC (permalink / raw)
  To: Amos Kong; +Cc: qemu-devel

On Wed, Aug 31, 2011 at 03:43:48PM +0800, Amos Kong wrote:
> vhost_dev_stop() and vhost_dev_disable_notifiers() are called in
> vhost_net_stop(), correct this comment.
> 
> Signed-off-by: Amos Kong <akong@redhat.com>
> ---
>  hw/vhost.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/hw/vhost.c b/hw/vhost.c
> index 0870cb7..640aff0 100644
> --- a/hw/vhost.c
> +++ b/hw/vhost.c
> @@ -797,7 +797,7 @@ fail:
>      return r;
>  }
>  
> -/* Host notifiers must be enabled at this point. */
> +/* Host notifiers must be disabled at this point. */
>  void vhost_dev_stop(struct vhost_dev *hdev, VirtIODevice *vdev)
>  {
>      int i, r;

Well it looks like we first call vhost_dev_stop and
only afterwards vhost_dev_disable_notifiers.
So when vhost_dev_stop is called notifiers are enabled,
and they really must be otherwise stuff will fail.
Isn't this what the original comment says?
If that's not clear, what would be a better wording?

-- 
MST

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] vhost: Fix typo in comment
  2011-08-31  7:48 ` Michael S. Tsirkin
@ 2011-08-31  8:53   ` Amos Kong
  0 siblings, 0 replies; 3+ messages in thread
From: Amos Kong @ 2011-08-31  8:53 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: qemu-devel

----- Original Message -----
> On Wed, Aug 31, 2011 at 03:43:48PM +0800, Amos Kong wrote:
> > vhost_dev_stop() and vhost_dev_disable_notifiers() are called in
> > vhost_net_stop(), correct this comment.
> >
> > Signed-off-by: Amos Kong <akong@redhat.com>
> > ---
> >  hw/vhost.c | 2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/hw/vhost.c b/hw/vhost.c
> > index 0870cb7..640aff0 100644
> > --- a/hw/vhost.c
> > +++ b/hw/vhost.c
> > @@ -797,7 +797,7 @@ fail:
> >      return r;
> >  }
> >
> > -/* Host notifiers must be enabled at this point. */
> > +/* Host notifiers must be disabled at this point. */
> >  void vhost_dev_stop(struct vhost_dev *hdev, VirtIODevice *vdev)
> >  {
> >      int i, r;
> 
> Well it looks like we first call vhost_dev_stop and
> only afterwards vhost_dev_disable_notifiers.
> So when vhost_dev_stop is called notifiers are enabled,
> and they really must be otherwise stuff will fail.
> Isn't this what the original comment says?
> If that's not clear, what would be a better wording?

It's my fault to misunderstand the meaning, we can ignore this patch.

Thanks,
Amos

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-08-31  8:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-31  7:43 [Qemu-devel] [PATCH] vhost: Fix typo in comment Amos Kong
2011-08-31  7:48 ` Michael S. Tsirkin
2011-08-31  8:53   ` Amos Kong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).