* [Cluster-devel] GFS2: Correctly set goal block after allocation
@ 2011-09-07 11:42 Steven Whitehouse
0 siblings, 0 replies; only message in thread
From: Steven Whitehouse @ 2011-09-07 11:42 UTC (permalink / raw)
To: cluster-devel.redhat.com
From 8b0b76a4d9dec1af3de7f443b8dc8e00ec825ad5 Mon Sep 17 00:00:00 2001
From: Steven Whitehouse <swhiteho@redhat.com>
Date: Wed, 7 Sep 2011 12:15:23 +0100
Subject: 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>
---
fs/gfs2/rgrp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 3088fb2..8ec4174 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)
rgd->rd_last_alloc = blk;
block = rgd->rd_data0 + blk;
- ip->i_goal = block;
+ ip->i_goal = block + *n - 1;
error = gfs2_meta_inode_buffer(ip, &dibh);
if (error == 0) {
struct gfs2_dinode *di = (struct gfs2_dinode *)dibh->b_data;
--
1.7.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-09-07 11:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-07 11:42 [Cluster-devel] GFS2: Correctly set goal block after allocation Steven Whitehouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).