summaryrefslogtreecommitdiffstats
path: root/Create.c
diff options
context:
space:
mode:
authorLogan Gunthorpe <logang@deltatee.com>2023-03-01 21:41:32 +0100
committerJes Sorensen <jes@trained-monkey.org>2023-03-13 15:08:10 +0100
commit9364dbfb264e89ab9467dfc0d2b813033e320640 (patch)
tree0a1e0646af0758d39c51dcf01010cf4956500971 /Create.c
parentCreate: Factor out add_disks() helpers (diff)
downloadmdadm-9364dbfb264e89ab9467dfc0d2b813033e320640.tar.xz
mdadm-9364dbfb264e89ab9467dfc0d2b813033e320640.zip
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>
Diffstat (limited to 'Create.c')
-rw-r--r--Create.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Create.c b/Create.c
index 6a044664..4acda30c 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);