mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christophe Saout <christophe@saout.de>
To: Shane Shrybman <shrybman@sympatico.ca>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Joe Thornber <joe@fib011235813.fsnet.co.uk>
Subject: Re: 2.5.70-mm7
Date: 11 Jun 2003 01:33:53 +0200	[thread overview]
Message-ID: <1055288033.27439.4.camel@chtephan.cs.pocnet.net> (raw)
In-Reply-To: <1055286765.2371.4.camel@mars.goatskin.org>

Am Mit, 2003-06-11 um 01.12 schrieb Shane Shrybman:

> Yeah, I got the same. The message is something like 
> "ioctl cmd 2 No such address or device".

Ok, I think I found the problem.

In dm-ioctl.c in the function create this got changed:

-       int minor;
+       unsigned int minor = 0;

...

-       minor = (param->flags & DM_PERSISTENT_DEV_FLAG) ?
-               minor(to_kdev_t(param->dev)) : -1;
+       if (param->flags & DM_PERSISTENT_DEV_FLAG)
+               minor = minor(to_kdev_t(param->dev));

So, the variable minor is 0 now instead of -1 when the device shouldn't
be persistent. That's bad because 0 is a valid minor.

And now, in dm.c in alloc_dev, called by dm_create

        /* get a minor number for the dev */
-       minor = (minor < 0) ? next_free_minor() : specific_minor(minor);
-       if (minor < 0) {
+       r = (minor < 0) ? next_free_minor(&minor) :
specific_minor(minor);
+       if (r < 0) {

Here the minor is tested for being < 0 (which by the way can't be with
minor being unsigned, so this cleanup is bogus). The kernel always tries
to bind the new logical volume devices to the same minor, which of
course fails after the first one.

> Joe, do we need to upgrade some tools or something here?

No, because there are no new tools and the ioctl interface hasn't
changed (same dm-ioctl.h)

-- 
Christophe Saout <christophe@saout.de>


  reply	other threads:[~2003-06-10 23:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-10 23:12 2.5.70-mm7 Shane Shrybman
2003-06-10 23:33 ` Christophe Saout [this message]
2003-06-11  9:00   ` 2.5.70-mm7 Joe Thornber
2003-06-12  6:57   ` 2.5.70-mm7 Konstantin Kletschke
  -- strict thread matches above, loose matches on Subject: below --
2003-06-10  7:45 2.5.70-mm7 Andrew Morton
2003-06-10 20:00 ` 2.5.70-mm7 Konstantin Kletschke
2003-06-10 20:19   ` 2.5.70-mm7 Christophe Saout

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=1055288033.27439.4.camel@chtephan.cs.pocnet.net \
    --to=christophe@saout.de \
    --cc=joe@fib011235813.fsnet.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shrybman@sympatico.ca \
    /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

all inboxes | Powered by JetHome®