From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aurelien Chartier Subject: Re: [PATCH V4 2/2] xenbus: delay xenbus frontend resume if xenstored is not running Date: Tue, 28 May 2013 13:59:53 +0100 Message-ID: <51A4AA49.5000701@citrix.com> References: <1368707680-21816-1-git-send-email-aurelien.chartier@citrix.com> <1368707680-21816-3-git-send-email-aurelien.chartier@citrix.com> <5194FC1D02000078000D6C07@nat28.tlf.novell.com> <5194F464.4050901@citrix.com> <20130528124526.GA6508@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130528124526.GA6508@phenom.dumpdata.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk Cc: ian.campbell@citrix.com, david.vrabel@citrix.com, Jan Beulich , xen-devel List-Id: xen-devel@lists.xenproject.org On 28/05/13 13:45, Konrad Rzeszutek Wilk wrote: > On Thu, May 16, 2013 at 03:59:48PM +0100, Aurelien Chartier wrote: >> On 16/05/13 14:32, Jan Beulich wrote: >>>>>> On 16.05.13 at 14:34, Aurelien Chartier wrote: >>>> @@ -440,6 +467,13 @@ static int __init xenbus_probe_frontend_init(void) >>>> >>>> register_xenstore_notifier(&xenstore_notifier); >>>> >>>> + xenbus_frontend_wq = create_workqueue("xenbus_frontend"); >>>> + if (!xenbus_frontend_wq) { >>>> + printk(KERN_ERR "%s: create " >>>> + "xenbus_frontend_workqueue failed\n", __func__); >>> pr_err() should be the norm these days. >>> >>> And personally I consider it quite bad a habit to put function names >>> in non-debugging log messages - this doesn't really help with >>> anything (as long as the rest of the message is meaningful), but >>> clutters the log. >> I was using the same format as pciback error handling, but I can switch >> to pr_err. >> >>> And finally, you need to do proper error handling here - this code >>> can be built as a module, and hence leaving notifier and bus >>> registered upon failure sets up the kernel for crashing. Moving >>> the code ahead of register_xenstore_notifier() will take care of >>> one half of the problem, but you'll nevertheless will need to call >>> bus_unregister() if you really intend to make this a fatal error >>> condition (which by itself is questionable since in most scenarios >>> you won't need the work queue at all). >> Right, I will move the error handling to the xenbus frontend resume >> function. > Any ETA when the v5 with these changes will be posted? Thanks. I was on holidays last week, but the v5 was almost ready. I will send it today or tomorrow.