diff options
author | Benjamin Marzinski <bmarzins@redhat.com> | 2012-03-08 13:16:32 -0600 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2012-03-09 15:29:10 +0000 |
commit | 58a7d5fb8e31279b992db4027e44b053a84b7344 (patch) | |
tree | 7ba74a4d2955e698f650308b82aef225610eeb24 /fs/gfs2/quota.c | |
parent | 34cc1781c2ae921107e89f6633cfab7436e355ba (diff) | |
download | linux-3.10-58a7d5fb8e31279b992db4027e44b053a84b7344.tar.gz linux-3.10-58a7d5fb8e31279b992db4027e44b053a84b7344.tar.bz2 linux-3.10-58a7d5fb8e31279b992db4027e44b053a84b7344.zip |
GFS2: call gfs2_write_alloc_required for each chunk
gfs2_fallocate was calling gfs2_write_alloc_required() once at the start of
the function. This caused problems since gfs2_write_alloc_required used a
long unsigned int for the len, but gfs2_fallocate could allocate a much
larger amount. This patch will move the call into the loop where the
chunks are actually allocated and zeroed out. This will keep the allocation
size under the limit, and also allow gfs2_fallocate to quickly skip over
sections of the file that are already completely allocated.
fallcate_chunk was also not correctly setting the file size. It was using the
len veriable to find the last block written to, but by the time it was setting
the size, the len variable had already been decremented to 0.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/quota.c')
0 files changed, 0 insertions, 0 deletions