forked from pool/mdadm
90d4e6869d
- Update mdadm to latest upstream state upto commit 582945c2d3bb. (jsc#PED-7542) 1) The testing changes are not included here. 2) Code clean up, and more helper routines added for Manage.c, Monitor.c, mdadm.c, ReadMe.c, super-intel.c, super0.c, super1.c, Create.c, Incremental.c and so on. 3) Man page update for mdadm.8.in. 4) Several memory leak and double free fixes. 5) Check /etc/initrd-release for whether systemd running on an initrd. - Manage: Block unsafe member failing 0062-Manage-Block-unsafe-member-failing.patch - Mdmonitor: Split alert() into separate functions 0063-Mdmonitor-Split-alert-into-separate-functions.patch - Monitor: block if monitor modes are combined. 0064-Monitor-block-if-monitor-modes-are-combined.patch - Update mdadm Monitor manual. 0065-Update-mdadm-Monitor-manual.patch - mdadm: create ident_init() 0066-mdadm-create-ident_init.patch - mdadm: Add option validation for --update-subarray 0067-mdadm-Add-option-validation-for-update-subarray.patch - Fix --update-subarray on active volume 0068-Fix-update-subarray-on-active-volume.patch - Add code specific update options to enum. 0069-Add-code-specific-update-options-to-enum.patch - super-ddf: Remove update_super_ddf. 0070-super-ddf-Remove-update_super_ddf.patch - super0: refactor the code for enum 0071-super0-refactor-the-code-for-enum.patch - super1: refactor the code for enum OBS-URL: https://build.opensuse.org/request/show/1137473 OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=231
73 lines
2.3 KiB
Diff
73 lines
2.3 KiB
Diff
From 9364dbfb264e89ab9467dfc0d2b813033e320640 Mon Sep 17 00:00:00 2001
|
|
From: Logan Gunthorpe <logang@deltatee.com>
|
|
Date: Wed, 1 Mar 2023 13:41:32 -0700
|
|
Subject: [PATCH] mdadm: Introduce pr_info()
|
|
|
|
Feedback was given to avoid informational pr_err() calls that print
|
|
to stderr, even though that's done all through out the code.
|
|
|
|
Using printf() directly doesn't maintain the same format (an "mdadm"
|
|
prefix on every line.
|
|
|
|
So introduce pr_info() which prints to stdout with the same format
|
|
and use it for a couple informational pr_err() calls in Create().
|
|
|
|
Future work can make this call used in more cases.
|
|
|
|
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
|
|
Acked-by: Kinga Tanska <kinga.tanska@linux.intel.com>
|
|
Reviewed-by: Xiao Ni <xni@redhat.com>
|
|
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
|
|
Acked-by: Coly Li <colyli@suse.de>
|
|
Acked-by: Paul Menzel <pmenzel@molgen.mpg.de>
|
|
Signed-off-by: Jes Sorensen <jes@trained-monkey.org>
|
|
---
|
|
Create.c | 7 ++++---
|
|
mdadm.h | 2 ++
|
|
2 files changed, 6 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/Create.c b/Create.c
|
|
index 6a04466..4acda30 100644
|
|
--- a/Create.c
|
|
+++ b/Create.c
|
|
@@ -984,11 +984,12 @@ int Create(struct supertype *st, char *mddev,
|
|
|
|
mdi = sysfs_read(-1, devnm, GET_VERSION);
|
|
|
|
- pr_err("Creating array inside %s container %s\n",
|
|
+ pr_info("Creating array inside %s container %s\n",
|
|
mdi?mdi->text_version:"managed", devnm);
|
|
sysfs_free(mdi);
|
|
} else
|
|
- pr_err("Defaulting to version %s metadata\n", info.text_version);
|
|
+ pr_info("Defaulting to version %s metadata\n",
|
|
+ info.text_version);
|
|
}
|
|
|
|
map_update(&map, fd2devnm(mdfd), info.text_version,
|
|
@@ -1145,7 +1146,7 @@ int Create(struct supertype *st, char *mddev,
|
|
ioctl(mdfd, RESTART_ARRAY_RW, NULL);
|
|
}
|
|
if (c->verbose >= 0)
|
|
- pr_err("array %s started.\n", mddev);
|
|
+ pr_info("array %s started.\n", mddev);
|
|
if (st->ss->external && st->container_devnm[0]) {
|
|
if (need_mdmon)
|
|
start_mdmon(st->container_devnm);
|
|
diff --git a/mdadm.h b/mdadm.h
|
|
index 1674ce1..4336be4 100644
|
|
--- a/mdadm.h
|
|
+++ b/mdadm.h
|
|
@@ -1854,6 +1854,8 @@ static inline int xasprintf(char **strp, const char *fmt, ...) {
|
|
#endif
|
|
#define cont_err(fmt ...) fprintf(stderr, " " fmt)
|
|
|
|
+#define pr_info(fmt, args...) printf("%s: "fmt, Name, ##args)
|
|
+
|
|
void *xmalloc(size_t len);
|
|
void *xrealloc(void *ptr, size_t len);
|
|
void *xcalloc(size_t num, size_t size);
|
|
--
|
|
2.35.3
|
|
|