Skip to content

Commit

Permalink
erofs: sunset erofs_dbg()
Browse files Browse the repository at this point in the history
Such debug messages are rarely used now.  Let's get rid of these,
and revert locally if they are needed for debugging.

Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Link: https://lore.kernel.org/r/20230414083027.12307-1-hsiangkao@linux.alibaba.com
  • Loading branch information
Gao Xiang committed Apr 16, 2023
1 parent 1b3567a commit 10656f9
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 19 deletions.
3 changes: 0 additions & 3 deletions fs/erofs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ static void *erofs_read_inode(struct erofs_buf *buf,
blkaddr = erofs_blknr(sb, inode_loc);
*ofs = erofs_blkoff(sb, inode_loc);

erofs_dbg("%s, reading inode nid %llu at %u of blkaddr %u",
__func__, vi->nid, *ofs, blkaddr);

kaddr = erofs_read_metabuf(buf, sb, blkaddr, EROFS_KMAP);
if (IS_ERR(kaddr)) {
erofs_err(sb, "failed to get inode (nid: %llu) page, err %ld",
Expand Down
2 changes: 0 additions & 2 deletions fs/erofs/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@ __printf(3, 4) void _erofs_info(struct super_block *sb,
#define erofs_info(sb, fmt, ...) \
_erofs_info(sb, __func__, fmt "\n", ##__VA_ARGS__)
#ifdef CONFIG_EROFS_FS_DEBUG
#define erofs_dbg(x, ...) pr_debug(x "\n", ##__VA_ARGS__)
#define DBG_BUGON BUG_ON
#else
#define erofs_dbg(x, ...) ((void)0)
#define DBG_BUGON(x) ((void)(x))
#endif /* !CONFIG_EROFS_FS_DEBUG */

Expand Down
9 changes: 3 additions & 6 deletions fs/erofs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,16 +205,13 @@ static struct dentry *erofs_lookup(struct inode *dir, struct dentry *dentry,

err = erofs_namei(dir, &dentry->d_name, &nid, &d_type);

if (err == -ENOENT) {
if (err == -ENOENT)
/* negative dentry */
inode = NULL;
} else if (err) {
else if (err)
inode = ERR_PTR(err);
} else {
erofs_dbg("%s, %pd (nid %llu) found, d_type %u", __func__,
dentry, nid, d_type);
else
inode = erofs_iget(dir->i_sb, nid);
}
return d_splice_alias(inode, dentry);
}

Expand Down
5 changes: 0 additions & 5 deletions fs/erofs/zdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -979,8 +979,6 @@ static int z_erofs_do_read_page(struct z_erofs_decompress_frontend *fe,

if (offset + cur < map->m_la ||
offset + cur >= map->m_la + map->m_llen) {
erofs_dbg("out-of-range map @ pos %llu", offset + cur);

if (z_erofs_collector_end(fe))
fe->backmost = false;
map->m_la = offset + cur;
Expand Down Expand Up @@ -1105,9 +1103,6 @@ static int z_erofs_do_read_page(struct z_erofs_decompress_frontend *fe,
if (err)
z_erofs_page_mark_eio(page);
z_erofs_onlinepage_endio(page);

erofs_dbg("%s, finish page: %pK spiltted: %u map->m_llen %llu",
__func__, page, spiltted, map->m_llen);
return err;
}

Expand Down
3 changes: 0 additions & 3 deletions fs/erofs/zmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,9 +585,6 @@ static int z_erofs_do_map_blocks(struct inode *inode,

unmap_out:
erofs_unmap_metabuf(&m.map->buf);
erofs_dbg("%s, m_la %llu m_pa %llu m_llen %llu m_plen %llu m_flags 0%o",
__func__, map->m_la, map->m_pa,
map->m_llen, map->m_plen, map->m_flags);
return err;
}

Expand Down

0 comments on commit 10656f9

Please sign in to comment.