Btrfs: update the global reserve if it is empty
authorMiao Xie <miaox@cn.fujitsu.com>
Mon, 13 May 2013 13:55:12 +0000 (13:55 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Sat, 18 May 2013 01:40:26 +0000 (21:40 -0400)
commitd88033dbf4c23279b012725876f1e164e09644ff
tree97954bb46f3bbc62e85edd016bc25f6f9e48f89f
parent5881cfc924c8143dbc3e1f343516fc6527eb8311
Btrfs: update the global reserve if it is empty

Before applying this patch, we reserved the space for the global reserve
by the minimum unit if we found it is empty, it was unreasonable and
inefficient, because if the global reserve space was depleted, it implied
that the size of the global reserve was too small. In this case, we shoud
update the global reserve and fill it.

Cc: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/extent-tree.c