* [Cluster-devel] [Patch 34/44] libgfs2: when mapping gfs1 dinode blocks, use dinode buffer
@ 2011-08-11 21:14 Bob Peterson
0 siblings, 0 replies; only message in thread
From: Bob Peterson @ 2011-08-11 21:14 UTC (permalink / raw)
To: cluster-devel.redhat.com
From bc534f1d55b9b80b795356f7c5e3bc170bd75919 Mon Sep 17 00:00:00 2001
From: Bob Peterson <rpeterso@redhat.com>
Date: Wed, 10 Aug 2011 10:33:49 -0500
Subject: [PATCH 34/44] libgfs2: when mapping gfs1 dinode blocks, use dinode
buffer
When function gfs1_block_map found a block for a stuffed file it
wasn't returning the dinode buffer, it was returning the block as a
new buffer. The problem is, if changes are made to the block, they
will be overwritten by the dinode buffer when that is released.
The result is a fixed block that doesn't get fixed. This patch
changes the code to return the block properly like gfs2_block_map.
rhbz#675723
---
gfs2/libgfs2/gfs1.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/gfs2/libgfs2/gfs1.c b/gfs2/libgfs2/gfs1.c
index d09a8ee..5304b56 100644
--- a/gfs2/libgfs2/gfs1.c
+++ b/gfs2/libgfs2/gfs1.c
@@ -120,7 +120,10 @@ void gfs1_block_map(struct gfs2_inode *ip, uint64_t lblock, int *new,
mh.mh_format = GFS2_FORMAT_IN;
gfs2_meta_header_out(&mh, bh);
} else {
- bh = bread(sdp, *dblock);
+ if (*dblock == ip->i_di.di_num.no_addr)
+ bh = ip->i_bh;
+ else
+ bh = bread(sdp, *dblock);
}
}
--
1.7.4.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-08-11 21:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-11 21:14 [Cluster-devel] [Patch 34/44] libgfs2: when mapping gfs1 dinode blocks, use dinode buffer Bob Peterson
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).