Re: [PATCH 03/14] Btrfs: always reserve metadata for delalloc extents

2016-03-25 Thread Liu Bo
On Fri, Mar 25, 2016 at 01:25:49PM -0400, Josef Bacik wrote: > There are a few races in the metadata reservation stuff. First we add the > bytes > to the block_rsv well after we've set the bit on the inode saying that we have > space for it and after we've reserved the bytes. So use the normal >

[PATCH 03/14] Btrfs: always reserve metadata for delalloc extents

2016-03-25 Thread Josef Bacik
There are a few races in the metadata reservation stuff. First we add the bytes to the block_rsv well after we've set the bit on the inode saying that we have space for it and after we've reserved the bytes. So use the normal btrfs_block_rsv_add helper for this case. Secondly we can flush delall