Basically, it is not quite clear what to do (or what is better to do) if adfAddInCache fails:
revert all changes, leaving filesystem unchanged
this requires reversing adfCreateEntry - it is not clear how to do it (adfRemoveEntry?)
if dir. cache is not critical and is updated later by the OS (this is to check/confirm), it might be reasonable not to fail in such case (maybe just issue a warning)
State and some notes what is still left to do.
adf_salv.c
module plus some tests inregtests/
already existedadf_salvage
command-line prototype was recently addedIn general - after some corrections, simple cases (no lost/overwritten blocks) seem to work.
There are however special cases, that may require a lot more for proper data recovery:
(these might be done later)
There are also few more error cases where it is not sure how to treat it:
adfUndelFile
in the last part of file recovery does:Basically, it is not quite clear what to do (or what is better to do) if
adfAddInCache
fails:adfCreateEntry
- it is not clear how to do it (adfRemoveEntry
?)