linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Corry <kevcorry@us.ibm.com>
To: dm-devel@sistina.com, Joe Thornber <thornber@sistina.com>
Cc: Linux Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [dm-devel] Re: [RFC 3/3] dm: v4 ioctl interface
Date: Wed, 2 Jul 2003 09:15:10 -0500	[thread overview]
Message-ID: <200307020915.10573.kevcorry@us.ibm.com> (raw)
In-Reply-To: <20030702085951.GB410@fib011235813.fsnet.co.uk>

On Wednesday 02 July 2003 03:59, Joe Thornber wrote:
> On Tue, Jul 01, 2003 at 03:05:07PM -0500, Kevin Corry wrote:
> > > +static int check_name(const char *name)
> > > +{
> > > +	if (strchr(name, '/')) {
> > > +		DMWARN("invalid device name");
> > > +		return -EINVAL;
> > > +	}
> > > +
> > > +	return 0;
> > > +}
> >
> > Can't we allow slashes in device names? I thought we discussed this
> > before (http://marc.theaimsgroup.com/?t=104628092700011&r=1&w=2). Any
> > reason for the change?
>
> I think I made the wrong decision before.  Still thinking about it though.

Well, what are your current thoughts?

I guess the way I see it is that this name is simply a way for user-space to 
identify a device to the driver, and it seems kind of unnecessary for the 
driver to put restrictions on that name.

The only reason I can really think of to restrict the contents of this name is 
due to using the name for devfs. But devfs doesn't seem to mind dealing with 
names with embedded slashes (I always run with devfs enabled, and I've never 
seen it complain).

On a side note, looking through the devfs code reveals a potential error. In 
DM, names can be 127 characters. But devfs_mk_bdev() (in fs/devfs/base.c) 
will only accept names up to 63 characters. If it gets a name longer than 
that, it just returns an error, which DM will ignore. This isn't a fatal 
error by any means, but if any user-space tools rely on those devfs devices 
being created, there may be cases where the tools won't work correctly.

> > Does this imply that if the dm_swap_table() call fails, then the
> > "inactive" mapping is automatically deleted?
>
> Yes, that is the behaviour ATM.  Would you rather it didn't ?

Well...I can't say that it makes much difference to me either way at the 
moment. :) I just wanted to clarify the behavior, since it wasn't explicitly 
stated anywhere.

-- 
Kevin Corry
kevcorry@us.ibm.com
http://evms.sourceforge.net/


  parent reply	other threads:[~2003-07-02 14:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-01 14:58 [RFC] device-mapper v4 ioctl interface implementation Joe Thornber
2003-07-01 15:01 ` [RFC 1/3] dm: fix memory leak Joe Thornber
2003-07-01 15:01 ` [RFC 2/3] dm: avoid event race Joe Thornber
2003-07-01 15:02 ` [RFC 3/3] dm: v4 ioctl interface Joe Thornber
2003-07-01 20:05   ` Kevin Corry
2003-07-02  8:59     ` Joe Thornber
2003-07-02 10:59       ` [dm-devel] " Joe Thornber
2003-07-02 10:59       ` Joe Thornber
2003-07-02 10:59       ` Joe Thornber
2003-07-02 11:00       ` Joe Thornber
2003-07-02 11:00       ` Joe Thornber
2003-07-02 14:17         ` Kevin Corry
2003-07-02 14:15       ` Kevin Corry [this message]
2003-07-06  0:39 ` [dm-devel] [RFC] device-mapper v4 ioctl interface implementation Alasdair G Kergon
2003-07-02 15:23 [dm-devel] Re: [RFC 3/3] dm: v4 ioctl interface Steve Dobbelstein
2003-07-02 15:40 ` Joe Thornber

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=200307020915.10573.kevcorry@us.ibm.com \
    --to=kevcorry@us.ibm.com \
    --cc=dm-devel@sistina.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thornber@sistina.com \
    /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).