Skip to contentSkip to conversation

GFS2: Remove redundant metadata block type check

PATCH New Bob Peterson 2 participants 2 messages Apr 27, 2012 – May 8, 2012 1 message not in the archive GFS2 file system

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 241b1f6d-b474-4d33-9388-f17e76763f95@zmail12.collab.prod.int.phx2.redhat.com

#1 lore raw

PATCH 1/1 GFS2: Remove redundant metadata block type check

Hi,

This patch removes a redundant metadata block check. See description below.

Regards,

Bob Peterson
Red Hat File Systems

---

Author: Bob Peterson <[email protected]>
Date:   Fri Apr 27 07:33:08 2012 -0500

GFS2: Remove redundant metadata block type check

Function gfs2_inode_refresh calls gfs2_meta_inode_buffer, which itself calls gfs2_meta_indirect_buffer with height 0. Since this path through gfs2_meta_indirect_buffer makes a call to gfs2_metatype_check, the call in gfs2_inode_refresh is redundant and just a waste of time. This patch removes it.

fs/gfs2/glops.c +0 -5
index cd3e6fb..4bdcf37 100644
@@ -378,11 +378,6 @@ int gfs2_inode_refresh(struct gfs2_inode *ip)
 	if (error)
 		return error;
 
-	if (gfs2_metatype_check(GFS2_SB(&ip->i_inode), dibh, GFS2_METATYPE_DI)) {
-		brelse(dibh);
-		return -EIO;
-	}
-
 	error = gfs2_dinode_in(ip, dibh->b_data);
 	brelse(dibh);
 	clear_bit(GIF_INVALID, &ip->i_flags);
#2 lore raw

PATCH 1/1 GFS2: Remove redundant metadata block type check

Hi,

Quoted 6 lines · Bob Peterson

Hi,

This patch removes a redundant metadata block check. See description below.

Regards,

Now pushed to the -nmw git tree. Sorry for the delay,

Steve.

Quoted 33 lines

Bob Peterson
Red Hat File Systems

---

Author: Bob Peterson <[email protected]>
Date:   Fri Apr 27 07:33:08 2012 -0500

GFS2: Remove redundant metadata block type check

Function gfs2_inode_refresh calls gfs2_meta_inode_buffer, which itself calls gfs2_meta_indirect_buffer with height 0. Since this path through gfs2_meta_indirect_buffer makes a call to gfs2_metatype_check, the call in gfs2_inode_refresh is redundant and just a waste of time. This patch removes it.

fs/gfs2/glops.c +0 -5
index cd3e6fb..4bdcf37 100644
@@ -378,11 +378,6 @@ int gfs2_inode_refresh(struct gfs2_inode *ip)
 	if (error)
 		return error;
 
-	if (gfs2_metatype_check(GFS2_SB(&ip->i_inode), dibh, GFS2_METATYPE_DI)) {
-		brelse(dibh);
-		return -EIO;
-	}
-
 	error = gfs2_dinode_in(ip, dibh->b_data);
 	brelse(dibh);
 	clear_bit(GIF_INVALID, &ip->i_flags);