LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Stephane Chazelas <stephane.chazelas@emerson.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Jörn Engel" <joern@logfs.org>,
linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org
Subject: Re: [PATCH 2.6.24] block2mtd: removing a device and typo fixes
Date: Wed, 20 Feb 2008 14:43:39 +0000 [thread overview]
Message-ID: <chaz20080220144339.GK4539@artesyncp.com> (raw)
In-Reply-To: <200802192333.39707.arnd@arndb.de>
2008-02-19 23:33:38 +0100, Arnd Bergmann:
> On Tuesday 19 February 2008, you wrote:
> > > What about having a /dev/block2mtd (with owner/permissions that
> > > could allow non-root users to use it), with 2 ioctls:
> > >
> > > - one to "link" a block dev to a mtd that would take as
> > > parameter a fd to an open block dev (again allowing for
> > > flexible permissions) and would return the number of the
> > > allocated mtd and success/failure in errno. Upon sucess it
> > > would increase the refcnt of block2mtd.
> > >
> > > - and one to "release" the link. That would fail if the mtd is
> > > in use and decrease block2mtd's refcnt upon success.
> > >
> > > A bit like the loop devices (or /dev/ptmx) actually. What do you
> > > think?
> >
> > Could work. Passing the fd raises several alarm bells. Arnd, any
> > comments from you?
>
> Given that loop works in this way, I certainly see that as doable,
> but then I'd vote for using the existing ioctl semantics of
> LOOP_SET_FD and LOOP_DEL_FD on the mtdchar device, which already
> comes with an ioctl interface for mtd devices.
> I'd probably also allow the LOOP_{GET,SET}_STATUS{,64} commands,
> so you can actually use the existing losetup tool.
> That way, we wouldn't have to introduce a new API, just extend
> an existing one to work on more things.
[...]
Hi Arnd,
note that for "loop", you have /dev/loop0, /dev/loop1... which
makes it a pain to handle
For block2mtd, you don't need several device files in /dev, you
only need one to pass ioctls down to create mtd devices.
That may end up creating new /dev devices via mtdblock or
mtdblock_ro for instance.
So I'm not sure reusing the "loop" ioctls is a good idea.
Cheers,
Stephane
next prev parent reply other threads:[~2008-02-20 14:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-12 13:47 Stephane Chazelas
2008-02-12 15:21 ` Jörn Engel
2008-02-12 16:10 ` Stephane Chazelas
2008-02-19 15:08 ` Jörn Engel
2008-02-19 22:33 ` Arnd Bergmann
2008-02-20 6:43 ` Jörn Engel
2008-02-20 14:43 ` Stephane Chazelas [this message]
2008-02-20 16:30 ` Jörn Engel
2008-02-20 17:02 ` Stephane Chazelas
2008-02-20 17:22 ` Jörn Engel
2008-02-20 17:30 ` Stephane Chazelas
2008-02-23 15:33 ` Jörn Engel
2008-02-20 14:36 ` Stephane Chazelas
2008-02-20 16:42 ` Jörn Engel
2008-02-20 16:55 ` Stephane Chazelas
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=chaz20080220144339.GK4539@artesyncp.com \
--to=stephane.chazelas@emerson.com \
--cc=arnd@arndb.de \
--cc=joern@logfs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--subject='Re: [PATCH 2.6.24] block2mtd: removing a device and typo fixes' \
/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
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).