Re: [RFC PATCH 5/5] Btrfs: fix broken free space cache after the system crashed

2014-06-10 Thread Alin Dobre
On 19/05/14 02:33, Chris Mason wrote: I had this one in the integration branch, but lockdep reported troubles. It looks like lockdep is correct. find_free_extent is nesting the cache rwsem inside the groups rwsem, but btrfs_write_out_cache is holding the new cache rwsem when it calls

Re: [RFC PATCH 5/5] Btrfs: fix broken free space cache after the system crashed

2014-05-18 Thread Chris Mason
On 01/15/2014 07:00 AM, Miao Xie wrote: When we mounted the filesystem after the crash, we got the following message: BTRFS error (device xxx): block group 4315938816 has wrong amount of free space BTRFS error (device xxx): failed to load free space cache for block group 4315938816

Re: [RFC PATCH 5/5] Btrfs: fix broken free space cache after the system crashed

2014-03-26 Thread mi...@cn.fujitsu.com
Hi Chris, Josef This patch is an important bug fix patch, could you merge it into your tree? Thanks Miao On wed, 15 Jan 2014 20:00:58 +0800, Miao Xie wrote: When we mounted the filesystem after the crash, we got the following message: BTRFS error (device xxx): block group 4315938816

Re: [RFC PATCH 5/5] Btrfs: fix broken free space cache after the system crashed

2014-03-08 Thread Alex Lyakas
Thanks, Miao, so the problem is that cow_file_range() joins transaction, allocates space through btrfs_reserve_extent(), then detaches from transaction. And then btrfs_finish_ordered_io() joins transaction again, adds a delayed ref and detaches from transaction. So if between these two, the

Re: [RFC PATCH 5/5] Btrfs: fix broken free space cache after the system crashed

2014-03-05 Thread Josef Bacik
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/05/2014 02:02 AM, Miao Xie wrote: On Tue, 4 Mar 2014 10:19:20 -0500, Josef Bacik wrote: On 01/15/2014 07:00 AM, Miao Xie wrote: When we mounted the filesystem after the crash, we got the following message: BTRFS error (device xxx): block

Re: [RFC PATCH 5/5] Btrfs: fix broken free space cache after the system crashed

2014-03-04 Thread Josef Bacik
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/15/2014 07:00 AM, Miao Xie wrote: When we mounted the filesystem after the crash, we got the following message: BTRFS error (device xxx): block group 4315938816 has wrong amount of free space BTRFS error (device xxx): failed to load free

Re: [RFC PATCH 5/5] Btrfs: fix broken free space cache after the system crashed

2014-03-03 Thread Miao Xie
On sat, 1 Mar 2014 20:05:01 +0200, Alex Lyakas wrote: Hi Miao, On Wed, Jan 15, 2014 at 2:00 PM, Miao Xie mi...@cn.fujitsu.com wrote: When we mounted the filesystem after the crash, we got the following message: BTRFS error (device xxx): block group 4315938816 has wrong amount of free

Re: [RFC PATCH 5/5] Btrfs: fix broken free space cache after the system crashed

2014-03-01 Thread Alex Lyakas
Hi Miao, On Wed, Jan 15, 2014 at 2:00 PM, Miao Xie mi...@cn.fujitsu.com wrote: When we mounted the filesystem after the crash, we got the following message: BTRFS error (device xxx): block group 4315938816 has wrong amount of free space BTRFS error (device xxx): failed to load free

[RFC PATCH 5/5] Btrfs: fix broken free space cache after the system crashed

2014-01-15 Thread Miao Xie
When we mounted the filesystem after the crash, we got the following message: BTRFS error (device xxx): block group 4315938816 has wrong amount of free space BTRFS error (device xxx): failed to load free space cache for block group 4315938816 It is because we didn't update the metadata of

Re: [RFC PATCH 5/5] Btrfs: fix broken free space cache after the system crashed

2014-01-15 Thread Liu Bo
On Wed, Jan 15, 2014 at 08:00:58PM +0800, Miao Xie wrote: When we mounted the filesystem after the crash, we got the following message: BTRFS error (device xxx): block group 4315938816 has wrong amount of free space BTRFS error (device xxx): failed to load free space cache for block