* blkmtd and name_to_dev_t
[not found] ` <20060330114014.53150d1b.akpm@osdl.org>
@ 2006-03-30 23:36 ` H. Peter Anvin
2006-03-31 8:38 ` Jörn Engel
2006-04-04 2:56 ` Eric W. Biederman
0 siblings, 2 replies; 10+ messages in thread
From: H. Peter Anvin @ 2006-03-30 23:36 UTC (permalink / raw)
To: joern, dwmw2, linux-mtd
Hello all,
I'm trying to revamp the Linux kernel by moving a lot of (mainly)
initialization code to "early userspace" -- a tiny userspace carried
with the kernel image. This is sometimes referred to as the "klibc"
project.
I sent a git tree to Andrew Morton for possible integration in -mm, and
it got rejected due to the fact that the blkmtd driver uses
name_to_dev_t() when compiled into the kernel, which is removed in the
klibc tree -- it is now strictly a matter of userspace policy.
I talked to Jörg Engel about this; he indicated that the blkmtd driver
(which is the one that has this problem) is already deprecated in favour
of block2mtd. Hence I'm hesitant to spend a lot of time on this,
especially in the light of the fact that keeping a 90,000-line patch up
to date with an evolving kernel is a challenge in itself.
There seems to be a few options, in order from least work to more work:
- Removing the blkmtd driver and tell people to use block2mtd;
- Have kinit intercept blkmtd configuration options and emulate them
using block2mtd;
- Adjust blkmtd to have a configuration interface, and then make kinit
configure it.
I would appreciate any opinions on this. Clearly, I'm eager at getting
unblocked on this, but my submitting a tree to Andrew which disables a
driver without the maintainers' OK isn't exactly going to fly :)
For what it's worth, the klibc tree is at:
git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-klibc.git
-=hpa
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: blkmtd and name_to_dev_t
2006-03-30 23:36 ` blkmtd and name_to_dev_t H. Peter Anvin
@ 2006-03-31 8:38 ` Jörn Engel
2006-03-31 15:10 ` H. Peter Anvin
2006-04-04 2:56 ` Eric W. Biederman
1 sibling, 1 reply; 10+ messages in thread
From: Jörn Engel @ 2006-03-31 8:38 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: linux-mtd, dwmw2
On Thu, 30 March 2006 15:36:24 -0800, H. Peter Anvin wrote:
>
> I talked to Jörg Engel about this; he indicated that the blkmtd driver
^
*grumble* ;)
> There seems to be a few options, in order from least work to more work:
>
> - Removing the blkmtd driver and tell people to use block2mtd;
Fair enough. No objections from my side.
Most users of mtd tend to use ancient kernels anyway, so there is less
reason for a warning period, compared to other parts of the kernel.
> - Have kinit intercept blkmtd configuration options and emulate them
> using block2mtd;
> - Adjust blkmtd to have a configuration interface, and then make kinit
> configure it.
Jörn
--
I don't understand it. Nobody does.
-- Richard P. Feynman
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: blkmtd and name_to_dev_t
2006-03-31 8:38 ` Jörn Engel
@ 2006-03-31 15:10 ` H. Peter Anvin
0 siblings, 0 replies; 10+ messages in thread
From: H. Peter Anvin @ 2006-03-31 15:10 UTC (permalink / raw)
To: Jörn Engel; +Cc: linux-mtd, dwmw2
Jörn Engel wrote:
> On Thu, 30 March 2006 15:36:24 -0800, H. Peter Anvin wrote:
>> I talked to Jörg Engel about this; he indicated that the blkmtd driver
> ^
> *grumble* ;)
>
*D'OH!!!* SORRY!!!!! :) :) :)
-hpa
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: blkmtd and name_to_dev_t
2006-03-30 23:36 ` blkmtd and name_to_dev_t H. Peter Anvin
2006-03-31 8:38 ` Jörn Engel
@ 2006-04-04 2:56 ` Eric W. Biederman
2006-04-04 3:07 ` H. Peter Anvin
2006-04-04 3:11 ` Josh Boyer
1 sibling, 2 replies; 10+ messages in thread
From: Eric W. Biederman @ 2006-04-04 2:56 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: dwmw2, linux-mtd
"H. Peter Anvin" <hpa@zytor.com> writes:
> There seems to be a few options, in order from least work to more work:
>
> - Removing the blkmtd driver and tell people to use block2mtd;
> - Have kinit intercept blkmtd configuration options and emulate them using
> block2mtd;
> - Adjust blkmtd to have a configuration interface, and then make kinit configure
> it.
Block devices are not especially interesting when working with flash chips, as they
are an emulation layer. The character devices are much more interesting,
and the native filesystems don't go through a block or a character device.
So killing blkmtd sounds like a reasonable thing to do.
Given that klibc will reduce the size of the kernel I expect most embedded
users will in general be in favor of it.
So I suggest what happens is that we deprecate blkmtd in Documentation/FeatureRemoval
of 2.6.17 and delete it in the -mm tree.
Then you can merge klibc.
Does any one have a problem with that plan?
Eric
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: blkmtd and name_to_dev_t
2006-04-04 2:56 ` Eric W. Biederman
@ 2006-04-04 3:07 ` H. Peter Anvin
2006-04-04 8:30 ` Jörn Engel
2006-04-04 3:11 ` Josh Boyer
1 sibling, 1 reply; 10+ messages in thread
From: H. Peter Anvin @ 2006-04-04 3:07 UTC (permalink / raw)
To: Eric W. Biederman; +Cc: dwmw2, linux-mtd
Eric W. Biederman wrote:
> "H. Peter Anvin" <hpa@zytor.com> writes:
>
>> There seems to be a few options, in order from least work to more work:
>>
>> - Removing the blkmtd driver and tell people to use block2mtd;
>> - Have kinit intercept blkmtd configuration options and emulate them using
>> block2mtd;
>> - Adjust blkmtd to have a configuration interface, and then make kinit configure
>> it.
>
> Block devices are not especially interesting when working with flash chips, as they
> are an emulation layer. The character devices are much more interesting,
> and the native filesystems don't go through a block or a character device.
> So killing blkmtd sounds like a reasonable thing to do.
>
I thought (am I wrong?) that blkmtd referred to using a block device as
an MTD device. Either which way, Jörn tells me that blkmtd is
deprecated by block2mtd anyway, and only retained for boot support,
which is pretty easy to do in klibc.
> Given that klibc will reduce the size of the kernel I expect most embedded
> users will in general be in favor of it.
>
> So I suggest what happens is that we deprecate blkmtd in Documentation/FeatureRemoval
> of 2.6.17 and delete it in the -mm tree.
>
> Then you can merge klibc.
>
> Does any one have a problem with that plan?
That certainly works for me. Jörn indicated he's going to sign off on a
patch to remove blkmtd, which will solve my problem.
-hpa
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: blkmtd and name_to_dev_t
2006-04-04 2:56 ` Eric W. Biederman
2006-04-04 3:07 ` H. Peter Anvin
@ 2006-04-04 3:11 ` Josh Boyer
1 sibling, 0 replies; 10+ messages in thread
From: Josh Boyer @ 2006-04-04 3:11 UTC (permalink / raw)
To: Eric W. Biederman; +Cc: linux-mtd, dwmw2, H. Peter Anvin
On 4/3/06, Eric W. Biederman <ebiederman@lnxi.com> wrote:
> "H. Peter Anvin" <hpa@zytor.com> writes:
>
> > There seems to be a few options, in order from least work to more work:
> >
> > - Removing the blkmtd driver and tell people to use block2mtd;
> > - Have kinit intercept blkmtd configuration options and emulate them using
> > block2mtd;
> > - Adjust blkmtd to have a configuration interface, and then make kinit configure
> > it.
>
> Block devices are not especially interesting when working with flash chips, as they
> are an emulation layer. The character devices are much more interesting,
> and the native filesystems don't go through a block or a character device.
> So killing blkmtd sounds like a reasonable thing to do.
Erm, you've got the idea behind blkmtd a bit backwards. It's not to
make an MTD device show up as a block device. It's to make a block
device show up as an MTD device. Quite useful for testing JFFS2, etc
when one doesn't have immediate access to flash chips. But that is
all beside the point.
> So I suggest what happens is that we deprecate blkmtd in Documentation/FeatureRemoval
> of 2.6.17 and delete it in the -mm tree.
>
> Then you can merge klibc.
>
> Does any one have a problem with that plan?
I believe this sounds good.
josh
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: blkmtd and name_to_dev_t
2006-04-04 3:07 ` H. Peter Anvin
@ 2006-04-04 8:30 ` Jörn Engel
2006-04-04 8:42 ` Artem B. Bityutskiy
0 siblings, 1 reply; 10+ messages in thread
From: Jörn Engel @ 2006-04-04 8:30 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: linux-mtd, dwmw2, Eric W. Biederman
On Mon, 3 April 2006 20:07:48 -0700, H. Peter Anvin wrote:
> Eric W. Biederman wrote:
>
> I thought (am I wrong?) that blkmtd referred to using a block device as
> an MTD device. Either which way, Jörn tells me that blkmtd is
> deprecated by block2mtd anyway, and only retained for boot support,
> which is pretty easy to do in klibc.
You are not wrong.
A possibly better way to deliver the same functionality (jffs2 rootfs
on block device through emulation) might be to add transparent
translation support to jffs2. Something that will make "mount
/dev/hda1 /mnt -t jffs2" work. How exactly the code for this should
look, I don't know yet. But given that jffs2 is the only sane user of
bd->mtd translation, it looks like the Right Thing to me.
> >So I suggest what happens is that we deprecate blkmtd in
> >Documentation/FeatureRemoval
> >of 2.6.17 and delete it in the -mm tree.
> >
> >Then you can merge klibc.
> >
> >Does any one have a problem with that plan?
>
> That certainly works for me. Jörn indicated he's going to sign off on a
> patch to remove blkmtd, which will solve my problem.
Once the coffee kicks in, yes. Good morning everyone.
Ordinarily, we should go through the usual 1 year deprecation period
for blkmtd. But in this case I find it justified to pull the support
immediatly:
o An alternative exists that hasn't had bug report for > 1 year.
o Most embedded people tend to use ancient kernels with custom patches
from mtd cvs and elsewhere, so the 1 year warning period neither
helps nor hurts them too much.
o It's in the way of klibc. The problems caused by pulling blkmtd
support are fairly low, while the problems caused by delaying klibc
can be fairly substantial. At best, this would be a severe burden
on hpa's time.
That said, deprecating the driver in -linus and removing it in -mm
until klibc is merged to -linus sounds like a good idea. Will do
that.
Jörn
--
Anything that can go wrong, will.
-- Finagle's Law
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: blkmtd and name_to_dev_t
2006-04-04 8:30 ` Jörn Engel
@ 2006-04-04 8:42 ` Artem B. Bityutskiy
2006-04-04 8:46 ` Jörn Engel
0 siblings, 1 reply; 10+ messages in thread
From: Artem B. Bityutskiy @ 2006-04-04 8:42 UTC (permalink / raw)
To: Jörn Engel; +Cc: Linux MTD
Jörn Engel wrote:
> You are not wrong.
>
> A possibly better way to deliver the same functionality (jffs2 rootfs
> on block device through emulation) might be to add transparent
> translation support to jffs2. Something that will make "mount
> /dev/hda1 /mnt -t jffs2" work. How exactly the code for this should
> look, I don't know yet. But given that jffs2 is the only sane user of
> bd->mtd translation, it looks like the Right Thing to me.
This is a bit out of context and I'm not arguing. Just wanted to note.
Mount and linux long support device-less mount. The beset way to mount
JFFS2 would be to do like this:
mount mtd0 /mnt/jffs2 -t jffs2
No need to have any fake block device, no need to have any device node
at all. JFFS2 seems to (not sure) not support this but it is trivial to add.
I tend to think that this mtdblock fake stuff is some ancient crap and
has to go and not confuse people.
--
Best Regards,
Artem B. Bityutskiy,
St.-Petersburg, Russia.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: blkmtd and name_to_dev_t
2006-04-04 8:42 ` Artem B. Bityutskiy
@ 2006-04-04 8:46 ` Jörn Engel
2006-04-04 8:57 ` Artem B. Bityutskiy
0 siblings, 1 reply; 10+ messages in thread
From: Jörn Engel @ 2006-04-04 8:46 UTC (permalink / raw)
To: Artem B. Bityutskiy; +Cc: Linux MTD
On Tue, 4 April 2006 12:42:54 +0400, Artem B. Bityutskiy wrote:
>
> This is a bit out of context and I'm not arguing. Just wanted to note.
> Mount and linux long support device-less mount. The beset way to mount
> JFFS2 would be to do like this:
>
> mount mtd0 /mnt/jffs2 -t jffs2
>
> No need to have any fake block device, no need to have any device node
> at all. JFFS2 seems to (not sure) not support this but it is trivial to add.
>
> I tend to think that this mtdblock fake stuff is some ancient crap and
> has to go and not confuse people.
Artem, this is the other way around. You are talking about having a
fake block device to mount jffs2 on mtd. mtd->bd
I was talking about having a fake mtd on top of a block device to
mount jffs2 on it. bd->mtd
Yes, the whole translate this into that business around mtd is rather
confusing. It is unfortunate that a struct block_device is not
sufficient for flash purposes (yet?).
Jörn
--
Sometimes, asking the right question is already the answer.
-- Unknown
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: blkmtd and name_to_dev_t
2006-04-04 8:46 ` Jörn Engel
@ 2006-04-04 8:57 ` Artem B. Bityutskiy
0 siblings, 0 replies; 10+ messages in thread
From: Artem B. Bityutskiy @ 2006-04-04 8:57 UTC (permalink / raw)
To: Jörn Engel; +Cc: Linux MTD
Jörn Engel wrote:
> Artem, this is the other way around. You are talking about having a
> fake block device to mount jffs2 on mtd. mtd->bd
Yes yes. I said "This is a bit out of context and I'm not arguing".
I just noticed that the whole confusion came form these "mtdblock"
devices... Sorry if I'm wrong.
--
Best Regards,
Artem B. Bityutskiy,
St.-Petersburg, Russia.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2006-04-04 8:58 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20060329232520.1677d2b3.akpm@osdl.org>
[not found] ` <442C0494.2040609@zytor.com>
[not found] ` <20060330114014.53150d1b.akpm@osdl.org>
2006-03-30 23:36 ` blkmtd and name_to_dev_t H. Peter Anvin
2006-03-31 8:38 ` Jörn Engel
2006-03-31 15:10 ` H. Peter Anvin
2006-04-04 2:56 ` Eric W. Biederman
2006-04-04 3:07 ` H. Peter Anvin
2006-04-04 8:30 ` Jörn Engel
2006-04-04 8:42 ` Artem B. Bityutskiy
2006-04-04 8:46 ` Jörn Engel
2006-04-04 8:57 ` Artem B. Bityutskiy
2006-04-04 3:11 ` Josh Boyer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox