From: Andries Brouwer <Andries.Brouwer@cwi.nl>
To: Jonathan Schleifer <js@h3c.de>
Cc: Andries.Brouwer@cwi.nl, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Ignore partition table on device
Date: Sun, 3 Jun 2007 00:54:54 +0200 [thread overview]
Message-ID: <20070602225454.GA24367@apps.cwi.nl> (raw)
In-Reply-To: <20070602205513.0312ebe0@localhost>
On Sat, Jun 02, 2007 at 08:55:13PM +0200, Jonathan Schleifer wrote:
> This patch adds a new kernel parameter (ignore_partitions=device) to
> the kernel. It is useful when using a fake RAID with dmraid so that
> Linux won't complain about attemps to access the drive beyond its
> boundaries when udev and/or hald are started.
>
> +static char * __initdata ignore_dev;
> + if (ignore_dev != NULL && !strcmp(state->name, ignore_dev)) {
I agree that the current behaviour of touching all devices seen
at boot time is rather undesirable. It adds twenty seconds to the
boot time of my machine, where Linux tries to read nonexisting media
in the on-board usb storage devices, starting error-recovery when that
fails, etc. (These days it also seems that even when no errors occur
everything is done twice - maybe a libata bug, I have not looked,
attached a dmesg fragment.) And the unasked-for guessing has caused
a thin trickle of problems for over ten years.
But this patch is not really an improvement.
It allows you to tell about a single device that the kernel should
not try to find a partition table there, because even if it finds
something that resembles a partition table, it would be mistaken.
The general case is that one wants to say the same thing about
several devices - if you ask me, about all devices, except possibly
for an explicitly specified boot device.
It should be userspace that directs the kernel to probe a device.
It should be udev or some such program that tells the kernel to
look for a partition table on a newly found device. Perhaps even
for a partition table of known type. Or maybe userspace does the
looking itself, using partx or so - sometimes userspace knows better
what to expect.
Maybe there already is such an option in the vanilla kernel,
but if there isnt't it should be added: noautoreadpt.
Andries
"done twice":
[ 26.505536] SCSI device sda: 625142448 512-byte hdwr sectors (320073 MB)
[ 26.505584] sda: Write Protect is off
[ 26.505616] sda: Mode Sense: 00 3a 00 00
[ 26.505630] SCSI device sda: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 26.505713] SCSI device sda: 625142448 512-byte hdwr sectors (320073 MB)
[ 26.505755] sda: Write Protect is off
[ 26.505787] sda: Mode Sense: 00 3a 00 00
[ 26.505801] SCSI device sda: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 26.505844] sda: sda1 sda2 < sda5 >
[ 26.535025] sd 0:0:0:0: Attached scsi disk sda
"done twice":
[ 25.839447] scsi6 : SCSI emulation for USB Mass Storage devices
[ 30.844107] sd 6:0:0:0: Attached scsi removable disk sdb
[ 42.519502] sdb : READ CAPACITY failed.
[ 42.770997] scsi7 : SCSI emulation for USB Mass Storage devices
[ 48.024083] sd 7:0:0:0: Attached scsi removable disk sdb
[ 49.326683] sdb : READ CAPACITY failed.
[ 49.331174] scsi 7:0:0:0: rejecting I/O to dead device
There is nothing wrong with sdb (and sdc, sdd, sde).
They are just USB card readers without media.
This is an Ubuntu 2.6.20 kernel.
next prev parent reply other threads:[~2007-06-02 22:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-02 18:55 [PATCH] Ignore partition table on device Jonathan Schleifer
2007-06-02 20:29 ` H. Peter Anvin
2007-06-02 21:34 ` Jonathan Schleifer
2007-06-02 22:21 ` H. Peter Anvin
2007-06-02 22:43 ` Jonathan Schleifer
2007-06-02 23:49 ` H. Peter Anvin
2007-06-02 22:54 ` Andries Brouwer [this message]
[not found] <fa.4wKuD5mNHMp1umbfR+OImkVtgUw@ifi.uio.no>
[not found] ` <fa.vZzvuMSQgFqVdMg4HFBBvE7gt1s@ifi.uio.no>
2007-06-03 6:39 ` Robert Hancock
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=20070602225454.GA24367@apps.cwi.nl \
--to=andries.brouwer@cwi.nl \
--cc=js@h3c.de \
--cc=linux-kernel@vger.kernel.org \
/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