]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: kill invalid ASSERT() in process_all_refs()
authorJosef Bacik <jbacik@fb.com>
Wed, 24 Aug 2016 15:57:52 +0000 (11:57 -0400)
committerDavid Sterba <dsterba@suse.com>
Thu, 1 Sep 2016 15:16:47 +0000 (17:16 +0200)
commit93402993484ceb715df921b81b1278b16823ce78
treeaf37d47db0078fb39b35982f79e2fa80a2b8b891
parentadf9575d72c911ec8fa196848c3b2fedfdc18b8f
Btrfs: kill invalid ASSERT() in process_all_refs()

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: Josef Bacik <jbacik@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/send.c