From: Rusty Russell Subject: Re: Block device configuration Date: Sun, 23 Oct 2005 14:50:52 +1000 Message-ID: <1130043052.28563.38.camel@localhost.localdomain> References: <1129868947.28563.22.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Mark Ryden Cc: Xen Mailing List List-Id: xen-devel@lists.xenproject.org On Fri, 2005-10-21 at 08:55 +0200, Mark Ryden wrote: > Hi, > > In this occasion, I want to add one question which is also about > this issue,if I may: > > Can anyone explain in a few sentences and show exactly where in the code and > how the backend driver probe function and the frontend driver probe function > are called ? (blkfront_probe() and blkback_probe() in the case of a > block device). Look in drivers/xen/xenbus_probe.c. This code places watches on the "device" and "backend" directories: when a new directory appears, it calls xenbus_probe_node(), which calls the driver core's device_register(). This calls xenbus_match to compare the device against each driver; if a driver is found, it calls xenbus_dev_probe, which calls blkfront_probe() or blkback_probe() in your two cases. > Is this have to do with udev/hotplug calling probe using generic linux > probe methods? No, udev/hotplug is orthogonal. That call gets fired off asynchronously by the Linux driver core > Or is it that merely setting values in XenStore triggers the probing > functions, using some callback? I doubt this is the case. It is the case. Hope that clarifies, Rusty. -- A bad analogy is like a leaky screwdriver -- Richard Braakman