Thread (21 messages) 21 messages, 9 authors, 2016-10-11

Re: Why not just return an error?

From: Wols Lists <hidden>
Date: 2016-10-10 21:55:49

On 10/10/16 22:37, Andreas Klauer wrote:
On Mon, Oct 10, 2016 at 09:47:04PM +0100, Anthony Youngman wrote:
quoted
with a list of all blocks that failed to copy. Then we need to patch the 
low-level disk access code so that it reads this list of "bad blocks" 
and returns a read error if any attempt is made to read one. If a block 
hdparm has that feature to mark sectors as bad (--make-bad-sector).
not sure how that behaves on a re-write by md. I never tried it myself.
I'm guessing it's useless ...

The point is that the disk sector is not bad. So you don't want to mark
it as bad on the disk. But you know that the *data* in that block is
bad, so you want the disk access layer to fake a read error when you try
to read it. The intent is to deliberately trigger a rewrite by md.
Maybe you could also do something with device mapper. It does have 
an error target, and then there's the overlay. I wish dmsetup had 
some profiles/shortcuts/reciped to make creation of such device mapper 
tidbits easier or another common tool for those device mapper tricks...
That certainly sounds plausible ...

Cheers,
Wol
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help