[lkml]   [2014]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Is warn_on() right reply for i/o error?
On Thu, Jul 24, 2014 at 05:27:22PM +0200, Pavel Machek wrote:
> Hi!
> Just... I know, I should not be unscrewing hard drive cover while
> operating.
> But on the other hand... WARN_ON() does not sound like right reply for
> a disk failure... right?

Actually, it can be worse than that. If a hard drive disappears out
from under you while writeback is happening, it's possible to get
crashes in bdi_writeack_workfn() because you can have races between
bdi_unregister() and bdi_writeback_workfn(), since the latter requeues
itself and flush_delayed_work() can return while
bdi_writeback_workfn() is still executing.

This looks like it's a related problem, where the block device gets
unregistered (and this happens in the block device layer without it
telling the file system that the disk drive is about to disappear out
from under it), and occasionally, Bad Stuff Happens. :-(

- Ted

 \ /
  Last update: 2014-07-24 22:01    [W:0.048 / U:1.452 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site