linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: udev problem (and fix) for /dev/mtdblock*
@ 2009-03-19  1:45 Kay Sievers
  2009-03-19 10:08 ` Scott James Remnant
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Kay Sievers @ 2009-03-19  1:45 UTC (permalink / raw)
  To: linux-hotplug

On Wed, Mar 18, 2009 at 20:44, David Brownell <david-b@pacbell.net> wrote:

> I have a machine running Debian and it's been getting nasty
> boot messages like:
>
>  ...
>  Synthesizing the initial hotplug events...done.
>  Waiting for /dev to be fully populated...uncorrectable error : <3>end_request: I/O error, dev mtdblock0, sector 0
>  Buffer I/O error on device mtdblock0, logical block 0
>  uncorrectable error : <3>end_request: I/O error, dev mtdblock0, sector 8
>  Buffer I/O error on device mtdblock0, logical block 1
>  end_request: I/O error, dev mtdblock0, sector 16
>  Buffer I/O error on device mtdblock0, logical block 2
>  end_request: I/O error, dev mtdblock0, sector 24
>  Buffer I/O error on device mtdblock0, logical block 3
>  uncorrectable error : <3>end_request: I/O error, dev mtdblock0, sector 0
>  Buffer I/O error on device mtdblock0, logical block 0
>  done.
>  Setting parameters of disc: (none).
>  ...
>
> Where /dev/mtdblock0 is something of a special NAND partition,
> used by the mask ROM on the ARM to get a second stage loader,
> which is then loaded from /dev/mtdblock1 etc.  The messages
> about "uncorrectable error" are from the kernel, since that
> first partition uses a different ECC scheme than the rest of
> the flash.
>
> What's happening is that it's trying to read partition data
> from the MTD devices ... which is inappropriate, they don't
> use internal partition data.  And the mtdblock0 read fails,
> because of the ECC differences, producing messages ... ones
> that should never have appeared, since it shouldn't have
> been trying to read partition data.
>
> The boot is easily cleaned up by a patch to a udev rules
> file:  /etc/udev/rules.d/60-persistent-storage.rules is
> already skipping a bunch of devices, it just needs to add
> the "mtd*" devices to what should be skipped:
>
>  KERNEL="ram*|loop*|fd*|mtd*|nbd*|gnbd*|dm-*|md*", GOTO="persistent_storage_end"
>
> It'd be good to see this bug fixed before lenny goes final...

Udev, by default, investigates all block devices which are created by
the kernel. People use label/uuid and other metadata based stuff, so
we should look at them. We can not know in advance which device will
not respond properly. I have requests where people ask for more
persistent link support for mtd devices, while disabling them would
really not make them happier. :)

I don't see how userspace could work around this, and guess the kernel
should stop printing errors for stuff it has announced to userspace,
but is not usable when we look at it.

Would it help, if we make it easier to disable these rules for
specific devices from a custom udev rule?

Thanks,
Kay

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Fwd: udev problem (and fix) for /dev/mtdblock*
@ 2009-03-18 19:44 David Brownell
  0 siblings, 0 replies; 11+ messages in thread
From: David Brownell @ 2009-03-18 19:44 UTC (permalink / raw)
  To: linux-hotplug

Marco suggested this goes "the upstream list" but didn't
forward it or say what that list is... udev still goes
to the hotplug list?


----------  Forwarded Message  ----------

Subject: udev problem (and fix) for lenny/armel
Date: Thursday 20 November 2008
From: David Brownell <david-b@pacbell.net>
To: md@linux.it

Hi,

I have a machine running Debian and it's been getting nasty
boot messages like:

  ...
  Synthesizing the initial hotplug events...done.
  Waiting for /dev to be fully populated...uncorrectable error : <3>end_request: I/O error, dev mtdblock0, sector 0
  Buffer I/O error on device mtdblock0, logical block 0
  uncorrectable error : <3>end_request: I/O error, dev mtdblock0, sector 8
  Buffer I/O error on device mtdblock0, logical block 1
  end_request: I/O error, dev mtdblock0, sector 16
  Buffer I/O error on device mtdblock0, logical block 2
  end_request: I/O error, dev mtdblock0, sector 24 
  Buffer I/O error on device mtdblock0, logical block 3
  uncorrectable error : <3>end_request: I/O error, dev mtdblock0, sector 0
  Buffer I/O error on device mtdblock0, logical block 0
  done.
  Setting parameters of disc: (none).
  ...

Where /dev/mtdblock0 is something of a special NAND partition,
used by the mask ROM on the ARM to get a second stage loader,
which is then loaded from /dev/mtdblock1 etc.  The messages
about "uncorrectable error" are from the kernel, since that
first partition uses a different ECC scheme than the rest of
the flash.

What's happening is that it's trying to read partition data
from the MTD devices ... which is inappropriate, they don't
use internal partition data.  And the mtdblock0 read fails,
because of the ECC differences, producing messages ... ones
that should never have appeared, since it shouldn't have
been trying to read partition data.

The boot is easily cleaned up by a patch to a udev rules
file:  /etc/udev/rules.d/60-persistent-storage.rules is
already skipping a bunch of devices, it just needs to add
the "mtd*" devices to what should be skipped:

  KERNEL="ram*|loop*|fd*|mtd*|nbd*|gnbd*|dm-*|md*", GOTO="persistent_storage_end"

It'd be good to see this bug fixed before lenny goes final...

- Dave

-------------------------------------------------------

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-03-24 21:14 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-19  1:45 udev problem (and fix) for /dev/mtdblock* Kay Sievers
2009-03-19 10:08 ` Scott James Remnant
2009-03-20 18:46 ` David Brownell
2009-03-22 15:39 ` Kay Sievers
2009-03-23 18:49 ` David Brownell
2009-03-23 20:17 ` Kay Sievers
2009-03-24 21:14   ` David Brownell
2009-03-23 20:39 ` David Brownell
2009-03-23 21:21 ` Kay Sievers
2009-03-23 22:23 ` David Brownell
  -- strict thread matches above, loose matches on Subject: below --
2009-03-18 19:44 Fwd: " David Brownell

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).