From: Abhi Das Date: Wed, 18 Mar 2015 17:05:15 +0000 (-0500) Subject: gfs2: allow fallocate to max out quotas/fs efficiently X-Git-Tag: omap-for-v4.1/fixes-rc1~152^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9be0cda774e7fe36651b04a89a42e9e354e43c3;p=pandora-kernel.git gfs2: allow fallocate to max out quotas/fs efficiently We can quickly get an estimate of how many blocks are available for allocation restricted by quota and fs size respectively, using the ap->allowed field in the gfs2_alloc_parms structure. gfs2_quota_check() and gfs2_inplace_reserve() provide these values. Once we have the total number of blocks available to us, we can compute how many bytes of data can be written using those blocks instead of guessing inefficiently. Signed-off-by: Abhi Das Signed-off-by: Bob Peterson Acked-by: Steven Whitehouse --- Reading git-diff-tree failed