All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: how to notify blindly created 'all_partitions' to dbus, HAL, gvm
Date: Sun, 11 Apr 2004 14:42:09 +0000	[thread overview]
Message-ID: <20040411144209.GA5804@vrfy.org> (raw)
In-Reply-To: <20040411121129.GA5590@vrfy.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_id\x1470&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

      parent reply	other threads:[~2004-04-11 14:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-11 12:11 how to notify blindly created 'all_partitions' to dbus, HAL, gvm Kay Sievers
2004-04-11 13:57 ` how to notify blindly created 'all_partitions' to dbus, HAL, David Zeuthen
2004-04-11 14:42 ` Kay Sievers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040411144209.GA5804@vrfy.org \
    --to=kay.sievers@vrfy.org \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.