aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jfs/jfs_imap.c
diff options
context:
space:
mode:
authorDave Kleikamp <shaggy@austin.ibm.com>2005-05-02 14:25:02 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-03 01:23:53 -0400
commit7fab479bebb96b1b4888bdae9b42e1fa9c5d3f38 (patch)
tree3d47de90cf39002e576df02f474bc17342ff0f4a /fs/jfs/jfs_imap.c
parentdc5798d9a7b656550533a5c0177dba17d4ef4990 (diff)
[PATCH] JFS: Support page sizes greater than 4K
jfs has never worked on architecutures where the page size was not 4K. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/jfs/jfs_imap.c')
-rw-r--r--fs/jfs/jfs_imap.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c
index 6a0aa7e2cbef..7acff2ce3c80 100644
--- a/fs/jfs/jfs_imap.c
+++ b/fs/jfs/jfs_imap.c
@@ -502,7 +502,7 @@ struct inode *diReadSpecial(struct super_block *sb, ino_t inum, int secondary)
502 502
503 } 503 }
504 504
505 ip->i_mapping->a_ops = &jfs_aops; 505 ip->i_mapping->a_ops = &jfs_metapage_aops;
506 mapping_set_gfp_mask(ip->i_mapping, GFP_NOFS); 506 mapping_set_gfp_mask(ip->i_mapping, GFP_NOFS);
507 507
508 /* Allocations to metadata inodes should not affect quotas */ 508 /* Allocations to metadata inodes should not affect quotas */
@@ -2791,6 +2791,7 @@ diUpdatePMap(struct inode *ipimap,
2791 u32 mask; 2791 u32 mask;
2792 struct jfs_log *log; 2792 struct jfs_log *log;
2793 int lsn, difft, diffp; 2793 int lsn, difft, diffp;
2794 unsigned long flags;
2794 2795
2795 imap = JFS_IP(ipimap)->i_imap; 2796 imap = JFS_IP(ipimap)->i_imap;
2796 /* get the iag number containing the inode */ 2797 /* get the iag number containing the inode */
@@ -2807,6 +2808,7 @@ diUpdatePMap(struct inode *ipimap,
2807 IREAD_UNLOCK(ipimap); 2808 IREAD_UNLOCK(ipimap);
2808 if (rc) 2809 if (rc)
2809 return (rc); 2810 return (rc);
2811 metapage_wait_for_io(mp);
2810 iagp = (struct iag *) mp->data; 2812 iagp = (struct iag *) mp->data;
2811 /* get the inode number and extent number of the inode within 2813 /* get the inode number and extent number of the inode within
2812 * the iag and the inode number within the extent. 2814 * the iag and the inode number within the extent.
@@ -2870,30 +2872,28 @@ diUpdatePMap(struct inode *ipimap,
2870 /* inherit older/smaller lsn */ 2872 /* inherit older/smaller lsn */
2871 logdiff(difft, lsn, log); 2873 logdiff(difft, lsn, log);
2872 logdiff(diffp, mp->lsn, log); 2874 logdiff(diffp, mp->lsn, log);
2875 LOGSYNC_LOCK(log, flags);
2873 if (difft < diffp) { 2876 if (difft < diffp) {
2874 mp->lsn = lsn; 2877 mp->lsn = lsn;
2875 /* move mp after tblock in logsync list */ 2878 /* move mp after tblock in logsync list */
2876 LOGSYNC_LOCK(log);
2877 list_move(&mp->synclist, &tblk->synclist); 2879 list_move(&mp->synclist, &tblk->synclist);
2878 LOGSYNC_UNLOCK(log);
2879 } 2880 }
2880 /* inherit younger/larger clsn */ 2881 /* inherit younger/larger clsn */
2881 LOGSYNC_LOCK(log);
2882 assert(mp->clsn); 2882 assert(mp->clsn);
2883 logdiff(difft, tblk->clsn, log); 2883 logdiff(difft, tblk->clsn, log);
2884 logdiff(diffp, mp->clsn, log); 2884 logdiff(diffp, mp->clsn, log);
2885 if (difft > diffp) 2885 if (difft > diffp)
2886 mp->clsn = tblk->clsn; 2886 mp->clsn = tblk->clsn;
2887 LOGSYNC_UNLOCK(log); 2887 LOGSYNC_UNLOCK(log, flags);
2888 } else { 2888 } else {
2889 mp->log = log; 2889 mp->log = log;
2890 mp->lsn = lsn; 2890 mp->lsn = lsn;
2891 /* insert mp after tblock in logsync list */ 2891 /* insert mp after tblock in logsync list */
2892 LOGSYNC_LOCK(log); 2892 LOGSYNC_LOCK(log, flags);
2893 log->count++; 2893 log->count++;
2894 list_add(&mp->synclist, &tblk->synclist); 2894 list_add(&mp->synclist, &tblk->synclist);
2895 mp->clsn = tblk->clsn; 2895 mp->clsn = tblk->clsn;
2896 LOGSYNC_UNLOCK(log); 2896 LOGSYNC_UNLOCK(log, flags);
2897 } 2897 }
2898 write_metapage(mp); 2898 write_metapage(mp);
2899 return (0); 2899 return (0);