aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-06-23 00:49:07 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-06-23 00:49:07 -0400
commitbccaeafd7c117acee36e90d37c7e05c19be9e7bf (patch)
treed784e96c416ce5d2f47ecae6c0bb2a2aa8f5d1f3 /fs
parent68d0080f1e222757c85606d3eaf81b5c4aa7719f (diff)
parentecc90462b428db2ad2ee5081c45496ed10f3a633 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6: jfs: agstart field must be 64 bits JFS: Don't save agno in the inode jfs: Update agstart when resizing volume jfs: old_agsize should be 64 bits in jfs_extendfs
Diffstat (limited to 'fs')
-rw-r--r--fs/jfs/file.c6
-rw-r--r--fs/jfs/jfs_imap.c12
-rw-r--r--fs/jfs/jfs_incore.h3
-rw-r--r--fs/jfs/resize.c2
4 files changed, 11 insertions, 12 deletions
diff --git a/fs/jfs/file.c b/fs/jfs/file.c
index c5ce6c1d1ff4..2f3f531f3606 100644
--- a/fs/jfs/file.c
+++ b/fs/jfs/file.c
@@ -66,9 +66,9 @@ static int jfs_open(struct inode *inode, struct file *file)
66 struct jfs_inode_info *ji = JFS_IP(inode); 66 struct jfs_inode_info *ji = JFS_IP(inode);
67 spin_lock_irq(&ji->ag_lock); 67 spin_lock_irq(&ji->ag_lock);
68 if (ji->active_ag == -1) { 68 if (ji->active_ag == -1) {
69 ji->active_ag = ji->agno; 69 struct jfs_sb_info *jfs_sb = JFS_SBI(inode->i_sb);
70 atomic_inc( 70 ji->active_ag = BLKTOAG(addressPXD(&ji->ixpxd), jfs_sb);
71 &JFS_SBI(inode->i_sb)->bmap->db_active[ji->agno]); 71 atomic_inc( &jfs_sb->bmap->db_active[ji->active_ag]);
72 } 72 }
73 spin_unlock_irq(&ji->ag_lock); 73 spin_unlock_irq(&ji->ag_lock);
74 } 74 }
diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c
index ed53a4740168..b78b2f978f04 100644
--- a/fs/jfs/jfs_imap.c
+++ b/fs/jfs/jfs_imap.c
@@ -397,7 +397,7 @@ int diRead(struct inode *ip)
397 release_metapage(mp); 397 release_metapage(mp);
398 398
399 /* set the ag for the inode */ 399 /* set the ag for the inode */
400 JFS_IP(ip)->agno = BLKTOAG(agstart, sbi); 400 JFS_IP(ip)->agstart = agstart;
401 JFS_IP(ip)->active_ag = -1; 401 JFS_IP(ip)->active_ag = -1;
402 402
403 return (rc); 403 return (rc);
@@ -901,7 +901,7 @@ int diFree(struct inode *ip)
901 901
902 /* get the allocation group for this ino. 902 /* get the allocation group for this ino.
903 */ 903 */
904 agno = JFS_IP(ip)->agno; 904 agno = BLKTOAG(JFS_IP(ip)->agstart, JFS_SBI(ip->i_sb));
905 905
906 /* Lock the AG specific inode map information 906 /* Lock the AG specific inode map information
907 */ 907 */
@@ -1315,12 +1315,11 @@ int diFree(struct inode *ip)
1315static inline void 1315static inline void
1316diInitInode(struct inode *ip, int iagno, int ino, int extno, struct iag * iagp) 1316diInitInode(struct inode *ip, int iagno, int ino, int extno, struct iag * iagp)
1317{ 1317{
1318 struct jfs_sb_info *sbi = JFS_SBI(ip->i_sb);
1319 struct jfs_inode_info *jfs_ip = JFS_IP(ip); 1318 struct jfs_inode_info *jfs_ip = JFS_IP(ip);
1320 1319
1321 ip->i_ino = (iagno << L2INOSPERIAG) + ino; 1320 ip->i_ino = (iagno << L2INOSPERIAG) + ino;
1322 jfs_ip->ixpxd = iagp->inoext[extno]; 1321 jfs_ip->ixpxd = iagp->inoext[extno];
1323 jfs_ip->agno = BLKTOAG(le64_to_cpu(iagp->agstart), sbi); 1322 jfs_ip->agstart = le64_to_cpu(iagp->agstart);
1324 jfs_ip->active_ag = -1; 1323 jfs_ip->active_ag = -1;
1325} 1324}
1326 1325
@@ -1379,7 +1378,7 @@ int diAlloc(struct inode *pip, bool dir, struct inode *ip)
1379 */ 1378 */
1380 1379
1381 /* get the ag number of this iag */ 1380 /* get the ag number of this iag */
1382 agno = JFS_IP(pip)->agno; 1381 agno = BLKTOAG(JFS_IP(pip)->agstart, JFS_SBI(pip->i_sb));
1383 1382
1384 if (atomic_read(&JFS_SBI(pip->i_sb)->bmap->db_active[agno])) { 1383 if (atomic_read(&JFS_SBI(pip->i_sb)->bmap->db_active[agno])) {
1385 /* 1384 /*
@@ -2921,10 +2920,9 @@ int diExtendFS(struct inode *ipimap, struct inode *ipbmap)
2921 continue; 2920 continue;
2922 } 2921 }
2923 2922
2924 /* agstart that computes to the same ag is treated as same; */
2925 agstart = le64_to_cpu(iagp->agstart); 2923 agstart = le64_to_cpu(iagp->agstart);
2926 /* iagp->agstart = agstart & ~(mp->db_agsize - 1); */
2927 n = agstart >> mp->db_agl2size; 2924 n = agstart >> mp->db_agl2size;
2925 iagp->agstart = cpu_to_le64((s64)n << mp->db_agl2size);
2928 2926
2929 /* compute backed inodes */ 2927 /* compute backed inodes */
2930 numinos = (EXTSPERIAG - le32_to_cpu(iagp->nfreeexts)) 2928 numinos = (EXTSPERIAG - le32_to_cpu(iagp->nfreeexts))
diff --git a/fs/jfs/jfs_incore.h b/fs/jfs/jfs_incore.h
index 1439f119ec83..584a4a1a6e81 100644
--- a/fs/jfs/jfs_incore.h
+++ b/fs/jfs/jfs_incore.h
@@ -50,8 +50,9 @@ struct jfs_inode_info {
50 short btindex; /* btpage entry index*/ 50 short btindex; /* btpage entry index*/
51 struct inode *ipimap; /* inode map */ 51 struct inode *ipimap; /* inode map */
52 unsigned long cflag; /* commit flags */ 52 unsigned long cflag; /* commit flags */
53 u64 agstart; /* agstart of the containing IAG */
53 u16 bxflag; /* xflag of pseudo buffer? */ 54 u16 bxflag; /* xflag of pseudo buffer? */
54 unchar agno; /* ag number */ 55 unchar pad;
55 signed char active_ag; /* ag currently allocating from */ 56 signed char active_ag; /* ag currently allocating from */
56 lid_t blid; /* lid of pseudo buffer? */ 57 lid_t blid; /* lid of pseudo buffer? */
57 lid_t atlhead; /* anonymous tlock list head */ 58 lid_t atlhead; /* anonymous tlock list head */
diff --git a/fs/jfs/resize.c b/fs/jfs/resize.c
index 8ea5efb5a34e..8d0c1c7c0820 100644
--- a/fs/jfs/resize.c
+++ b/fs/jfs/resize.c
@@ -80,7 +80,7 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize)
80 int log_formatted = 0; 80 int log_formatted = 0;
81 struct inode *iplist[1]; 81 struct inode *iplist[1];
82 struct jfs_superblock *j_sb, *j_sb2; 82 struct jfs_superblock *j_sb, *j_sb2;
83 uint old_agsize; 83 s64 old_agsize;
84 int agsizechanged = 0; 84 int agsizechanged = 0;
85 struct buffer_head *bh, *bh2; 85 struct buffer_head *bh, *bh2;
86 86