All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Rajnoha <prajnoha@redhat.com>
To: device-mapper development <dm-devel@redhat.com>
Cc: Sergey Vlasov <vsu@altlinux.ru>,
	Michael Shigorin <mike@osdn.org.ua>,
	"Dmitry V. Levin" <ldv@altlinux.org>
Subject: Re: [PATCH] libdm: add "|" to _is_whitelisted_char()
Date: Wed, 28 Nov 2012 13:04:29 +0100	[thread overview]
Message-ID: <50B5FDCD.2030605@redhat.com> (raw)
In-Reply-To: <20121127191123.GZ19704@osdn.org.ua>

On 11/27/2012 08:11 PM, Michael Shigorin wrote:
> 	Hello,
> please find attached a silly one-liner that was mentioned
> on #device-mapper yesterday and discussed with asalor today.
> 
> It adds "|" to a whitelist of chars allowed in devnode names
> for the sake of legacy compatibility with EVMS2 LVM plugin
> which uses to name the nodes like "lvm2|vg|lv".

Actually, that whitelist is taken from udev and any extra
character not on the current whitelist is automatically mangled
to a form that udev understands by default (which is \xNN,
NN being a hex value of the character). So it's all done to
conform with udev. Otherwise, if such mangling was not used,
udev would replace any blacklisted character with an underscore "_".

Now, if you *really* intend to bypass this mangling and udev,
you can use:

  dmsetup <dm_command> --manglename none ...


If you have your libdevmapper *compiled with udev support*
(configure --enable-udev_sync), then you also need to use
extra --noudevrules (to bypass udev rules) and --verifyudev
switches (to make a fallback to direct node/symlink creation):

  dmsetup <dm_command> --manglename none --noudevrules --verifyudev ...

But, if your system uses udev, try to avoid this as much as possible!
Bypassing udev has many side effects, like missing information in
udev database (as the symlinks/nodes were not created by udev itself).
And this database could be read by other tools and they simply won't
see all the state. Reading udev database instead of scanning the
/dev directly is very common these days.

Peter

  reply	other threads:[~2012-11-28 12:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27 19:11 [PATCH] libdm: add "|" to _is_whitelisted_char() Michael Shigorin
2012-11-28 12:04 ` Peter Rajnoha [this message]
2012-11-28 12:50   ` Peter Rajnoha

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=50B5FDCD.2030605@redhat.com \
    --to=prajnoha@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=ldv@altlinux.org \
    --cc=mike@osdn.org.ua \
    --cc=vsu@altlinux.ru \
    /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.