cluster: RHEL59 - gfs2_convert: mark buffer dirty when switching dirs from meta to data

Bob Peterson rpeterso at fedoraproject.org
Mon Jun 3 18:32:35 UTC 2013


Gitweb:        http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=e74cc1bf79a4826b70cd058a5128c8ba9d17b1a6
Commit:        e74cc1bf79a4826b70cd058a5128c8ba9d17b1a6
Parent:        d760b55214744e92dd556fc3d07326aa776ce0d8
Author:        Bob Peterson <rpeterso at redhat.com>
AuthorDate:    Mon Dec 17 14:47:50 2012 -0600
Committer:     Bob Peterson <rpeterso at redhat.com>
CommitterDate: Mon Jun 3 12:51:16 2013 -0500

gfs2_convert: mark buffer dirty when switching dirs from meta to data

This patch changes function inode_renumber so that it properly marks
the rgrp bitmap dirty after switching bits from "meta" to "data".
This happens when directory leaf, hash table, eattr, etc. blocks come
in from GFS1 as "meta" and need to be switched to GFS2 as "data".
In GFS2, only dinodes get the "meta" designation. This conversion was
taking place, but the code broke out of the loop before properly
marking the buffer as modified. So if no other modifications were
done to that bitmap, the bitmap change would be forgotten.

rhbz#887374
---
 gfs2/convert/gfs2_convert.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gfs2/convert/gfs2_convert.c b/gfs2/convert/gfs2_convert.c
index f620e12..8b57526 100644
--- a/gfs2/convert/gfs2_convert.c
+++ b/gfs2/convert/gfs2_convert.c
@@ -1060,10 +1060,10 @@ static int inode_renumber(struct gfs2_sbd *sbp, uint64_t root_inode_addr, osi_li
 							~(0x03 << (GFS2_BIT_SIZE * byte_bit));
 						rgd->bh[blk]->b_data[buf_offset + bitmap_byte] |=
 							(0x01 << (GFS2_BIT_SIZE * byte_bit));
+						bmodified(rgd->bh[blk]);
 						break;
 					}
 					bitmap_byte -= (sbp->bsize - buf_offset);
-					bmodified(rgd->bh[blk]);
 				}
 			}
 			brelse(bh);


More information about the cluster-commits mailing list