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

Re: [Xen-users] Watchdog and live migration



On Fri, 2012-03-16 at 15:14 +0000, Jan Beulich wrote:
> >> --- a/drivers/watchdog/xen_wdt.c
> >> +++ b/drivers/watchdog/xen_wdt.c
> >> @@ -297,11 +297,19 @@ static void xen_wdt_shutdown(struct plat
> >>  
> >>  static int xen_wdt_suspend(struct platform_device *dev, pm_message_t 
> >> state)
> >>  {
> >> -  return xen_wdt_stop();
> >> +  typeof(wdt.id) id = wdt.id;
> > 
> > typeof here is a bit odd.
> 
> But I want to match the original field's type.

So why not use that type?

> >> +  int rc = xen_wdt_stop();
> >> +
> >> +  wdt.id = id;
> >> +
> >> +  return rc;
> >>  }
> >>  
> >>  static int xen_wdt_resume(struct platform_device *dev)
> >>  {
> >> +  if (!wdt.id)
> >> +          return 0;
> > 
> > Can't you check is_active instead and avoid having to play tricks in
> > xen_wdt_suspend to preserve a non-0 wdt.id when the watchdog is active?
> 
> I first thought of this too, but is_active doesn't represent whether
> a watchdog is actually engaged - it merely says whether the
> watchdog device is currently open (but watchdog setup itself
> may have failed).
>

Could track whether the w/dog is actually engaged in another variable?

Ian.


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.