]> git.karo-electronics.de Git - linux-beck.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)
commit1c1161870c8bcb0d966ebbf1aec05a87a79a4175
treeaf397f11a4cf07440999efb3ccac8d435346b619
parent43530c46cc55cf5a381e788276a93c83cbc95e46
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