Skip to contentSkip to conversation

remove superflous xfs_readsb call in xfs_mountfs

PATCH In review Christoph Hellwig 2 participants 3 messages Dec 18, 2007 – Mar 3, 2008 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remove superflous xfs_readsb call in xfs_mountfs

When xfs_mountfs is called by xfs_mount xfs_readsb was called 35 lines above unconditionally, so there is no need to try to read the superblock if it's not present. If any other port doesn't have the superblock read at this point it should just call it directly from it's xfs_mount equivalent.

fs/xfs/xfs_mount.c +0 -5
Index: linux-2.6-xfs/fs/xfs/xfs_mount.c
===================================================================
@@ -968,11 +968,6 @@ xfs_mountfs(
 	int		uuid_mounted = 0;
 	int		error = 0;
 
-	if (mp->m_sb_bp == NULL) {
-		error = xfs_readsb(mp, mfsi_flags);
-		if (error)
-			return error;
-	}
 	xfs_mount_common(mp, sbp);
 
 	/*
#1 lore raw
Quoted 5 lines · Christoph Hellwig

When xfs_mountfs is called by xfs_mount xfs_readsb was called 35 lines above unconditionally, so there is no need to try to read the superblock if it's not present. If any other port doesn't have the superblock read at this point it should just call it directly from it's xfs_mount equivalent.

Ping?

Quoted 10 lines

Index: linux-2.6-xfs/fs/xfs/xfs_mount.c
===================================================================

fs/xfs/xfs_mount.c +0 -0
@@ -968,11 +968,6 @@ xfs_mountfs(
 	int		uuid_mounted = 0;

fs/xfs/xfs_mount.c xfs_mountfs( · line 973

Quoted 10 lines
fs/xfs/xfs_mount.c +0 -5
 	int		error = 0;
 
-	if (mp->m_sb_bp == NULL) {
-		error = xfs_readsb(mp, mfsi_flags);
-		if (error)
-			return error;
-	}
 	xfs_mount_common(mp, sbp);
 
 	/*

---end quoted text---

#2 lore raw
Quoted 8 lines · Christoph Hellwig
Quoted 5 lines · Christoph Hellwig

When xfs_mountfs is called by xfs_mount xfs_readsb was called 35 lines above unconditionally, so there is no need to try to read the superblock if it's not present. If any other port doesn't have the superblock read at this point it should just call it directly from it's xfs_mount equivalent.

Ping?

Looks good, will be in shortly.

Don

Quoted 22 lines
Quoted 10 lines

Index: linux-2.6-xfs/fs/xfs/xfs_mount.c
===================================================================

fs/xfs/xfs_mount.c +0 -0
@@ -968,11 +968,6 @@ xfs_mountfs(
 	int		uuid_mounted = 0;

fs/xfs/xfs_mount.c xfs_mountfs( · line 973

Quoted 10 lines
fs/xfs/xfs_mount.c +0 -5
 	int		error = 0;
 
-	if (mp->m_sb_bp == NULL) {
-		error = xfs_readsb(mp, mfsi_flags);
-		if (error)
-			return error;
-	}
 	xfs_mount_common(mp, sbp);
 
 	/*

---end quoted text---