public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind@infradead.org>
To: Tobias Diedrich <ranma@tdiedrich.de>
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: block2mtd and ubi are initialized too early when compiled in on 2.6.31-rc2
Date: Thu, 16 Jul 2009 15:20:44 +0300	[thread overview]
Message-ID: <1247746844.11353.152.camel@localhost.localdomain> (raw)
In-Reply-To: <20090715115235.GA21888@yamamaya.is-a-geek.org>

Hi,

On Wed, 2009-07-15 at 13:52 +0200, Tobias Diedrich wrote:
> On 2.6.31-rc2 the block2mtd drivers module_init is called before any
> block devices have been registered.

Hmm, ok. Is this because block devices are registered asynchronously?
Could you please point to the code where it is done, just for reference.

> Also ubi is initialized pretty early and fails completely if an mtd
> specified on the command line could not be found.

Hmm...

> IMO ubi should at least complete initialization so that attaching
> the mtd later with ubiattach would still work.
> I'm working around this two hacky patches that create a kernel
> thread and retry every second for 20 seconds when the first try
> doesn't work.
> (Obviously this means rootdelay=$somenumber is needed)
> I tried using the async infrastructure, but apparently
> async_synchronize_full is called somewhere between registering the
> async probe thread and the target USB device being registered by the
> USB subsystem, which halts boot until my 20 second timeout, and the
> USB stick is only detected afterwards.
> 
> FWIW I want to use a erasesize aware FS on my USB stick (whose
> builtin FTL has abysmal write performance if writes are less than
> the erasesize) and also be able to use this as my root fs.
> So my setup is usb_storage->block2mtd->ubi->ubifs

Hmm, how other subsystems solve this problem? Any pointer to the code?

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

  reply	other threads:[~2009-07-16 12:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-15 11:52 block2mtd and ubi are initialized too early when compiled in on 2.6.31-rc2 Tobias Diedrich
2009-07-16 12:20 ` Artem Bityutskiy [this message]
2009-07-16 14:28   ` Tobias Diedrich
2009-07-19  6:00     ` Artem Bityutskiy

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=1247746844.11353.152.camel@localhost.localdomain \
    --to=dedekind@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=ranma@tdiedrich.de \
    /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