diff options
author | Theodore Ts'o <tytso@mit.edu> | 2009-09-26 17:43:59 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2009-09-26 17:43:59 -0400 |
commit | 1693918e0b6988cf5eb93b7da34f30e94360a379 (patch) | |
tree | de185e86dd6456c251d4a512acd5bab7c19a3a3c /fs/ext4/inode.c | |
parent | 8365388827663bd6fb773e3623ed9023c0f82b1d (diff) |
ext4: Use ext4_msg() for ext4_da_writepage() errors
This allows the user to see what filesystem was involved with a
particular ext4_da_writepage() error. Also, use KERN_CRIT which is
more appropriate than KERN_EMERG.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r-- | fs/ext4/inode.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 064746fad581..5fb72a98ccbe 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -2092,18 +2092,18 @@ static void ext4_da_block_invalidatepages(struct mpage_da_data *mpd, | |||
2092 | static void ext4_print_free_blocks(struct inode *inode) | 2092 | static void ext4_print_free_blocks(struct inode *inode) |
2093 | { | 2093 | { |
2094 | struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); | 2094 | struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); |
2095 | printk(KERN_EMERG "Total free blocks count %lld\n", | 2095 | printk(KERN_CRIT "Total free blocks count %lld\n", |
2096 | ext4_count_free_blocks(inode->i_sb)); | 2096 | ext4_count_free_blocks(inode->i_sb)); |
2097 | printk(KERN_EMERG "Free/Dirty block details\n"); | 2097 | printk(KERN_CRIT "Free/Dirty block details\n"); |
2098 | printk(KERN_EMERG "free_blocks=%lld\n", | 2098 | printk(KERN_CRIT "free_blocks=%lld\n", |
2099 | (long long)percpu_counter_sum(&sbi->s_freeblocks_counter)); | 2099 | (long long) percpu_counter_sum(&sbi->s_freeblocks_counter)); |
2100 | printk(KERN_EMERG "dirty_blocks=%lld\n", | 2100 | printk(KERN_CRIT "dirty_blocks=%lld\n", |
2101 | (long long)percpu_counter_sum(&sbi->s_dirtyblocks_counter)); | 2101 | (long long) percpu_counter_sum(&sbi->s_dirtyblocks_counter)); |
2102 | printk(KERN_EMERG "Block reservation details\n"); | 2102 | printk(KERN_CRIT "Block reservation details\n"); |
2103 | printk(KERN_EMERG "i_reserved_data_blocks=%u\n", | 2103 | printk(KERN_CRIT "i_reserved_data_blocks=%u\n", |
2104 | EXT4_I(inode)->i_reserved_data_blocks); | 2104 | EXT4_I(inode)->i_reserved_data_blocks); |
2105 | printk(KERN_EMERG "i_reserved_meta_blocks=%u\n", | 2105 | printk(KERN_CRIT "i_reserved_meta_blocks=%u\n", |
2106 | EXT4_I(inode)->i_reserved_meta_blocks); | 2106 | EXT4_I(inode)->i_reserved_meta_blocks); |
2107 | return; | 2107 | return; |
2108 | } | 2108 | } |
2109 | 2109 | ||
@@ -2189,14 +2189,14 @@ static int mpage_da_map_blocks(struct mpage_da_data *mpd) | |||
2189 | * writepage and writepages will again try to write | 2189 | * writepage and writepages will again try to write |
2190 | * the same. | 2190 | * the same. |
2191 | */ | 2191 | */ |
2192 | printk(KERN_EMERG "%s block allocation failed for inode %lu " | 2192 | ext4_msg(mpd->inode->i_sb, KERN_CRIT, |
2193 | "at logical offset %llu with max blocks " | 2193 | "delayed block allocation failed for inode %lu at " |
2194 | "%zd with error %d\n", | 2194 | "logical offset %llu with max blocks %zd with " |
2195 | __func__, mpd->inode->i_ino, | 2195 | "error %d\n", mpd->inode->i_ino, |
2196 | (unsigned long long)next, | 2196 | (unsigned long long) next, |
2197 | mpd->b_size >> mpd->inode->i_blkbits, err); | 2197 | mpd->b_size >> mpd->inode->i_blkbits, err); |
2198 | printk(KERN_EMERG "This should not happen.!! " | 2198 | printk(KERN_CRIT "This should not happen!! " |
2199 | "Data will be lost\n"); | 2199 | "Data will be lost\n"); |
2200 | if (err == -ENOSPC) { | 2200 | if (err == -ENOSPC) { |
2201 | ext4_print_free_blocks(mpd->inode); | 2201 | ext4_print_free_blocks(mpd->inode); |
2202 | } | 2202 | } |
@@ -2822,10 +2822,9 @@ retry: | |||
2822 | handle = ext4_journal_start(inode, needed_blocks); | 2822 | handle = ext4_journal_start(inode, needed_blocks); |
2823 | if (IS_ERR(handle)) { | 2823 | if (IS_ERR(handle)) { |
2824 | ret = PTR_ERR(handle); | 2824 | ret = PTR_ERR(handle); |
2825 | printk(KERN_CRIT "%s: jbd2_start: " | 2825 | ext4_msg(inode->i_sb, KERN_CRIT, "%s: jbd2_start: " |
2826 | "%ld pages, ino %lu; err %d\n", __func__, | 2826 | "%ld pages, ino %lu; err %d\n", __func__, |
2827 | wbc->nr_to_write, inode->i_ino, ret); | 2827 | wbc->nr_to_write, inode->i_ino, ret); |
2828 | dump_stack(); | ||
2829 | goto out_writepages; | 2828 | goto out_writepages; |
2830 | } | 2829 | } |
2831 | 2830 | ||
@@ -2897,9 +2896,10 @@ retry: | |||
2897 | goto retry; | 2896 | goto retry; |
2898 | } | 2897 | } |
2899 | if (pages_skipped != wbc->pages_skipped) | 2898 | if (pages_skipped != wbc->pages_skipped) |
2900 | printk(KERN_EMERG "This should not happen leaving %s " | 2899 | ext4_msg(inode->i_sb, KERN_CRIT, |
2901 | "with nr_to_write = %ld ret = %d\n", | 2900 | "This should not happen leaving %s " |
2902 | __func__, wbc->nr_to_write, ret); | 2901 | "with nr_to_write = %ld ret = %d\n", |
2902 | __func__, wbc->nr_to_write, ret); | ||
2903 | 2903 | ||
2904 | /* Update index */ | 2904 | /* Update index */ |
2905 | index += pages_written; | 2905 | index += pages_written; |