From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH] drivers: xen-blkfront: only talk_to_blkback() when in XenbusStateInitialising Date: Tue, 23 Jun 2015 07:57:43 -0400 Message-ID: <64AE53A3-12FC-44C0-8AAA-12E99DA3C5A3__15967.4331582666$1435060851$gmane$org@oracle.com> References: <558762C4.2000002@oracle.com> <1434981360-29794-1-git-send-email-konrad.wilk@oracle.com> <5589179F0200007800087E6E@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z7MqO-0000zZ-93 for xen-devel@lists.xenproject.org; Tue, 23 Jun 2015 11:58:24 +0000 In-Reply-To: <5589179F0200007800087E6E@mail.emea.novell.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: Jan Beulich Cc: Rafal.Mielniczuk@citrix.com, linux-kernel@vger.kernel.org, marcus.granado@citrix.com, julien.grall@citrix.com, justing@spectralogic.com, Paul.Durrant@citrix.com, david.vrabel@citrix.com, xen-devel@lists.xenproject.org, roger.pau@citrix.com List-Id: xen-devel@lists.xenproject.org On June 23, 2015 2:23:59 AM EDT, Jan Beulich wrote: >>>> On 22.06.15 at 15:56, wrote: >> --- a/drivers/block/xen-blkfront.c >> +++ b/drivers/block/xen-blkfront.c >> @@ -1951,6 +1951,8 @@ static void blkback_changed(struct >xenbus_device *dev, >> >> switch (backend_state) { >> case XenbusStateInitWait: >> + if (dev->state != XenbusStateInitialising) >> + break; > >If, as you say in a subsequent reply, all other drivers already have >such a check, wouldn't it make more sense to put this into xenbus' >backend_changed() or even xenbus_otherend_changed()? Good idea. Let me spin an cleanup patch for the race handling - but put this in the Jens branch as the merge window is happening right now. > >Jan