]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: update free_chunk_space during allocting a new chunk
authorMiao Xie <miaox@cn.fujitsu.com>
Wed, 3 Sep 2014 13:35:37 +0000 (21:35 +0800)
committerChris Mason <clm@fb.com>
Wed, 17 Sep 2014 20:38:37 +0000 (13:38 -0700)
commitb146b7e174ce2b6139cd1e887899b2ce00ed1517
treeaf397f11a4cf07440999efb3ccac8d435346b619
parent41efdf10b52a95800b79a7c1c212bccb3f4fa7de
Btrfs: update free_chunk_space during allocting a new chunk

We should update free_chunk_space in time when we allocate a new chunk,
not when we deal with the pending device update and block group insertion,
because we need the real free_chunk_space data to calculate the reserved
space, if we don't update it in time, we would consider the disk space which
has be allocated as free space, and would use it to do overcommit reservation.
Fix it.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/volumes.c