From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Andries E. Brouwer" <Andries.Brouwer@cwi.nl>
Cc: Alan Stern <stern@rowland.harvard.edu>,
Kay Sievers <kay.sievers@vrfy.org>,
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>,
Kernel development list <linux-kernel@vger.kernel.org>,
USB list <linux-usb@vger.kernel.org>, Tejun Heo <tj@kernel.org>
Subject: Re: 2.a.30-rc7: fat filesystem misdetected as amiga
Date: Tue, 26 May 2009 09:22:35 +0300 [thread overview]
Message-ID: <20090526062235.GG6856@redhat.com> (raw)
In-Reply-To: <20090525223120.GC11648@ub>
On Tue, May 26, 2009 at 12:31:20AM +0200, Andries E. Brouwer wrote:
> On Tue, May 26, 2009 at 12:47:55AM +0300, Michael S. Tsirkin wrote:
> > On Mon, May 25, 2009 at 05:08:12PM -0400, Alan Stern wrote:
> >> On Mon, 25 May 2009, Michael S. Tsirkin wrote:
> >>
> >>>> So apparently this is a bug in the device; it doesn't respond correctly
> >>>> to the first READ command. But since it does respond correctly to
> >>>> later commands, everything works okay thereafter. You ought to be able
> >>>> to recover from the error by running
> >>>>
> >>>> blockdev --rereadpt /dev/sdb
> >>>>
> >>>> manually.
> >>>
> >>> Yes, this helps.
> >>> Would it make sense for kernel to retry automatically?
> >>> Why doesn't it?
> >>
> >> I don't know the details in this case. Most likely the error code
> >> (Logical Block Address Out of Range) is interpreted as a fatal
> >> non-retryable error. For other sorts of errors, the kernel does retry.
> >>
> >>>> As far as I can tell, this has nothing to do with any user programs in
> >>>> the distribution. It appears to be entirely the device's fault.
> >>>>
> >>>> Alan Stern
> >>>
> >>> BTW, any idea how come I later get errors apparently from amiga fs?
> >>
> >> Not a clue. Unless it was some odd side effect of the partition code
> >> trying to interpret an uninitialized buffer.
> >>
> >> Alan Stern
>
> Comments:
>
> The partition reading code tries one by one all partition types that
> you have configured. If amigafs is one of these, also that will be tried.
>
> I can imagine that your device is a slow starter and needs some time
> to initialize itself, so that the first, or the first few, commands fail,
> and after that all is well.
>
> I hate retrying code. Such code is the reason that boot time increases
> all the time. Usually a read failure is missing media or so, and retrying
> is totally meaningless. Only at the lowest level should a retry be done,
> and preferably not blindly "let us try a few times" but only when there
> is a positive reason to expect that a second time might fare better.
Yea. But I don't know where that is.
I noted that if I stick a loop around check_partition
I just get the error reported each time.
> (Amiga is not usually the first or second to be tried, so if it fails
> then either the first few reads fail, or the first read failure is cached.)
Maybe it shouldn't printk stuff on IO failure when probing for
partitions then.
> Andries
>
>
> > So, the following works for me as a work-around. But it's probably not
> > the appropriate way to solve the problem. Or is it? Can someone who
> > understands partitions and filesystems tell?
> >
> >
> >
> > block: retry on I/O error when reading partition table
> >
> > Retry once on an I/O error when reading the partition table:
> > there's no much to loose, and this helps with some disk on
> > key devices I have.
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
--
MST
next prev parent reply other threads:[~2009-05-26 6:24 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-25 12:57 2.a.30-rc7: fat filesystem misdetected as amiga Michael S. Tsirkin
2009-05-25 14:00 ` OGAWA Hirofumi
2009-05-25 15:32 ` Alan Stern
2009-05-25 18:48 ` Michael S. Tsirkin
2009-05-25 19:32 ` Kay Sievers
2009-05-25 19:50 ` Michael S. Tsirkin
2009-05-25 20:00 ` Kay Sievers
2009-05-25 20:25 ` Michael S. Tsirkin
2009-05-25 20:37 ` Alan Stern
2009-05-25 20:41 ` Kay Sievers
2009-05-25 20:54 ` Michael S. Tsirkin
2009-05-25 20:53 ` Michael S. Tsirkin
2009-05-25 21:08 ` Alan Stern
2009-05-25 21:23 ` Michael S. Tsirkin
2009-05-26 14:04 ` Alan Stern
2009-05-26 16:03 ` Michael S. Tsirkin
2009-05-26 16:07 ` Michael S. Tsirkin
2009-05-26 16:51 ` Alan Stern
2009-05-26 16:52 ` Michael S. Tsirkin
2009-05-25 21:47 ` Michael S. Tsirkin
2009-05-25 22:31 ` Andries E. Brouwer
2009-05-25 23:05 ` Kay Sievers
2009-05-26 2:26 ` Ming Lei
2009-05-26 6:17 ` Michael S. Tsirkin
2009-05-26 6:22 ` Michael S. Tsirkin [this message]
2009-05-25 23:17 ` Oliver Neukum
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=20090526062235.GG6856@redhat.com \
--to=mst@redhat.com \
--cc=Andries.Brouwer@cwi.nl \
--cc=hirofumi@mail.parknet.co.jp \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=tj@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