summaryrefslogtreecommitdiff
path: root/patricia.h
diff options
context:
space:
mode:
Diffstat (limited to 'patricia.h')
0 files changed, 0 insertions, 0 deletions
linux/net-next.git/diff/?id=376e5a57bf7f1466031a957d04bf8b8f6801ee6d&id2=86e8aa0e772caba5f0e0471d5f836b2b997dcb3e'>diff)
Btrfs: pin logs earlier when doing a rename exchange operation
The btrfs_rename_exchange() started as a copy-paste from btrfs_rename(), which had a race fixed by my previous patch titled "Btrfs: pin log earlier when renaming", and so it suffers from the same problem. We pin the logs of the affected roots after we insert the new inode references, leaving a time window where concurrent tasks logging the inodes can end up logging both the new and old references, resulting in log trees that when replayed can turn the metadata into inconsistent states. This behaviour was added to btrfs_rename() in 2009 without any explanation about why not pinning the logs earlier, just leaving a comment about the posibility for the race. As of today it's perfectly safe and sane to pin the logs before we start doing any of the steps involved in the rename operation. Signed-off-by: Filipe Manana <fdmanana@suse.com>
Diffstat