• Filipe Manana's avatar
    Btrfs: pin log earlier when renaming · c4aba954
    Filipe Manana authored
    We were pinning the log right after the first step in the rename operation
    (inserting inode ref for the new name in the destination directory)
    instead of doing it before. This behaviour was introduced in 2009 for some
    reason that was not mentioned neither on the changelog nor any comment,
    with the drawback of a small time window where concurrent log writers can
    end up logging the new inode reference for the inode we are renaming while
    the rename operation is in progress (so that we can end up with a log
    containing both the new and old references). As of today there's no reason
    to not pin the log before that first step anymore, so just fix this.
    Signed-off-by: default avatarFilipe Manana <fdmanana@suse.com>
    c4aba954
inode.c 273 KB