bug-ddrescue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-ddrescue] Feature request: --direct for output file in fill mod


From: Christian Franke
Subject: Re: [Bug-ddrescue] Feature request: --direct for output file in fill mode
Date: Thu, 10 Jan 2008 21:04:18 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4

Antonio Diaz Diaz wrote:
Christian Franke wrote:
when using --fill=- to force reallocation of bad disk blocks, write behind buffering should be disabled.

Therefore, it would make sense to allow "-d, --direct" in fill mode. It should set O_DIRECT for the output file in this case.

I think buffered write is not a problem if followed by a call to fsync, as ddrescue does.

I'm not sure. The block layer might e.g. legitimately buffer blocks in larger chunks. So writing a single block might result in:

1. Read large chunk.
2. Replace block data, mark chunk as dirty.
3. Write chunk later.

Step 1 would fail in case of a bad block within the chunk.

Are you sure that this is not the case for the platforms supported by ddrescue?



OTOH, Linus hates O_DIRECT for writing http://lkml.org/lkml/2007/1/11/129 , and I suppose he knows more about it than me.


These complaints are about "normal" (e.g. database) applications bypassing kernel resource management by O_DIRECT. This is IMO unrelated to "rescue" operations in presence of bad disk blocks.

Christian





reply via email to

[Prev in Thread] Current Thread [Next in Thread]