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
_______________________________________________
Bug-ddrescue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-ddrescue