ADFlib icon indicating copy to clipboard operation
ADFlib copied to clipboard

Reading files with incorrect checksums on (data) blocks

Open t-w opened this issue 1 year ago • 3 comments

Currently, the file read operation (adfFileRead) stops reading the file in case of an incorrect block checksum. And there is no indication for the client code about the error - reading just stops.

Such situation was already encountered on several ADF images, so it seems there can be more cases like this, and it is troublesome that the files cannot be read "just" because of the incorrect checksum (having in fact correct contents).

So - there is a need to have a mechanism that:

  • will allow to check the status of the last I/O operation (something like errno)
  • will allow to decide whether reading should be completed (or not) despite of the checksum errors

Both things can be done either on the level of volume (mount) or file (open), eventually set with some additional function.

t-w avatar Jul 07 '23 10:07 t-w

Could be an option to consider read errors as warning or error, the latest breaking operations. Could be 'ignore read errors ' not enabled by default

lclevy avatar Dec 21 '23 12:12 lclevy

I have added ignoreChecksumErrors option to adfEnv structure. It controls whether operations fail on checksum errors or not. It is false by default (checksum errors will cause operations to fail).

t-w avatar Mar 19 '24 01:03 t-w

👍

lclevy avatar Mar 19 '24 07:03 lclevy