[PATCH 1/1] fs/erofs: avoid noisy messages

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Thu Aug 17 17:01:38 AEST 2023


The erofs file system creates noisy messages when it is not used:

    => host bind 0 disk.img
    => part list host 0
    cannot find valid erofs superblock
    cannot find valid erofs superblock

    Partition Map for HOST device 0  --   Partition Type: EFI

If there is not erofs file system, this only deserves a debug message.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
 fs/erofs/super.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/erofs/super.c b/fs/erofs/super.c
index d33926281b..d405d488fd 100644
--- a/fs/erofs/super.c
+++ b/fs/erofs/super.c
@@ -68,14 +68,14 @@ int erofs_read_superblock(void)
 
 	ret = erofs_blk_read(data, 0, erofs_blknr(sizeof(data)));
 	if (ret < 0) {
-		erofs_err("cannot read erofs superblock: %d", ret);
+		erofs_dbg("cannot read erofs superblock: %d", ret);
 		return -EIO;
 	}
 	dsb = (struct erofs_super_block *)(data + EROFS_SUPER_OFFSET);
 
 	ret = -EINVAL;
 	if (le32_to_cpu(dsb->magic) != EROFS_SUPER_MAGIC_V1) {
-		erofs_err("cannot find valid erofs superblock");
+		erofs_dbg("cannot find valid erofs superblock");
 		return ret;
 	}
 
-- 
2.40.1



More information about the Linux-erofs mailing list