Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
Linus Torvalds committed Jun 23, 2011
2 parents 68d0080 + ecc9046 commit bccaeaf
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
6 changes: 3 additions & 3 deletions fs/jfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ static int jfs_open(struct inode *inode, struct file *file)
struct jfs_inode_info *ji = JFS_IP(inode);
spin_lock_irq(&ji->ag_lock);
if (ji->active_ag == -1) {
ji->active_ag = ji->agno;
atomic_inc(
&JFS_SBI(inode->i_sb)->bmap->db_active[ji->agno]);
struct jfs_sb_info *jfs_sb = JFS_SBI(inode->i_sb);
ji->active_ag = BLKTOAG(addressPXD(&ji->ixpxd), jfs_sb);
atomic_inc( &jfs_sb->bmap->db_active[ji->active_ag]);
}
spin_unlock_irq(&ji->ag_lock);
}
Expand Down
12 changes: 5 additions & 7 deletions fs/jfs/jfs_imap.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ int diRead(struct inode *ip)
release_metapage(mp);

/* set the ag for the inode */
JFS_IP(ip)->agno = BLKTOAG(agstart, sbi);
JFS_IP(ip)->agstart = agstart;
JFS_IP(ip)->active_ag = -1;

return (rc);
Expand Down Expand Up @@ -901,7 +901,7 @@ int diFree(struct inode *ip)

/* get the allocation group for this ino.
*/
agno = JFS_IP(ip)->agno;
agno = BLKTOAG(JFS_IP(ip)->agstart, JFS_SBI(ip->i_sb));

/* Lock the AG specific inode map information
*/
Expand Down Expand Up @@ -1315,12 +1315,11 @@ int diFree(struct inode *ip)
static inline void
diInitInode(struct inode *ip, int iagno, int ino, int extno, struct iag * iagp)
{
struct jfs_sb_info *sbi = JFS_SBI(ip->i_sb);
struct jfs_inode_info *jfs_ip = JFS_IP(ip);

ip->i_ino = (iagno << L2INOSPERIAG) + ino;
jfs_ip->ixpxd = iagp->inoext[extno];
jfs_ip->agno = BLKTOAG(le64_to_cpu(iagp->agstart), sbi);
jfs_ip->agstart = le64_to_cpu(iagp->agstart);
jfs_ip->active_ag = -1;
}

Expand Down Expand Up @@ -1379,7 +1378,7 @@ int diAlloc(struct inode *pip, bool dir, struct inode *ip)
*/

/* get the ag number of this iag */
agno = JFS_IP(pip)->agno;
agno = BLKTOAG(JFS_IP(pip)->agstart, JFS_SBI(pip->i_sb));

if (atomic_read(&JFS_SBI(pip->i_sb)->bmap->db_active[agno])) {
/*
Expand Down Expand Up @@ -2921,10 +2920,9 @@ int diExtendFS(struct inode *ipimap, struct inode *ipbmap)
continue;
}

/* agstart that computes to the same ag is treated as same; */
agstart = le64_to_cpu(iagp->agstart);
/* iagp->agstart = agstart & ~(mp->db_agsize - 1); */
n = agstart >> mp->db_agl2size;
iagp->agstart = cpu_to_le64((s64)n << mp->db_agl2size);

/* compute backed inodes */
numinos = (EXTSPERIAG - le32_to_cpu(iagp->nfreeexts))
Expand Down
3 changes: 2 additions & 1 deletion fs/jfs/jfs_incore.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ struct jfs_inode_info {
short btindex; /* btpage entry index*/
struct inode *ipimap; /* inode map */
unsigned long cflag; /* commit flags */
u64 agstart; /* agstart of the containing IAG */
u16 bxflag; /* xflag of pseudo buffer? */
unchar agno; /* ag number */
unchar pad;
signed char active_ag; /* ag currently allocating from */
lid_t blid; /* lid of pseudo buffer? */
lid_t atlhead; /* anonymous tlock list head */
Expand Down
2 changes: 1 addition & 1 deletion fs/jfs/resize.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize)
int log_formatted = 0;
struct inode *iplist[1];
struct jfs_superblock *j_sb, *j_sb2;
uint old_agsize;
s64 old_agsize;
int agsizechanged = 0;
struct buffer_head *bh, *bh2;

Expand Down

0 comments on commit bccaeaf

Please sign in to comment.