aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/dir.c4
-rw-r--r--fs/ext4/ext4.h5
-rw-r--r--fs/ext4/extents.c8
-rw-r--r--fs/ext4/ialloc.c6
-rw-r--r--fs/ext4/inode.c15
-rw-r--r--fs/ext4/mballoc.c7
-rw-r--r--fs/ext4/namei.c14
-rw-r--r--fs/ext4/super.c57
8 files changed, 8 insertions, 108 deletions
diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c
index f00b0a0..164c560 100644
--- a/fs/ext4/dir.c
+++ b/fs/ext4/dir.c
@@ -90,10 +90,6 @@ int __ext4_check_dir_entry(const char *function, unsigned int line,
else
return 0;
- /* for debugging, sangwoo2.lee */
- print_bh(dir->i_sb, bh, 0, EXT4_BLOCK_SIZE(dir->i_sb));
- /* for debugging */
-
if (filp)
ext4_error_file(filp, function, line, bh ? bh->b_blocknr : 0,
"bad entry in directory: %s - offset=%u(%u), "
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index e256a40..2041de7 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1931,11 +1931,6 @@ extern __le16 ext4_group_desc_csum(struct ext4_sb_info *sbi, __u32 group,
struct ext4_group_desc *gdp);
extern int ext4_group_desc_csum_verify(struct ext4_sb_info *sbi, __u32 group,
struct ext4_group_desc *gdp);
-/* for debugging, sangwoo2.lee */
-extern void print_bh(struct super_block *sb, struct buffer_head *bh, int start, int len);
-extern void print_block_data(struct super_block *sb, sector_t blocknr, unsigned char *data_to_dump, int start, int len);
-/* for debugging */
-
static inline ext4_fsblk_t ext4_blocks_count(struct ext4_super_block *es)
{
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 3988b9b..d432d37 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -2485,6 +2485,10 @@ ext4_ext_rm_leaf(handle_t *handle, struct inode *inode,
if (uninitialized && num)
ext4_ext_mark_uninitialized(ex);
+ err = ext4_ext_dirty(handle, inode, path + depth);
+ if (err)
+ goto out;
+
/*
* If the extent was completely released,
* we need to remove it from the leaf
@@ -2506,10 +2510,6 @@ ext4_ext_rm_leaf(handle_t *handle, struct inode *inode,
le16_add_cpu(&eh->eh_entries, -1);
}
- err = ext4_ext_dirty(handle, inode, path + depth);
- if (err)
- goto out;
-
ext_debug("new extent: %u:%u:%llu\n", block, num,
ext4_ext_pblock(ex));
ex--;
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index 03ca84d..443ffb8 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -286,12 +286,8 @@ out:
if (!fatal)
fatal = err;
ext4_mark_super_dirty(sb);
- } else {
- /* for debugging, sangwoo2.lee */
- print_bh(sb, bitmap_bh, 0, EXT4_BLOCK_SIZE(sb));
- /* for debugging */
+ } else
ext4_error(sb, "bit already cleared for inode %lu", ino);
- }
error_return:
brelse(bitmap_bh);
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 0a0c404..5de8a27 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1191,11 +1191,6 @@ static int __check_block_validity(struct inode *inode, const char *func,
{
if (!ext4_data_block_valid(EXT4_SB(inode->i_sb), map->m_pblk,
map->m_len)) {
- /* for debugging, sangwoo2.lee */
- printk(KERN_ERR "printing inode..\n");
- print_block_data(inode->i_sb, 0, (unsigned char *)inode, 0, EXT4_INODE_SIZE(inode->i_sb));
- /* for debugging */
-
ext4_error_inode(inode, func, line, map->m_pblk,
"lblock %lu mapped to illegal pblock "
"(length %d)", (unsigned long) map->m_lblk,
@@ -2929,7 +2924,6 @@ static int ext4_da_writepages(struct address_space *mapping,
struct ext4_sb_info *sbi = EXT4_SB(mapping->host->i_sb);
pgoff_t done_index = 0;
pgoff_t end;
- struct blk_plug plug;
trace_ext4_da_writepages(inode, wbc);
@@ -3008,7 +3002,6 @@ retry:
if (wbc->sync_mode == WB_SYNC_ALL || wbc->tagged_writepages)
tag_pages_for_writeback(mapping, index, end);
- blk_start_plug(&plug);
while (!ret && wbc->nr_to_write > 0) {
/*
@@ -3027,7 +3020,6 @@ retry:
ext4_msg(inode->i_sb, KERN_CRIT, "%s: jbd2_start: "
"%ld pages, ino %lu; err %d", __func__,
wbc->nr_to_write, inode->i_ino, ret);
- blk_finish_plug(&plug);
goto out_writepages;
}
@@ -3074,7 +3066,6 @@ retry:
*/
break;
}
- blk_finish_plug(&plug);
if (!io_done && !cycled) {
cycled = 1;
index = 0;
@@ -4957,12 +4948,6 @@ struct inode *ext4_iget(struct super_block *sb, unsigned long ino)
if (inode->i_mode == 0 ||
!(EXT4_SB(inode->i_sb)->s_mount_state & EXT4_ORPHAN_FS)) {
/* this inode is deleted */
- /* for debugging, sangwoo2.lee */
- printk(KERN_ERR "iloc info, offset : %lu, group# : %u\n", iloc.offset, iloc.block_group);
- printk(KERN_ERR "sb info, inodes per group : %lu, inode size : %d\n", EXT4_SB(sb)->s_inodes_per_group, EXT4_SB(sb)->s_inode_size);
- print_bh(sb, iloc.bh, 0, EXT4_BLOCK_SIZE(sb));
- /* for debugging */
-
ret = -ESTALE;
goto bad_inode;
}
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 9841382..cdb8414 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -731,10 +731,6 @@ void ext4_mb_generate_buddy(struct super_block *sb,
grp->bb_fragments = fragments;
if (free != grp->bb_free) {
- /* for more specific debugging, sangwoo2.lee */
- print_block_data(sb, 0, bitmap, 0, EXT4_BLOCK_SIZE(sb));
- /* for more specific debugging */
-
ext4_grp_locked_error(sb, group, 0, 0,
"%u blocks in bitmap, %u in gd",
free, grp->bb_free);
@@ -1342,9 +1338,6 @@ static void mb_free_blocks(struct inode *inode, struct ext4_buddy *e4b,
blocknr = ext4_group_first_block_no(sb, e4b->bd_group);
blocknr += block;
- /* for debugging, sangwoo2.lee */
- print_block_data(sb, blocknr, EXT4_MB_BITMAP(e4b), 0, EXT4_BLOCK_SIZE(sb));
- /* for debugging */
ext4_grp_locked_error(sb, e4b->bd_group,
inode ? inode->i_ino : 0,
blocknr,
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 8b227a9..595d087 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -1028,25 +1028,17 @@ static struct dentry *ext4_lookup(struct inode *dir, struct dentry *dentry, stru
inode = NULL;
if (bh) {
__u32 ino = le32_to_cpu(de->inode);
+ brelse(bh);
if (!ext4_valid_inum(dir->i_sb, ino)) {
- /* for debugging, sangwoo2.lee */
- printk(KERN_ERR "Name of directory entry has bad inode# : %s\n", de->name);
- print_bh(dir->i_sb, bh, 0, EXT4_BLOCK_SIZE(dir->i_sb));
- /* for debugging */
- brelse(bh);
-
EXT4_ERROR_INODE(dir, "bad inode number: %u", ino);
return ERR_PTR(-EIO);
}
- brelse(bh);
-
inode = ext4_iget(dir->i_sb, ino);
if (IS_ERR(inode)) {
if (PTR_ERR(inode) == -ESTALE) {
- /* In case of -ESTALE, printing debugging data is already done in ext4_iget */
EXT4_ERROR_INODE(dir,
- "deleted inode referenced: %u at parent inode : %lu",
- ino, dir->i_ino);
+ "deleted inode referenced: %u",
+ ino);
return ERR_PTR(-EIO);
} else {
return ERR_CAST(inode);
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 630196f..e05cd34 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3723,16 +3723,8 @@ no_journal:
return 0;
cantfind_ext4:
-
- /* for debugging, sangwoo2.lee */
- /* If you wanna use the flag 'MS_SILENT', call 'print_bh' function within below 'if'. */
- printk("printing data of superblock-bh\n");
- print_bh(sb, bh, 0, EXT4_BLOCK_SIZE(sb));
- /* for debugging */
-
if (!silent)
ext4_msg(sb, KERN_ERR, "VFS: Can't find ext4 filesystem");
-
goto failed_mount;
failed_mount7:
@@ -4837,55 +4829,6 @@ out:
#endif
-/* for debugging, sangwoo2.lee */
-void print_bh(struct super_block *sb, struct buffer_head *bh, int start, int len)
-{
- print_block_data(sb, bh->b_blocknr, bh->b_data, start, len);
-}
-
-void print_block_data(struct super_block *sb, sector_t blocknr, unsigned char *data_to_dump, int start, int len)
-{
- int i, j;
- int bh_offset = (start / 16) * 16;
- char row_data[17] = { 0, };
- char row_hex[50] = { 0, };
- char ch;
-
- printk(KERN_ERR "As EXT4-fs error, printing data in hex\n");
- printk(KERN_ERR " [partition info] s_id : %s, start block# : %llu\n", sb->s_id, sb->s_bdev->bd_part->start_sect);
- printk(KERN_ERR " dump block# : %llu, start offset(byte) : %d, length(byte) : %d\n", blocknr, start, len);
- printk(KERN_ERR "-----------------------------------------------------------------------------\n");
-
- for (i = 0; i < (len + 15) / 16; i++)
- {
- for (j = 0; j < 16; j++)
- {
- ch = *(data_to_dump + bh_offset + j);
- if (start <= bh_offset + j && start + len > bh_offset + j)
- {
- if (isascii(ch) && isprint(ch))
- sprintf(row_data + j, "%c", ch);
- else
- sprintf(row_data + j, ".");
-
- sprintf(row_hex + (j * 3), "%2.2x ", ch);
- }
- else
- {
- sprintf(row_data + j, " ");
- sprintf(row_hex + (j * 3), "-- ");
- }
- }
-
- printk(KERN_ERR "0x%4.4x : %s | %s\n", bh_offset, row_hex, row_data);
- bh_offset += 16;
-
- }
- printk(KERN_ERR "-----------------------------------------------------------------------------\n");
-}
-/* for debugging */
-
-
static struct dentry *ext4_mount(struct file_system_type *fs_type, int flags,
const char *dev_name, void *data)
{