Re: [PATCH] Btrfs: fix setup_leaf_for_split() to avoid leaf corruption

2015-01-22 Thread Liu Bo
On Tue, Jan 20, 2015 at 12:40:53PM +, Filipe Manana wrote: > We were incorrectly detecting when the target key didn't exist anymore > after releasing the path and re-searching the tree. This could make > us split or duplicate (btrfs_split_item() and btrfs_duplicate_item() > are its only callers

[PATCH] Btrfs: fix setup_leaf_for_split() to avoid leaf corruption

2015-01-20 Thread Filipe Manana
We were incorrectly detecting when the target key didn't exist anymore after releasing the path and re-searching the tree. This could make us split or duplicate (btrfs_split_item() and btrfs_duplicate_item() are its only callers at the moment) an item when we should not. For the case of duplicatin