aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2011-09-07 07:15:23 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2011-10-21 07:39:42 -0400
commitccad4e147acf2a59b463f5df3cee8b43b144ce82 (patch)
tree413aa2eecde02b2167829d1758de941a1244c5c6 /fs
parentb5b24d7aeb9608935786369ac2d3e9f362877d55 (diff)
GFS2: Correctly set goal block after allocation
The new goal block should be set to the end of the newly allocated extent, not the start of it. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/gfs2/rgrp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 3088fb25656d..8ec41744594b 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -1346,7 +1346,7 @@ int gfs2_alloc_block(struct gfs2_inode *ip, u64 *bn, unsigned int *n)
1346 1346
1347 rgd->rd_last_alloc = blk; 1347 rgd->rd_last_alloc = blk;
1348 block = rgd->rd_data0 + blk; 1348 block = rgd->rd_data0 + blk;
1349 ip->i_goal = block; 1349 ip->i_goal = block + *n - 1;
1350 error = gfs2_meta_inode_buffer(ip, &dibh); 1350 error = gfs2_meta_inode_buffer(ip, &dibh);
1351 if (error == 0) { 1351 if (error == 0) {
1352 struct gfs2_dinode *di = (struct gfs2_dinode *)dibh->b_data; 1352 struct gfs2_dinode *di = (struct gfs2_dinode *)dibh->b_data;