diff options
Diffstat (limited to 'fs/ext4/resize.c')
-rw-r--r-- | fs/ext4/resize.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index bd8a52bb3999..4fbba60816f4 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c | |||
@@ -28,7 +28,7 @@ static int verify_group_input(struct super_block *sb, | |||
28 | struct ext4_super_block *es = sbi->s_es; | 28 | struct ext4_super_block *es = sbi->s_es; |
29 | ext4_fsblk_t start = ext4_blocks_count(es); | 29 | ext4_fsblk_t start = ext4_blocks_count(es); |
30 | ext4_fsblk_t end = start + input->blocks_count; | 30 | ext4_fsblk_t end = start + input->blocks_count; |
31 | unsigned group = input->group; | 31 | ext4_group_t group = input->group; |
32 | ext4_fsblk_t itend = input->inode_table + sbi->s_itb_per_group; | 32 | ext4_fsblk_t itend = input->inode_table + sbi->s_itb_per_group; |
33 | unsigned overhead = ext4_bg_has_super(sb, group) ? | 33 | unsigned overhead = ext4_bg_has_super(sb, group) ? |
34 | (1 + ext4_bg_num_gdb(sb, group) + | 34 | (1 + ext4_bg_num_gdb(sb, group) + |
@@ -206,7 +206,7 @@ static int setup_new_group_blocks(struct super_block *sb, | |||
206 | } | 206 | } |
207 | 207 | ||
208 | if (ext4_bg_has_super(sb, input->group)) { | 208 | if (ext4_bg_has_super(sb, input->group)) { |
209 | ext4_debug("mark backup superblock %#04lx (+0)\n", start); | 209 | ext4_debug("mark backup superblock %#04llx (+0)\n", start); |
210 | ext4_set_bit(0, bh->b_data); | 210 | ext4_set_bit(0, bh->b_data); |
211 | } | 211 | } |
212 | 212 | ||
@@ -215,7 +215,7 @@ static int setup_new_group_blocks(struct super_block *sb, | |||
215 | i < gdblocks; i++, block++, bit++) { | 215 | i < gdblocks; i++, block++, bit++) { |
216 | struct buffer_head *gdb; | 216 | struct buffer_head *gdb; |
217 | 217 | ||
218 | ext4_debug("update backup group %#04lx (+%d)\n", block, bit); | 218 | ext4_debug("update backup group %#04llx (+%d)\n", block, bit); |
219 | 219 | ||
220 | if ((err = extend_or_restart_transaction(handle, 1, bh))) | 220 | if ((err = extend_or_restart_transaction(handle, 1, bh))) |
221 | goto exit_bh; | 221 | goto exit_bh; |
@@ -243,7 +243,7 @@ static int setup_new_group_blocks(struct super_block *sb, | |||
243 | i < reserved_gdb; i++, block++, bit++) { | 243 | i < reserved_gdb; i++, block++, bit++) { |
244 | struct buffer_head *gdb; | 244 | struct buffer_head *gdb; |
245 | 245 | ||
246 | ext4_debug("clear reserved block %#04lx (+%d)\n", block, bit); | 246 | ext4_debug("clear reserved block %#04llx (+%d)\n", block, bit); |
247 | 247 | ||
248 | if ((err = extend_or_restart_transaction(handle, 1, bh))) | 248 | if ((err = extend_or_restart_transaction(handle, 1, bh))) |
249 | goto exit_bh; | 249 | goto exit_bh; |
@@ -256,10 +256,10 @@ static int setup_new_group_blocks(struct super_block *sb, | |||
256 | ext4_set_bit(bit, bh->b_data); | 256 | ext4_set_bit(bit, bh->b_data); |
257 | brelse(gdb); | 257 | brelse(gdb); |
258 | } | 258 | } |
259 | ext4_debug("mark block bitmap %#04x (+%ld)\n", input->block_bitmap, | 259 | ext4_debug("mark block bitmap %#04llx (+%llu)\n", input->block_bitmap, |
260 | input->block_bitmap - start); | 260 | input->block_bitmap - start); |
261 | ext4_set_bit(input->block_bitmap - start, bh->b_data); | 261 | ext4_set_bit(input->block_bitmap - start, bh->b_data); |
262 | ext4_debug("mark inode bitmap %#04x (+%ld)\n", input->inode_bitmap, | 262 | ext4_debug("mark inode bitmap %#04llx (+%llu)\n", input->inode_bitmap, |
263 | input->inode_bitmap - start); | 263 | input->inode_bitmap - start); |
264 | ext4_set_bit(input->inode_bitmap - start, bh->b_data); | 264 | ext4_set_bit(input->inode_bitmap - start, bh->b_data); |
265 | 265 | ||
@@ -268,7 +268,7 @@ static int setup_new_group_blocks(struct super_block *sb, | |||
268 | i < sbi->s_itb_per_group; i++, bit++, block++) { | 268 | i < sbi->s_itb_per_group; i++, bit++, block++) { |
269 | struct buffer_head *it; | 269 | struct buffer_head *it; |
270 | 270 | ||
271 | ext4_debug("clear inode block %#04lx (+%d)\n", block, bit); | 271 | ext4_debug("clear inode block %#04llx (+%d)\n", block, bit); |
272 | 272 | ||
273 | if ((err = extend_or_restart_transaction(handle, 1, bh))) | 273 | if ((err = extend_or_restart_transaction(handle, 1, bh))) |
274 | goto exit_bh; | 274 | goto exit_bh; |
@@ -291,7 +291,7 @@ static int setup_new_group_blocks(struct super_block *sb, | |||
291 | brelse(bh); | 291 | brelse(bh); |
292 | 292 | ||
293 | /* Mark unused entries in inode bitmap used */ | 293 | /* Mark unused entries in inode bitmap used */ |
294 | ext4_debug("clear inode bitmap %#04x (+%ld)\n", | 294 | ext4_debug("clear inode bitmap %#04llx (+%llu)\n", |
295 | input->inode_bitmap, input->inode_bitmap - start); | 295 | input->inode_bitmap, input->inode_bitmap - start); |
296 | if (IS_ERR(bh = bclean(handle, sb, input->inode_bitmap))) { | 296 | if (IS_ERR(bh = bclean(handle, sb, input->inode_bitmap))) { |
297 | err = PTR_ERR(bh); | 297 | err = PTR_ERR(bh); |
@@ -357,7 +357,7 @@ static int verify_reserved_gdb(struct super_block *sb, | |||
357 | struct buffer_head *primary) | 357 | struct buffer_head *primary) |
358 | { | 358 | { |
359 | const ext4_fsblk_t blk = primary->b_blocknr; | 359 | const ext4_fsblk_t blk = primary->b_blocknr; |
360 | const unsigned long end = EXT4_SB(sb)->s_groups_count; | 360 | const ext4_group_t end = EXT4_SB(sb)->s_groups_count; |
361 | unsigned three = 1; | 361 | unsigned three = 1; |
362 | unsigned five = 5; | 362 | unsigned five = 5; |
363 | unsigned seven = 7; | 363 | unsigned seven = 7; |
@@ -656,12 +656,12 @@ static void update_backups(struct super_block *sb, | |||
656 | int blk_off, char *data, int size) | 656 | int blk_off, char *data, int size) |
657 | { | 657 | { |
658 | struct ext4_sb_info *sbi = EXT4_SB(sb); | 658 | struct ext4_sb_info *sbi = EXT4_SB(sb); |
659 | const unsigned long last = sbi->s_groups_count; | 659 | const ext4_group_t last = sbi->s_groups_count; |
660 | const int bpg = EXT4_BLOCKS_PER_GROUP(sb); | 660 | const int bpg = EXT4_BLOCKS_PER_GROUP(sb); |
661 | unsigned three = 1; | 661 | unsigned three = 1; |
662 | unsigned five = 5; | 662 | unsigned five = 5; |
663 | unsigned seven = 7; | 663 | unsigned seven = 7; |
664 | unsigned group; | 664 | ext4_group_t group; |
665 | int rest = sb->s_blocksize - size; | 665 | int rest = sb->s_blocksize - size; |
666 | handle_t *handle; | 666 | handle_t *handle; |
667 | int err = 0, err2; | 667 | int err = 0, err2; |
@@ -716,7 +716,7 @@ static void update_backups(struct super_block *sb, | |||
716 | exit_err: | 716 | exit_err: |
717 | if (err) { | 717 | if (err) { |
718 | ext4_warning(sb, __FUNCTION__, | 718 | ext4_warning(sb, __FUNCTION__, |
719 | "can't update backup for group %d (err %d), " | 719 | "can't update backup for group %lu (err %d), " |
720 | "forcing fsck on next reboot", group, err); | 720 | "forcing fsck on next reboot", group, err); |
721 | sbi->s_mount_state &= ~EXT4_VALID_FS; | 721 | sbi->s_mount_state &= ~EXT4_VALID_FS; |
722 | sbi->s_es->s_state &= cpu_to_le16(~EXT4_VALID_FS); | 722 | sbi->s_es->s_state &= cpu_to_le16(~EXT4_VALID_FS); |
@@ -952,7 +952,7 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es, | |||
952 | ext4_fsblk_t n_blocks_count) | 952 | ext4_fsblk_t n_blocks_count) |
953 | { | 953 | { |
954 | ext4_fsblk_t o_blocks_count; | 954 | ext4_fsblk_t o_blocks_count; |
955 | unsigned long o_groups_count; | 955 | ext4_group_t o_groups_count; |
956 | ext4_grpblk_t last; | 956 | ext4_grpblk_t last; |
957 | ext4_grpblk_t add; | 957 | ext4_grpblk_t add; |
958 | struct buffer_head * bh; | 958 | struct buffer_head * bh; |
@@ -1054,7 +1054,7 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es, | |||
1054 | ext4_journal_dirty_metadata(handle, EXT4_SB(sb)->s_sbh); | 1054 | ext4_journal_dirty_metadata(handle, EXT4_SB(sb)->s_sbh); |
1055 | sb->s_dirt = 1; | 1055 | sb->s_dirt = 1; |
1056 | unlock_super(sb); | 1056 | unlock_super(sb); |
1057 | ext4_debug("freeing blocks %lu through %llu\n", o_blocks_count, | 1057 | ext4_debug("freeing blocks %llu through %llu\n", o_blocks_count, |
1058 | o_blocks_count + add); | 1058 | o_blocks_count + add); |
1059 | ext4_free_blocks_sb(handle, sb, o_blocks_count, add, &freed_blocks); | 1059 | ext4_free_blocks_sb(handle, sb, o_blocks_count, add, &freed_blocks); |
1060 | ext4_debug("freed blocks %llu through %llu\n", o_blocks_count, | 1060 | ext4_debug("freed blocks %llu through %llu\n", o_blocks_count, |