• Josef Bacik's avatar
    Btrfs: kill invalid ASSERT() in process_all_refs() · 3dc09ec8
    Josef Bacik authored
    Suppose you have the following tree in snap1 on a file system mounted with -o
    inode_cache so that inode numbers are recycled
    
    └── [    258]  a
        └── [    257]  b
    
    and then you remove b, rename a to c, and then re-create b in c so you have the
    following tree
    
    └── [    258]  c
        └── [    257]  b
    
    and then you try to do an incremental send you will hit
    
    ASSERT(pending_move == 0);
    
    in process_all_refs().  This is because we assume that any recycling of inodes
    will not have a pending change in our path, which isn't the case.  This is the
    case for the DELETE side, since we want to remove the old file using the old
    path, but on the create side we could have a pending move and need to do the
    normal pending rename dance.  So remove this ASSERT() and put a comment about
    why we ignore pending_move.  Thanks,
    Signed-off-by: default avatarJosef Bacik <jbacik@fb.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    3dc09ec8
send.c 150 KB