[PATCH] Btrfs: fix race in run_clustered refs

2012-08-08 Thread Arne Jansen
run_clustered_refs runs all delayed refs for one head one by one. During the runs, the delayed_refs-lock is released. In this window, the ref_mod from the head does not match the sum of all refs below the head. When btrfs_lookup_extent_info is run in this window, it gives inconsistent results. The

Re: [PATCH] Btrfs: fix race in run_clustered refs

2012-08-08 Thread Josef Bacik
On Wed, Aug 08, 2012 at 01:49:06PM -0600, Arne Jansen wrote: run_clustered_refs runs all delayed refs for one head one by one. During the runs, the delayed_refs-lock is released. In this window, the ref_mod from the head does not match the sum of all refs below the head. When

Re: [PATCH] Btrfs: fix race in run_clustered refs

2012-08-08 Thread Mitch Harder
On Wed, Aug 8, 2012 at 3:37 PM, Josef Bacik jba...@fusionio.com wrote: On Wed, Aug 08, 2012 at 01:49:06PM -0600, Arne Jansen wrote: run_clustered_refs runs all delayed refs for one head one by one. During the runs, the delayed_refs-lock is released. In this window, the ref_mod from the head