btrfs-progs
btrfs-progs copied to clipboard
btrfs-progs: add rudimentary log checking
Currently the transaction log is more or less ignored by btrfs check, meaning that it's possible for a FS with a corrupt log to pass btrfs check, but be immediately corrupted by the kernel when it's mounted.
This patch adds a check that if there's an inode in the log, any pending writes also have corresponding csum entries.
Resubmission of log-checking patch
Thanks Qu. I've pushed a version with the changes made.
Looks good to me, only a minor problem related to the commit message, and I can definitely fix that at merge time:
any pending non-compressed writes also have corresponding csum entries.
There is nothing special requiring the logged write to be compressed or not, it just requires non-inline csumed writes.
Thanks Qu. Yes, that's left over from the first draft, it should have been taken out.