]> 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)
commit6d2744829b30da794c024025f6f9039e153ee057
treeaf397f11a4cf07440999efb3ccac8d435346b619
parente3a3d8f42acfaa4f7a0c999b77224705e1a8ca44
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