From: Matthias Schwarzott <zzam@gentoo.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: Wrong symlink handling on rule changes
Date: Thu, 20 Sep 2007 15:35:29 +0000 [thread overview]
Message-ID: <200709201735.29412.zzam@gentoo.org> (raw)
In-Reply-To: <200709201716.37510.zzam@gentoo.org>
On Donnerstag, 20. September 2007, Alexander E. Patrakov wrote:
> Matthias Schwarzott wrote:
> > Hi there!
> > Playing around with rules I stepped over a strange thing.
> >
> > I played with device-mapper rules, but the bug is about general symlink
> > handling.
> >
> > 1. My rules did set this:
> > NAME="dm-0", SYMLINK="mapper/main-slash"
> > That results in /dev/dm-0 being a device-node and /dev/mapper/main-slash
> > is a symlink to it.
> >
> > 2. Swapping NAME and SYMLINK
> > NAME="mapper/main-slash", SYMLINK="dm-0"
> > and running udevtrigger changes dm-0 to be a symlink to correct target.
> > BUT: It changes mapper/main-slash to be a symlink to itself.
> >
> > Calling udevtrigger a second time will correct symlink.
>
> Is this reproducible with non-device-mapper devices? I think (but I am
> not sure) that the device-mapper library can poke into /dev by itself,
> and thus calling dmsetup from the persistent storage rules may interfere
> with normal udev operation here.
Yes I can reproduce it with other devices.
Adding this rule:
KERNEL="sda", NAME="sda", SYMLINK="try1"
# udevtrigger
# ls -l /dev/sda /dev/try1
brw-r----- 1 root disk 8, 0 12. Sep 09:47 /dev/sda
lrwxrwxrwx 1 root root 3 20. Sep 17:31 /dev/try1 -> sda
Change rule to:
KERNEL="sda", SYMLINK+="sda", NAME="try1"
# udevtrigger
# ls -l /dev/sda /dev/try1
lrwxrwxrwx 1 root root 4 20. Sep 17:33 /dev/sda -> try1
lrwxrwxrwx 1 root root 4 20. Sep 17:33 /dev/try1 -> try1
# udevtrigger
# ls -l /dev/sda /dev/try1
lrwxrwxrwx 1 root root 4 20. Sep 17:33 /dev/sda -> try1
brw-r----- 1 root disk 8, 0 20. Sep 17:34 /dev/try1
Matthias
--
Matthias Schwarzott (zzam)
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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
next prev parent reply other threads:[~2007-09-20 15:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-20 15:16 Wrong symlink handling on rule changes Matthias Schwarzott
2007-09-20 15:27 ` Alexander E. Patrakov
2007-09-20 15:35 ` Matthias Schwarzott [this message]
2007-09-20 15:40 ` Kay Sievers
2007-09-20 16:10 ` Matthias Schwarzott
2007-09-20 17:10 ` Kay Sievers
2007-09-20 17:43 ` Kay Sievers
2007-09-20 21:07 ` Matthias Schwarzott
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=200709201735.29412.zzam@gentoo.org \
--to=zzam@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).