lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201003041631.o24GVl51005720@alien.loup.net>
Date:	Thu, 4 Mar 2010 09:31:47 -0700
From:	Mike Hayward <hayward@...p.net>
To:	foosaa@...il.com
CC:	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	linux-ide@...r.kernel.org, jens.axboe@...cle.com,
	linux-mm@...ck.org
Subject: Re: Linux kernel - Libata bad block error handling to user mode 
	program

I have seen a couple of your posts on this and thought I'd chime in
since I know a bit about storage.

I frequently see io errors come through to user space (both read and
write requests) from usb flash drives, so there is a functioning error
path there to some degree.  When I see the errors, the kernel is also
logging the sector and eventually resetting the device.

There is no doubt a disk drive will slow down when it hits a bad spot
since it will retry numerous times, most likely trying to remap bad
blocks.  Of course your write succeeded because you probably have the
drive cache enabled.  Flush or a full cache hangs while the drive
retries all of the sectors that are bad, remapping them until finally
it can remap no more.  At some point it probably returns an error if
flush is timing out or it can't remap any more sectors, but it won't
include the bad sector.

I would suggest turning the drive cache off.  Then the drive won't lie
to you about completing writes and you'll at least know which sectors
are bad.  Just a thought :-)

- Mike
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ