aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3/super.c
diff options
context:
space:
mode:
authorMingming Cao <cmm@us.ibm.com>2006-06-25 08:48:07 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-25 13:01:10 -0400
commit43d23f9039fc810ecd621f1e4f9d578eadce058a (patch)
treebe241eb5a8e6010f1f8ca9e960bc9838b70d6779 /fs/ext3/super.c
parent1c2bf374a4b8c2e1a3e6ff3a64fb67272a8cd2e2 (diff)
[PATCH] ext3_fsblk_t: the rest of in-kernel filesystem blocks conversion
Convert the ext3 in-kernel filesystem blocks to ext3_fsblk_t. Convert the rest of all unsigned long type in-kernel filesystem blocks to ext3_fsblk_t, and replace the printk format string respondingly. Signed-off-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ext3/super.c')
-rw-r--r--fs/ext3/super.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index 94113500fc55..b2891cc29db1 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -689,14 +689,15 @@ static match_table_t tokens = {
689 {Opt_resize, "resize"}, 689 {Opt_resize, "resize"},
690}; 690};
691 691
692static unsigned long get_sb_block(void **data) 692static ext3_fsblk_t get_sb_block(void **data)
693{ 693{
694 unsigned long sb_block; 694 ext3_fsblk_t sb_block;
695 char *options = (char *) *data; 695 char *options = (char *) *data;
696 696
697 if (!options || strncmp(options, "sb=", 3) != 0) 697 if (!options || strncmp(options, "sb=", 3) != 0)
698 return 1; /* Default location */ 698 return 1; /* Default location */
699 options += 3; 699 options += 3;
700 /*todo: use simple_strtoll with >32bit ext3 */
700 sb_block = simple_strtoul(options, &options, 0); 701 sb_block = simple_strtoul(options, &options, 0);
701 if (*options && *options != ',') { 702 if (*options && *options != ',') {
702 printk("EXT3-fs: Invalid sb specification: %s\n", 703 printk("EXT3-fs: Invalid sb specification: %s\n",
@@ -711,7 +712,7 @@ static unsigned long get_sb_block(void **data)
711 712
712static int parse_options (char *options, struct super_block *sb, 713static int parse_options (char *options, struct super_block *sb,
713 unsigned long *inum, unsigned long *journal_devnum, 714 unsigned long *inum, unsigned long *journal_devnum,
714 unsigned long *n_blocks_count, int is_remount) 715 ext3_fsblk_t *n_blocks_count, int is_remount)
715{ 716{
716 struct ext3_sb_info *sbi = EXT3_SB(sb); 717 struct ext3_sb_info *sbi = EXT3_SB(sb);
717 char * p; 718 char * p;
@@ -1128,7 +1129,7 @@ static int ext3_setup_super(struct super_block *sb, struct ext3_super_block *es,
1128static int ext3_check_descriptors (struct super_block * sb) 1129static int ext3_check_descriptors (struct super_block * sb)
1129{ 1130{
1130 struct ext3_sb_info *sbi = EXT3_SB(sb); 1131 struct ext3_sb_info *sbi = EXT3_SB(sb);
1131 unsigned long block = le32_to_cpu(sbi->s_es->s_first_data_block); 1132 ext3_fsblk_t block = le32_to_cpu(sbi->s_es->s_first_data_block);
1132 struct ext3_group_desc * gdp = NULL; 1133 struct ext3_group_desc * gdp = NULL;
1133 int desc_block = 0; 1134 int desc_block = 0;
1134 int i; 1135 int i;
@@ -1315,15 +1316,14 @@ static loff_t ext3_max_size(int bits)
1315 return res; 1316 return res;
1316} 1317}
1317 1318
1318static unsigned long descriptor_loc(struct super_block *sb, 1319static ext3_fsblk_t descriptor_loc(struct super_block *sb,
1319 unsigned long logic_sb_block, 1320 ext3_fsblk_t logic_sb_block,
1320 int nr) 1321 int nr)
1321{ 1322{
1322 struct ext3_sb_info *sbi = EXT3_SB(sb); 1323 struct ext3_sb_info *sbi = EXT3_SB(sb);
1323 unsigned long bg, first_data_block, first_meta_bg; 1324 unsigned long bg, first_meta_bg;
1324 int has_super = 0; 1325 int has_super = 0;
1325 1326
1326 first_data_block = le32_to_cpu(sbi->s_es->s_first_data_block);
1327 first_meta_bg = le32_to_cpu(sbi->s_es->s_first_meta_bg); 1327 first_meta_bg = le32_to_cpu(sbi->s_es->s_first_meta_bg);
1328 1328
1329 if (!EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_META_BG) || 1329 if (!EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_META_BG) ||
@@ -1332,7 +1332,7 @@ static unsigned long descriptor_loc(struct super_block *sb,
1332 bg = sbi->s_desc_per_block * nr; 1332 bg = sbi->s_desc_per_block * nr;
1333 if (ext3_bg_has_super(sb, bg)) 1333 if (ext3_bg_has_super(sb, bg))
1334 has_super = 1; 1334 has_super = 1;
1335 return (first_data_block + has_super + (bg * sbi->s_blocks_per_group)); 1335 return (has_super + ext3_group_first_block_no(sb, bg));
1336} 1336}
1337 1337
1338 1338
@@ -1341,9 +1341,9 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
1341 struct buffer_head * bh; 1341 struct buffer_head * bh;
1342 struct ext3_super_block *es = NULL; 1342 struct ext3_super_block *es = NULL;
1343 struct ext3_sb_info *sbi; 1343 struct ext3_sb_info *sbi;
1344 unsigned long block; 1344 ext3_fsblk_t block;
1345 unsigned long sb_block = get_sb_block(&data); 1345 ext3_fsblk_t sb_block = get_sb_block(&data);
1346 unsigned long logic_sb_block; 1346 ext3_fsblk_t logic_sb_block;
1347 unsigned long offset = 0; 1347 unsigned long offset = 0;
1348 unsigned long journal_inum = 0; 1348 unsigned long journal_inum = 0;
1349 unsigned long journal_devnum = 0; 1349 unsigned long journal_devnum = 0;
@@ -1840,10 +1840,10 @@ static journal_t *ext3_get_dev_journal(struct super_block *sb,
1840{ 1840{
1841 struct buffer_head * bh; 1841 struct buffer_head * bh;
1842 journal_t *journal; 1842 journal_t *journal;
1843 int start; 1843 ext3_fsblk_t start;
1844 ext3_fsblk_t len; 1844 ext3_fsblk_t len;
1845 int hblock, blocksize; 1845 int hblock, blocksize;
1846 unsigned long sb_block; 1846 ext3_fsblk_t sb_block;
1847 unsigned long offset; 1847 unsigned long offset;
1848 struct ext3_super_block * es; 1848 struct ext3_super_block * es;
1849 struct block_device *bdev; 1849 struct block_device *bdev;
@@ -2216,7 +2216,7 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data)
2216{ 2216{
2217 struct ext3_super_block * es; 2217 struct ext3_super_block * es;
2218 struct ext3_sb_info *sbi = EXT3_SB(sb); 2218 struct ext3_sb_info *sbi = EXT3_SB(sb);
2219 unsigned long n_blocks_count = 0; 2219 ext3_fsblk_t n_blocks_count = 0;
2220 unsigned long old_sb_flags; 2220 unsigned long old_sb_flags;
2221 struct ext3_mount_options old_opts; 2221 struct ext3_mount_options old_opts;
2222 int err; 2222 int err;
@@ -2336,7 +2336,7 @@ static int ext3_statfs (struct dentry * dentry, struct kstatfs * buf)
2336 struct super_block *sb = dentry->d_sb; 2336 struct super_block *sb = dentry->d_sb;
2337 struct ext3_sb_info *sbi = EXT3_SB(sb); 2337 struct ext3_sb_info *sbi = EXT3_SB(sb);
2338 struct ext3_super_block *es = sbi->s_es; 2338 struct ext3_super_block *es = sbi->s_es;
2339 unsigned long overhead; 2339 ext3_fsblk_t overhead;
2340 int i; 2340 int i;
2341 2341
2342 if (test_opt (sb, MINIX_DF)) 2342 if (test_opt (sb, MINIX_DF))