summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Grow.c29
-rw-r--r--Incremental.c7
-rw-r--r--mdadm.c4
-rw-r--r--super-ddf.c2
-rw-r--r--super-intel.c2
-rw-r--r--super0.c2
6 files changed, 22 insertions, 24 deletions
diff --git a/Grow.c b/Grow.c
index ee0fc5e0..79922c45 100644
--- a/Grow.c
+++ b/Grow.c
@@ -1543,7 +1543,7 @@ int Grow_reshape(char *devname, int fd,
if (ioctl(fd, GET_ARRAY_INFO, &array) < 0) {
- fprintf(stderr, Name ": %s is not an active md array - aborting\n",
+ pr_err("%s is not an active md array - aborting\n",
devname);
return 1;
}
@@ -2170,8 +2170,7 @@ static int set_new_data_offset(struct mdinfo *sra, struct supertype *st,
dn = map_dev(sd->disk.major, sd->disk.minor, 0);
dfd = dev_open(dn, O_RDONLY);
if (dfd < 0) {
- fprintf(stderr,
- Name ": %s: cannot open component %s\n",
+ pr_err("%s: cannot open component %s\n",
devname, dn ? dn : "-unknown-");
goto release;
}
@@ -2180,7 +2179,7 @@ static int set_new_data_offset(struct mdinfo *sra, struct supertype *st,
close(dfd);
if (rv) {
free(st2);
- fprintf(stderr, ": %s: cannot get superblock from %s\n",
+ pr_err("%s: cannot get superblock from %s\n",
devname, dn);
goto release;
}
@@ -2196,7 +2195,7 @@ static int set_new_data_offset(struct mdinfo *sra, struct supertype *st,
else {
if ((unsigned long long)data_offset
< info2.data_offset + min) {
- fprintf(stderr, Name ": --data-offset too small for %s\n",
+ pr_err("--data-offset too small for %s\n",
dn);
goto release;
}
@@ -2205,7 +2204,7 @@ static int set_new_data_offset(struct mdinfo *sra, struct supertype *st,
} else if (delta_disks > 0) {
/* need space before */
if (info2.space_before < min) {
- fprintf(stderr, Name ": Insufficient head-space for reshape on %s\n",
+ pr_err("Insufficient head-space for reshape on %s\n",
dn);
goto release;
}
@@ -2214,7 +2213,7 @@ static int set_new_data_offset(struct mdinfo *sra, struct supertype *st,
else {
if ((unsigned long long)data_offset
> info2.data_offset - min) {
- fprintf(stderr, Name ": --data-offset too large for %s\n",
+ pr_err("--data-offset too large for %s\n",
dn);
goto release;
}
@@ -2241,13 +2240,13 @@ static int set_new_data_offset(struct mdinfo *sra, struct supertype *st,
switch (dir) {
case 1: /* Increase data offset */
if (info2.space_after < min) {
- fprintf(stderr, Name ": Insufficient tail-space for reshape on %s\n",
+ pr_err("Insufficient tail-space for reshape on %s\n",
dn);
goto release;
}
if (data_offset != INVALID_SECTORS &&
data_offset < info2.data_offset + min) {
- fprintf(stderr, Name ": --data-offset too small on %s\n",
+ pr_err("--data-offset too small on %s\n",
dn);
goto release;
}
@@ -2265,13 +2264,13 @@ static int set_new_data_offset(struct mdinfo *sra, struct supertype *st,
break;
case -1: /* Decrease data offset */
if (info2.space_before < min) {
- fprintf(stderr, Name ": insufficient head-room on %s\n",
+ pr_err("insufficient head-room on %s\n",
dn);
goto release;
}
if (data_offset != INVALID_SECTORS &&
data_offset < info2.data_offset - min) {
- fprintf(stderr, Name ": --data-offset too small on %s\n",
+ pr_err("--data-offset too small on %s\n",
dn);
goto release;
}
@@ -2297,7 +2296,7 @@ static int set_new_data_offset(struct mdinfo *sra, struct supertype *st,
* For RAID5/6 this is not fatal
*/
return 1;
- fprintf(stderr, Name ": Cannot set new_offset for %s\n",
+ pr_err("Cannot set new_offset for %s\n",
dn);
break;
}
@@ -2341,7 +2340,7 @@ static int raid10_reshape(char *container, int fd, char *devname,
GET_COMPONENT|GET_DEVS|GET_OFFSET|GET_STATE|GET_CHUNK
);
if (!sra) {
- fprintf(stderr, Name ": %s: Cannot get array details from sysfs\n",
+ pr_err("%s: Cannot get array details from sysfs\n",
devname);
goto release;
}
@@ -2356,7 +2355,7 @@ static int raid10_reshape(char *container, int fd, char *devname,
(sra->component_size -
reshape->backup_blocks)/2);
if (rv) {
- fprintf(stderr, Name ": cannot reduce component size\n");
+ pr_err("cannot reduce component size\n");
goto release;
}
}
@@ -2380,7 +2379,7 @@ static int raid10_reshape(char *container, int fd, char *devname,
if (!err && sysfs_set_str(sra, NULL, "sync_action", "reshape") < 0)
err = errno;
if (err) {
- fprintf(stderr, Name ": Cannot set array shape for %s\n",
+ pr_err("Cannot set array shape for %s\n",
devname);
if (err == EBUSY &&
(info->array.state & (1<<MD_SB_BITMAP_PRESENT)))
diff --git a/Incremental.c b/Incremental.c
index e7887fac..0a75e343 100644
--- a/Incremental.c
+++ b/Incremental.c
@@ -530,10 +530,9 @@ int Incremental(char *devname, struct context *c,
/* Let's try to start it */
if (info.reshape_active && !(info.reshape_active & RESHAPE_NO_BACKUP)) {
- fprintf(stderr, Name
- ": %s: This array is being reshaped and cannot be started\n"
- " by --incremental. Please use --assemble\n",
- chosen_name);
+ pr_err("%s: This array is being reshaped and cannot be started\n",
+ chosen_name);
+ cont_err("by --incremental. Please use --assemble\n");
goto out;
}
if (match && match->bitmap_file) {
diff --git a/mdadm.c b/mdadm.c
index ff3fed72..a4980a79 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -469,7 +469,7 @@ int main(int argc, char *argv[])
case O(CREATE,DataOffset):
case O(GROW,DataOffset):
if (data_offset != INVALID_SECTORS) {
- fprintf(stderr, Name ": data-offset may only be specified one. "
+ pr_err("data-offset may only be specified one. "
"Second value is %s.\n", optarg);
exit(2);
}
@@ -479,7 +479,7 @@ int main(int argc, char *argv[])
else
data_offset = parse_size(optarg);
if (data_offset == INVALID_SECTORS) {
- fprintf(stderr, Name ": invalid data-offset: %s\n",
+ pr_err("invalid data-offset: %s\n",
optarg);
exit(2);
}
diff --git a/super-ddf.c b/super-ddf.c
index 9192ccdc..56aad684 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -1794,7 +1794,7 @@ static int init_super_ddf(struct supertype *st,
struct virtual_disk *vd;
if (data_offset != INVALID_SECTORS) {
- fprintf(stderr, Name ": data-offset not supported by DDF\n");
+ pr_err("data-offset not supported by DDF\n");
return 0;
}
diff --git a/super-intel.c b/super-intel.c
index e0b86b6c..5a0250ee 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -4752,7 +4752,7 @@ static int init_super_imsm(struct supertype *st, mdu_array_info_t *info,
char *version;
if (data_offset != INVALID_SECTORS) {
- fprintf(stderr, Name ": data-offset not supported by imsm\n");
+ pr_err("data-offset not supported by imsm\n");
return 0;
}
diff --git a/super0.c b/super0.c
index 58785e29..061e475e 100644
--- a/super0.c
+++ b/super0.c
@@ -657,7 +657,7 @@ static int init_super0(struct supertype *st, mdu_array_info_t *info,
int spares;
if (data_offset != INVALID_SECTORS) {
- fprintf(stderr, Name ": data-offset not support for 0.90\n");
+ pr_err("data-offset not support for 0.90\n");
return 0;
}