Commit 01a523eb authored by Theodore Ts'o's avatar Theodore Ts'o

ext4: add debugging context for warning in ext4_da_update_reserve_space()

Print some additional debugging context to hopefully help to debug a
warning which is getting triggered by xfstests #74.

Also remove extraneous newlines from when printk's were converted to
ext4_warning() and ext4_msg().
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 8de5c325
...@@ -352,10 +352,12 @@ void ext4_da_update_reserve_space(struct inode *inode, ...@@ -352,10 +352,12 @@ void ext4_da_update_reserve_space(struct inode *inode,
} }
if (unlikely(ei->i_allocated_meta_blocks > ei->i_reserved_meta_blocks)) { if (unlikely(ei->i_allocated_meta_blocks > ei->i_reserved_meta_blocks)) {
ext4_warning(inode->i_sb, "%s: ino %lu, allocated %d " ext4_warning(inode->i_sb, "ino %lu, allocated %d "
"with only %d reserved metadata blocks\n", __func__, "with only %d reserved metadata blocks "
inode->i_ino, ei->i_allocated_meta_blocks, "(releasing %d blocks with reserved %d data blocks)",
ei->i_reserved_meta_blocks); inode->i_ino, ei->i_allocated_meta_blocks,
ei->i_reserved_meta_blocks, used,
ei->i_reserved_data_blocks);
WARN_ON(1); WARN_ON(1);
ei->i_allocated_meta_blocks = ei->i_reserved_meta_blocks; ei->i_allocated_meta_blocks = ei->i_reserved_meta_blocks;
} }
...@@ -1609,7 +1611,7 @@ static void mpage_da_map_and_submit(struct mpage_da_data *mpd) ...@@ -1609,7 +1611,7 @@ static void mpage_da_map_and_submit(struct mpage_da_data *mpd)
(unsigned long long) next, (unsigned long long) next,
mpd->b_size >> mpd->inode->i_blkbits, err); mpd->b_size >> mpd->inode->i_blkbits, err);
ext4_msg(sb, KERN_CRIT, ext4_msg(sb, KERN_CRIT,
"This should not happen!! Data will be lost\n"); "This should not happen!! Data will be lost");
if (err == -ENOSPC) if (err == -ENOSPC)
ext4_print_free_blocks(mpd->inode); ext4_print_free_blocks(mpd->inode);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment