]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
Btrfs: fix transid verify errors when recovering log tree
authorJosef Bacik <jbacik@fusionio.com>
Mon, 30 Sep 2013 18:10:43 +0000 (14:10 -0400)
committerJosef Bacik <jbacik@fusionio.com>
Fri, 4 Oct 2013 20:02:09 +0000 (16:02 -0400)
commit60e7cd3a4ba6049ef590921e84454e6cfd9e2589
treedf42ce88fd83fd9ea78a182be83e62a2b9bcd369
parent94aebfb2e7d83748d882992196cb05dd39ba1807
Btrfs: fix transid verify errors when recovering log tree

If we crash with a log, remount and recover that log, and then crash before we
can commit another transaction we will get transid verify errors on the next
mount.  This is because we were not zero'ing out the log when we committed the
transaction after recovery.  This is ok as long as we commit another transaction
at some point in the future, but if you abort or something else goes wrong you
can end up in this weird state because the recovery stuff says that the tree log
should have a generation+1 of the super generation, which won't be the case of
the transaction that was started for recovery.  Fix this by removing the check
and _always_ zero out the log portion of the super when we commit a transaction.
This fixes the transid verify issues I was seeing with my force errors tests.
Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/transaction.c