This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] Xenstore remove problem - causes bug #473

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] Xenstore remove problem - causes bug #473
From: Murillo Bernardes <mfb@xxxxxxxxxx>
Date: Fri, 13 Jan 2006 10:28:35 -0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 13 Jan 2006 12:35:39 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <3ec09f6b750c71903448a12317350d6f@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: IBM
References: <200601101101.24419.mfb@xxxxxxxxxx> <3ec09f6b750c71903448a12317350d6f@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.1
On Tuesday 10 January 2006 12:19, Keir Fraser wrote:
> Perhaps something is watching vif/1 and, when the watch fires,
> erroneously causing all vif/1* to get deleted?

I found it!

When a change occur on one backend device we call cleanup_devices() for each 
device in bus. 

The problem is: the test to see if that device was changed is being done with 
strncmp(), using the length of the changed node as maximum length to be 

I think the idea is that any sub-node should be matched also, like: if 
"backend/1/status" changed we have to call backend_changed to "backend/1" 
device, and that is ok. But with that code If we delete device "backend/1" 
all devices matching "backend/1*" are being deleted also.

Suggestions on the best/prettier way to handle that?

Murillo Fernandes Bernardes
IBM Linux Technology Center

Xen-devel mailing list