From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Sun, 11 Apr 2004 14:42:09 +0000 Subject: Re: how to notify blindly created 'all_partitions' to dbus, HAL, gvm Message-Id: <20040411144209.GA5804@vrfy.org> 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, Apr 11, 2004 at 03:57:33PM +0200, David Zeuthen wrote: > 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. Cool, problem is gone. I like it. > 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? Yes right. After a discussion on lkml, Linus asked for it. I just stumbled upon, cause I have a similar device and the following udev rule: BUS="scsi", KERNEL="sd*", SYSFS{model}="USB Storage-CFC", NAME{all_partitions}="compactflash" The first partition is called compactflash1 and it's in /etc/fstab, but gvm wasn't recognizing my "photos" ... A simple explicit rule for the partition and this name in fstab fixes this, but anyway, seems with HAL, I will never need 'all_partitions' again. :) thanks, Kay ------------------------------------------------------- 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