You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@gkostka We've encountered a severe issue when integrating lwext4 in our system. Historical journal transcations have bee wrongly replayed in certain scenarios.
After some investigation and debugging, we found that the root cause is journal log does not specify where the end transcation is.
Consider this scenario
we create and manipulate some files, JBD transcations have been created, e.g., 64 in the journal log.
reboot the system, so the journal sb will point its start to 0 and will overwrite historic ones.
delete one of created files and shut down power
fsck will scan and replay journals to fix partition issues. And falsely, the deleted files are recovered in the replay (e.g., 64 transcations have been replayed).
In this case, journal transcation iteration will be like, new + new + old + old. By accident, we managed to create new journal transactions just to overwrite old transctions so SCAN process will continue iterating old transcations and replay them later.
Our current fix solution is simple, break the journal transcation chain. In "jbd_trans_write_commit_block", just before "write commit block", we will reset the next block which will "descriptor block" for next transaction like this
So by this way, we can make sure replay will never touch historic transcations as they are been marked as "invalid". Even in case of power shutdown, as commit block is always after cleanup of next transcation. We don't know if it is the best way to solve the problem and I am sorry we cannot push our fixes to your repo due to permission deny.
If there is a better official solution for that, that will be perfect! Many thanks in advance!
The text was updated successfully, but these errors were encountered:
@gkostka We've encountered a severe issue when integrating lwext4 in our system. Historical journal transcations have bee wrongly replayed in certain scenarios.
After some investigation and debugging, we found that the root cause is journal log does not specify where the end transcation is.
Consider this scenario
In this case, journal transcation iteration will be like, new + new + old + old. By accident, we managed to create new journal transactions just to overwrite old transctions so SCAN process will continue iterating old transcations and replay them later.
Our current fix solution is simple, break the journal transcation chain. In "jbd_trans_write_commit_block", just before "write commit block", we will reset the next block which will "descriptor block" for next transaction like this
So by this way, we can make sure replay will never touch historic transcations as they are been marked as "invalid". Even in case of power shutdown, as commit block is always after cleanup of next transcation. We don't know if it is the best way to solve the problem and I am sorry we cannot push our fixes to your repo due to permission deny.
If there is a better official solution for that, that will be perfect! Many thanks in advance!
The text was updated successfully, but these errors were encountered: