Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ext4: fix up EXT4FS_DEBUG builds

Builds with EXT4FS_DEBUG defined (to enable ext4_debug()) fail
without these changes. Clean up some format warnings too.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Mingming Cao <cmm@us.ibm.com>

authored by

Eric Sandeen and committed by
Theodore Ts'o
c549a95d aa22df2c

+12 -12
+3 -3
fs/ext4/balloc.c
··· 1630 1630 1631 1631 sbi = EXT4_SB(sb); 1632 1632 es = EXT4_SB(sb)->s_es; 1633 - ext4_debug("goal=%lu.\n", goal); 1633 + ext4_debug("goal=%llu.\n", goal); 1634 1634 /* 1635 1635 * Allocate a block from reservation only when 1636 1636 * filesystem is mounted with reservation(default,-o reservation), and ··· 1740 1740 1741 1741 allocated: 1742 1742 1743 - ext4_debug("using block group %d(%d)\n", 1743 + ext4_debug("using block group %lu(%d)\n", 1744 1744 group_no, gdp->bg_free_blocks_count); 1745 1745 1746 1746 BUFFER_TRACE(gdp_bh, "get_write_access"); ··· 1898 1898 brelse(bitmap_bh); 1899 1899 printk("ext4_count_free_blocks: stored = %llu" 1900 1900 ", computed = %llu, %llu\n", 1901 - EXT4_FREE_BLOCKS_COUNT(es), 1901 + ext4_free_blocks_count(es), 1902 1902 desc_count, bitmap_count); 1903 1903 return bitmap_count; 1904 1904 #else
+1 -1
fs/ext4/ialloc.c
··· 857 857 continue; 858 858 859 859 x = ext4_count_free(bitmap_bh, EXT4_INODES_PER_GROUP(sb) / 8); 860 - printk("group %d: stored = %d, counted = %lu\n", 860 + printk(KERN_DEBUG "group %lu: stored = %d, counted = %lu\n", 861 861 i, le16_to_cpu(gdp->bg_free_inodes_count), x); 862 862 bitmap_count += x; 863 863 }
+8 -8
fs/ext4/resize.c
··· 206 206 } 207 207 208 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 210 ext4_set_bit(0, bh->b_data); 211 211 } 212 212 ··· 215 215 i < gdblocks; i++, block++, bit++) { 216 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 220 if ((err = extend_or_restart_transaction(handle, 1, bh))) 221 221 goto exit_bh; ··· 243 243 i < reserved_gdb; i++, block++, bit++) { 244 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 248 if ((err = extend_or_restart_transaction(handle, 1, bh))) 249 249 goto exit_bh; ··· 256 256 ext4_set_bit(bit, bh->b_data); 257 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 260 input->block_bitmap - start); 261 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 263 input->inode_bitmap - start); 264 264 ext4_set_bit(input->inode_bitmap - start, bh->b_data); 265 265 ··· 268 268 i < sbi->s_itb_per_group; i++, bit++, block++) { 269 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 273 if ((err = extend_or_restart_transaction(handle, 1, bh))) 274 274 goto exit_bh; ··· 291 291 brelse(bh); 292 292 293 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 295 input->inode_bitmap, input->inode_bitmap - start); 296 296 if (IS_ERR(bh = bclean(handle, sb, input->inode_bitmap))) { 297 297 err = PTR_ERR(bh); ··· 1054 1054 ext4_journal_dirty_metadata(handle, EXT4_SB(sb)->s_sbh); 1055 1055 sb->s_dirt = 1; 1056 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 1058 o_blocks_count + add); 1059 1059 ext4_free_blocks_sb(handle, sb, o_blocks_count, add, &freed_blocks); 1060 1060 ext4_debug("freed blocks %llu through %llu\n", o_blocks_count,