linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Drake <dsd@gentoo.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: 2.6.6/udev weirdness
Date: Mon, 17 May 2004 09:49:04 +0000	[thread overview]
Message-ID: <40A89868.10306@gentoo.org> (raw)
In-Reply-To: <20040512235509.GA3836@heliopause.vort.org>

Hi,

Russell Neches wrote:
> Actually, I think the wording is quite clear in that section. I
> reckoned that I was having a different problem, though. My origional
> rules did, after all, work exactly as I wanted them to under
> 2.6.5. It's easy enough to see why one would want to distinguish
> between sda and sda1 and how to do it. My problem wasn't that I
> couldn't figure out how to solve that particular problem, it was that
> the behavior changed between minor version numbers of the kernel.

Yes, but your rule was problematic. It was being applied for sda, sda1, and 
also sg1 each time. I'm not sure if udev uses the first or last match, but 
either way, it was effectively choosing 1 and discarding 2. I've seen rules 
like this change their behaviour over reboots, and I suspect that might have 
been what caused it (rather than the fact that you upgraded kernel). You were 
just lucky that your rule worked originally (1 in 3 chance), and then your 
luck ran out :)

> I had thought (incorrectly, it seems) that sysfs is intended
> specifically to provide a standardized, reliable source of hardware
> information, and that the whole point of the thing was to prevent
> problems like the one I noticed. If sysfs is going to be a mix of some
> values that aren't supposed to change, and some that do, or might, or
> can, or could change (aside from chanes to _enforce_ compliance with
> policy), then it's much less useful. 

I'm 99% sure that the relevant parts of _sysfs_ would have stayed identical 
over your kernel upgrade. The problem is that your _udev_ rule was matching at 
least 3 areas of sysfs each time: scsi generic (sg1), scsi disk (sda), and 
each partition (sda1, sda2, ...).

This is where the section of the doc explaining about specificity comes in. I 
was trying to explain that you need to be specific about the partition/disk 
you are selecting, otherwise you might get something "useless" (e.g. 
unmountable node).

I'm not suprised that you experienced that the behaviour of your rule changed 
over time, even if we think it was triggered by a kernel upgrade.

> If there is some way of knowing which values may be expected to "stay
> put" between kernel revisions, then that goes part of the way to
> fixing the problem.

I think you have gone beyond the problem here. *If* the kernel upgrade caused 
the change in behaviour for your particular rule, then it will have been due 
to something like the timing of module loading changed, or the code used to 
create the sysfs tree being moved into an earlier/later stage of 
initialization, *not* because the sysfs values changed.

Daniel


-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id%62&alloc_ida84&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-05-17  9:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-12 23:55 2.6.6/udev weirdness Russell Neches
2004-05-13  5:59 ` Greg KH
2004-05-13 17:51 ` Russell Neches
2004-05-13 18:15 ` Kevin P. Fleming
2004-05-13 21:02 ` Greg KH
2004-05-15  5:42 ` Russell Neches
2004-05-16  9:21 ` Daniel Drake
2004-05-16 21:03 ` Russell Neches
2004-05-17  9:49 ` Daniel Drake [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=40A89868.10306@gentoo.org \
    --to=dsd@gentoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).