From: "Christopher S. Aker" Subject: Re: vbd devices stuck in Initialising/InitWait Date: Wed, 29 Mar 2006 21:50:02 -0600 Message-ID: <442B556A.8000907@theshore.net> References: <4429C801.7070900@theshore.net> <20060329085320.GA31336@leeni.uk.xensource.com> <442B150D.6000903@theshore.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <442B150D.6000903@theshore.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel Cc: Ewan Mellor List-Id: xen-devel@lists.xenproject.org Christopher S. Aker wrote: > When devices are missing, talk_to_backend() is making duplicate calls > for the same vbd to xenbus_switch_state(), and on the second call > xenbus_switch_state avoids writing to xenstore an identical value (which > it's supposed to). Why the duplicate calls? That got me thinking .. The duplicate calls are happening for some reason, but they're never attempting to write out the state value again because of this code in xenbus_switch_state(): if (state == dev->state) { return 0; } The initial call to xenbus_switch_state() _did_ set the value in dev->state, it just never made it into xenstore even though the xenbus_printf call didn't return an error. So, commenting out the code above makes everything work. 15 reboots and all the devices have show up every time. I don't know why the first call to xenbus_switch_state() isn't really writing out the value to xenstore. xenbus_printf() isn't returning an error, but still the value fails to make it into the store. That's the best of my understanding at the moment... -Chris