[PATCH] Btrfs: improve replacing nocow extents V2

2013-09-13 Thread Josef Bacik
Various people have hit a deadlock when running btrfs/011. This is because when replacing nocow extents we will take the i_mutex to make sure nobody messes with the file while we are replacing the extent. The problem is we are already holding a transaction open, which is a locking inversion, so

[PATCH] Btrfs: improve replacing nocow extents

2013-09-12 Thread Josef Bacik
Various people have hit a deadlock when running btrfs/011. This is because when replacing nocow extents we will take the i_mutex to make sure nobody messes with the file while we are replacing the extent. The problem is we are already holding a transaction open, which is a locking inversion, so