mdadm/0076-Change-some-error-messages-to-info-level.patch

82 lines
2.4 KiB
Diff
Raw Normal View History

From 13a0e92a3ed70c52246a0f0572dee61203994327 Mon Sep 17 00:00:00 2001
From: Xiao Ni <xni@redhat.com>
Date: Wed, 22 May 2024 16:50:38 +0800
Subject: [PATCH 076/157] Change some error messages to info level
These logs are not error logs. Change them to info level.
Signed-off-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
---
Assemble.c | 16 ++++++----------
Manage.c | 2 +-
util.c | 4 ++--
3 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/Assemble.c b/Assemble.c
index 58dc2c5e..0e6da593 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -1214,23 +1214,19 @@ static int start_array(int mdfd,
if (rv == 0) {
sysfs_rules_apply(mddev, content);
if (c->verbose >= 0) {
- pr_err("%s has been started with %d drive%s",
+ pr_info("%s has been started with %d drive%s",
mddev, okcnt, okcnt==1?"":"s");
if (okcnt < (unsigned)content->array.raid_disks)
- fprintf(stderr, " (out of %d)",
- content->array.raid_disks);
+ printf(" (out of %d)", content->array.raid_disks);
if (rebuilding_cnt)
- fprintf(stderr, "%s %d rebuilding",
- sparecnt?",":" and",
+ printf("%s %d rebuilding", sparecnt?",":" and",
rebuilding_cnt);
if (sparecnt)
- fprintf(stderr, " and %d spare%s",
- sparecnt,
+ printf(" and %d spare%s", sparecnt,
sparecnt == 1 ? "" : "s");
if (content->journal_clean)
- fprintf(stderr, " and %d journal",
- journalcnt);
- fprintf(stderr, ".\n");
+ printf(" and %d journal", journalcnt);
+ printf(".\n");
}
if (content->reshape_active &&
is_level456(content->array.level)) {
diff --git a/Manage.c b/Manage.c
index 96e5ee54..5db72b77 100644
--- a/Manage.c
+++ b/Manage.c
@@ -463,7 +463,7 @@ done:
}
if (verbose >= 0)
- pr_err("stopped %s\n", devname);
+ pr_info("stopped %s\n", devname);
map_lock(&map);
map_remove(&map, devnm);
map_unlock(&map);
diff --git a/util.c b/util.c
index bf79742f..48c97545 100644
--- a/util.c
+++ b/util.c
@@ -633,9 +633,9 @@ int check_ext2(int fd, char *name)
bsize = sb[24]|(sb[25]|(sb[26]|sb[27]<<8)<<8)<<8;
size = sb[4]|(sb[5]|(sb[6]|sb[7]<<8)<<8)<<8;
size <<= bsize;
- pr_err("%s appears to contain an ext2fs file system\n",
+ pr_info("%s appears to contain an ext2fs file system\n",
name);
- cont_err("size=%lluK mtime=%s", size, ctime(&mtime));
+ pr_info("size=%lluK mtime=%s", size, ctime(&mtime));
return 1;
}
--
2.41.0