From: David Zeuthen Date: Sun, 11 Apr 2004 13:57:33 +0000 Subject: Re: how to notify blindly created 'all_partitions' to dbus, HAL, Message-Id: <1081691852.2871.15.camel@ixus.fubar.dk> List-Id: References: <20040411121129.GA5590@vrfy.org> In-Reply-To: <20040411121129.GA5590@vrfy.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Sun, 2004-04-11 at 14:11, Kay Sievers wrote: > We have a feature in udev to create all 15 partitions for a removable > media device without looking at it. It's needed cause most of the devices > never notify about a media change and with a fully dynamic /dev we need > to access one partition to force the kernel to revalidate the device. > This all couldn't be avoided without polling :( > > Now as we create nodes, should we execute the /etc/dev.d/ programs for > the "blind" partition nodes? What are the implications for HAL, gvm? > > And should we fake the DEVPATH for it, huhh...? > FWIW, I don't think it's necessary to execute the /etc/dev.d/ programs for this. Since HAL actually poll the top-level block devices, e.g. /dev/sda, it means that when media is inserted, the kernel invokes hotplug for the appropriate block device, e.g. /dev/sda1 and then everything is business as usual. Same story for when the media is removed because HAL keeps on polling even though there is media inserted. This works pretty well with my 6in1 card reader and inserting/removing a CF card, in fact it feels pretty sleek to see the icon appear on the desktop. Wrt. gnome-volume-manager, this is just a simple policy engine that listens for events from HAL, mounts volumes as appropriate and optionally stars some programs if it detects pictures on the device (yeah, layers upon layers :-) On the other hand it doesn't hurt a lot to exec the programs, HAL will just ignore it since the DEVPATH is invalid, but note that for my 6in1 reader (with 4 LUN's) this means 60 extra invocations! As far as I recall the only reason for creating all the 15 devices is compatibility and convenience, right? Cheers, David ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel