[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081021123348.GB15685@mit.edu>
Date: Tue, 21 Oct 2008 08:33:48 -0400
From: Theodore Tso <tytso@....edu>
To: Rogério Brito <rbrito@....usp.br>
Cc: Alexandre Lymberopoulos <lymber@...il.com>, 502583@...s.debian.org,
502583-submitter@...s.debian.org, linux-kernel@...r.kernel.org
Subject: Re: Bug#502583: scary messages in dmesg
On Tue, Oct 21, 2008 at 08:15:10AM -0200, Rogério Brito wrote:
> On Oct 20 2008, Alexandre Lymberopoulos wrote:
> > It's not a memory stick, it's a hard disk with ext3 file system. I
> > just plugged it it and the disk was automatically mounted in /dev/ext3
> > with no abnormal messages in dmesg.
>
> Ok, this far.
>
> > That weird messages appeared when I unpplugged the disk (without
> > umounting it, as it should be done when using usbmount, right?).
>
> Did you sync the device? From the message, it seems that some data were to
> be written to the device, but the device was already gone by that time, but
> I'm not a specialist on the filesystem subsystem and perhaps others could
> say more about it.
A patch to suppress the WARN information will be in 2.6.28 when the
user does something stupid (i.e., yank out a USB stick without
unmounting the filesystem first). This was done mainly to suppress
the "scary message" in dmesg, which on distributions that support
uploading such messages to http://www.kerneloops.org for analysis, was
cluttering the reports.
However, the patch does not make it any *safer* to uncerimoniously
yank out a USB stick without unmounting it first. This can still lead
to data loss, unless you're *sure* that no process is writing to the
stick and you issued the sync command, and you know enough time has
passed so all of the data has been written to the USB stick.
> > > [39071.160167] Buffer I/O error on device sda1, logical block 1545
> > > [39071.160170] lost page write due to I/O error on sda1
> > > [39071.160184] Buffer I/O error on device sda1, logical block 1545
> > > [39071.160187] lost page write due to I/O error on sda1
These errors you'd still get, since these messages are the sound of
users' data being irretrivably being lost.
> Well, it is a bug. It just needs more investigation to see where the bug
> lies.
I don't know if you would call it a bug or not. Fundamentally,
yanking out a USB stick without unmounting it first is dangerous, and
can lead to data loss. Printing the stack trace when this happens
implies it's a problem which can be fixed by a developer, so perhaps
that could be considered a bug, and in any case, that should be
"fixed" in 2.6.28. (I'm pretty sure akpm has sent the ext3 version of
that patch to Linus by now, but if not, it should make the 2.6.28
merge window.)
If you see "lost page write due to I/O error", then you will have lost
data due to premature removal of the USB stick, and fundamentally
*that* bug exists between the keyboard and the chair.
Regards,
- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists