cluster: RHEL6 - gfs2_edit: Reinstate a check for system dinodes

Andrew Price andyp at fedoraproject.org
Mon Jun 9 18:42:00 UTC 2014


Gitweb:        http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=f501e3ddfbbb595e4df7fc0050ff77237c0f6b99
Commit:        f501e3ddfbbb595e4df7fc0050ff77237c0f6b99
Parent:        84b78a126085a34fc4b7bf39911431b5993bb221
Author:        Andrew Price <anprice at redhat.com>
AuthorDate:    Mon Jun 9 18:58:28 2014 +0100
Committer:     Andrew Price <anprice at redhat.com>
CommitterDate: Mon Jun 9 19:21:40 2014 +0100

gfs2_edit: Reinstate a check for system dinodes

In both RHEL6 and upstream, the commit "fsck.gfs2: can't repair rgrps
resulting from gfs_grow->gfs2_convert" added a check for GFS2_DIF_SYSTEM
dinodes before reducing the dinode metadata save height.

Later, a commit entitled "gfs2_edit savemeta doesn't save all leaf
blocks for large dirs" was pushed to both branches, only there were
differences between them which left the GFS2_DIF_SYSTEM check in place
upstream and removed from the RHEL6 branch. Thus, the previous commit to
the RHEL6 branch uncovered a bug which meant that quota change files
would be saved incomplete.

This commit adds back that check as it is required to avoid truncating
the metadata tree for quota change files. This brings the RHEL6 branch a
little closer to upstream.

Resolves: rhbz#1081523

Signed-off-by: Andrew Price <anprice at redhat.com>
---
 gfs2/edit/savemeta.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gfs2/edit/savemeta.c b/gfs2/edit/savemeta.c
index b06d164..5aa498c 100644
--- a/gfs2/edit/savemeta.c
+++ b/gfs2/edit/savemeta.c
@@ -482,8 +482,8 @@ static void save_inode_data(struct metafd *mfd)
 	    (S_ISDIR(inode->i_di.di_mode) ||
 	     (sbd.gfs1 && inode->i_di.__pad1 == GFS_FILE_DIR)))
 		height++;
-	else if (height && !block_is_systemfile() &&
-		 !S_ISDIR(inode->i_di.di_mode))
+	else if (height && !(inode->i_di.di_flags & GFS2_DIF_SYSTEM) &&
+	         !block_is_systemfile() && !S_ISDIR(inode->i_di.di_mode))
 		height--;
 	osi_list_add(&metabh->b_altlist, &metalist[0]);
         for (i = 1; i <= height; i++){


More information about the cluster-commits mailing list