Commit fb693d2d authored by Dave Kleikamp's avatar Dave Kleikamp

JFS: resize fixes

  
Bmap control page was not always being updated.
Superblock's s_size field was incorrectly set on big-endian hardware.
parent be7b33d2
/* /*
* Copyright (c) International Business Machines Corp., 2000-2002 * Copyright (c) International Business Machines Corp., 2000-2003
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -348,7 +348,7 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize) ...@@ -348,7 +348,7 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize)
/* need to grow map file ? */ /* need to grow map file ? */
if (nPages == newNpages) if (nPages == newNpages)
goto updateImap; goto finalizeBmap;
/* /*
* grow bmap file for the new map pages required: * grow bmap file for the new map pages required:
...@@ -414,6 +414,7 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize) ...@@ -414,6 +414,7 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize)
if (XSize) if (XSize)
goto extendBmap; goto extendBmap;
finalizeBmap:
/* finalize bmap */ /* finalize bmap */
dbFinalizeBmap(ipbmap); dbFinalizeBmap(ipbmap);
...@@ -427,7 +428,6 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize) ...@@ -427,7 +428,6 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize)
* (computation of ag number from agstart based on agsize * (computation of ag number from agstart based on agsize
* will correctly identify the new ag); * will correctly identify the new ag);
*/ */
updateImap:
/* if new AG size the same as old AG size, done! */ /* if new AG size the same as old AG size, done! */
if (bmp->db_agsize != old_agsize) { if (bmp->db_agsize != old_agsize) {
if ((rc = diExtendFS(ipimap, ipbmap))) if ((rc = diExtendFS(ipimap, ipbmap)))
...@@ -485,8 +485,8 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize) ...@@ -485,8 +485,8 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize)
/* mark extendfs() completion */ /* mark extendfs() completion */
j_sb->s_state &= cpu_to_le32(~FM_EXTENDFS); j_sb->s_state &= cpu_to_le32(~FM_EXTENDFS);
j_sb->s_size = cpu_to_le64(bmp->db_mapsize) << j_sb->s_size = cpu_to_le64(bmp->db_mapsize <<
le16_to_cpu(j_sb->s_l2bfactor); le16_to_cpu(j_sb->s_l2bfactor));
j_sb->s_agsize = cpu_to_le32(bmp->db_agsize); j_sb->s_agsize = cpu_to_le32(bmp->db_agsize);
/* update inline log space descriptor */ /* update inline log space descriptor */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment