aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3/super.c
diff options
context:
space:
mode:
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 94113500fc5..b2891cc29db 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))