Re: [PATCH] btrfs: drop logs when we've aborted a transaction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/24/20 10:59 AM, Nikolay Borisov wrote:


On 24.03.20 г. 16:47 ч., Josef Bacik wrote:
Dave reported a problem where we were panicing with generic/475 with
misc-5.7.  This is because we were doing IO after we had stopped all of

This doesn't seem correct. Before, the log tree would be freed in
btrfs_free_fs_roots which is called before btrfs_stop_all_workers and
only with transaction_kthread and cleaner_kthread stopped. I'd expect
that now btrfs_cleanup_transaction will be called from
btrfs_error_commit_super. Perhaps it's not "after we had stopped all of
the worker threads" but simply "We have stopped transaction/cleaner
kthreads" But then again I don't see how those 2 make any difference.

Could it be that this is not a full fix for the issue, and it can still
crash in case it's called from btrfs_error_commit_super ?
No, because

btrfs: move the root freeing stuff into btrfs_put_root

moved the btrfs_free_fs_root part to after the stop_all_workers(), so now we would free the log roots once _all_ of the workers stopped. This is the cause of the problem, doing IO while all of our endio threads are stopped and gone.

The fix is to make sure this gets cleaned up before we do that, which is handled by btrfs_error_commit_super(). Thanks,

Josef



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux