ltfs
ltfs copied to clipboard
Need to improve the recovery logic against trailing invalid index
Currently, LTFS doesn't have a good logic to recover the 2 cases below.
| index | data | (incomplete) index | eod| index | data | (incomplete) index eod
Case 1 could be generated by the cam backend when LTFS crashes in the middle of writing index. Case 2 could be generated by low level SCSI backends lile the sg backend at the same condition.
See detail in the PR #302.
The point is how to handle the (incomplete) index.
The spec doesn't clear this condition because it doesn't define any "incomplete" condition at all. In my sense, I want to keep the (incomplete) index for analysis when something bad things happen like
| index | data | (incomplete) index | eod- recover ->| index | data | (incomplete) index | index | eod| index | data | (incomplete) index eod- recover ->| index | data | (incomplete) index | index | eod(add a FM before index)