[PATCH] Btrfs: fix race when cleaning unused block groups

2014-11-05 Thread Filipe Manana
We have a race while deleting unused block groups that causes extents written by past generations/transactions to be rewritten by the current transaction before that transaction is committed. The steps that lead to this issue: 1) At transaction N one or more block groups became unused and we

Re: [PATCH] Btrfs: fix race when cleaning unused block groups

2014-11-05 Thread Josef Bacik
On 11/05/2014 02:56 PM, Filipe Manana wrote: We have a race while deleting unused block groups that causes extents written by past generations/transactions to be rewritten by the current transaction before that transaction is committed. The steps that lead to this issue: 1) At transaction N one

Re: [PATCH] Btrfs: fix race when cleaning unused block groups

2014-11-05 Thread Josef Bacik
On 11/05/2014 02:56 PM, Filipe Manana wrote: We have a race while deleting unused block groups that causes extents written by past generations/transactions to be rewritten by the current transaction before that transaction is committed. The steps that lead to this issue: 1) At transaction N one

Re: [PATCH] Btrfs: fix race when cleaning unused block groups

2014-11-05 Thread Filipe David Manana
On Wed, Nov 5, 2014 at 8:33 PM, Josef Bacik jba...@fb.com wrote: On 11/05/2014 02:56 PM, Filipe Manana wrote: We have a race while deleting unused block groups that causes extents written by past generations/transactions to be rewritten by the current transaction before that transaction is

Re: [PATCH] Btrfs: fix race when cleaning unused block groups

2014-11-05 Thread Josef Bacik
On 11/05/2014 04:03 PM, Filipe David Manana wrote: On Wed, Nov 5, 2014 at 8:33 PM, Josef Bacik jba...@fb.com wrote: On 11/05/2014 02:56 PM, Filipe Manana wrote: We have a race while deleting unused block groups that causes extents written by past generations/transactions to be rewritten by