!conf_test_metadata(tst->ss->name, (pol = devid_policy(stb.st_rdev)),
tst->ss->match_home(tst, c->homehost) == 1)) {
if (report_mismatch)
- pr_err("%s has metadata type %s for which "
- "auto-assembly is disabled\n",
+ pr_err("%s has metadata type %s for which auto-assembly is disabled\n",
devname, tst->ss->name);
tmpdev->used = 2;
} else
!conf_test_metadata(tst->ss->name, (pol = devid_policy(stb.st_rdev)),
tst->ss->match_home(tst, c->homehost) == 1)) {
if (report_mismatch)
- pr_err("%s has metadata type %s for which "
- "auto-assembly is disabled\n",
+ pr_err("%s has metadata type %s for which auto-assembly is disabled\n",
devname, tst->ss->name);
tmpdev->used = 2;
}
st = tst; tst = NULL;
if (!auto_assem && inargv && tmpdev->next != NULL) {
- pr_err("%s is a container, but is not "
- "only device given: confused and aborting\n",
+ pr_err("%s is a container, but is not only device given: confused and aborting\n",
devname);
st->ss->free_super(st);
dev_policy_free(pol);
c->homehost);
if (err < 0) {
if (err == -1)
- pr_err("--update=%s not understood"
- " for %s metadata\n",
+ pr_err("--update=%s not understood for %s metadata\n",
c->update, tst->ss->name);
tst->ss->free_super(tst);
free(tst);
* Could be a mis-detection caused by overlapping
* partitions. fail-safe.
*/
- pr_err("WARNING %s and %s appear"
- " to have very similar superblocks.\n"
- " If they are really different, "
- "please --zero the superblock on one\n"
- " If they are the same or overlap,"
- " please remove one from %s.\n",
+ pr_err("WARNING %s and %s appear to have very similar superblocks.\n"
+ " If they are really different, please --zero the superblock on one\n"
+ " If they are the same or overlap, please remove one from %s.\n",
devices[best[i]].devname, devname,
inargv ? "the list" :
"the\n DEVICE list in mdadm.conf"
rv = add_disk(mdfd, st, content, &devices[j].i);
if (rv) {
- pr_err("failed to add "
- "%s to %s: %s\n",
+ pr_err("failed to add %s to %s: %s\n",
devices[j].devname,
mddev,
strerror(errno));
if (content->array.level == LEVEL_CONTAINER) {
if (c->verbose >= 0) {
- pr_err("Container %s has been "
- "assembled with %d drive%s",
+ pr_err("Container %s has been assembled with %d drive%s",
mddev, okcnt+sparecnt, okcnt+sparecnt==1?"":"s");
if (okcnt < (unsigned)content->array.raid_disks)
fprintf(stderr, " (out of %d)",
if (!enough(content->array.level, content->array.raid_disks,
content->array.layout, 1, avail))
- pr_err("Not enough devices to "
- "start the array.\n");
+ pr_err("Not enough devices to start the array.\n");
else if (!enough(content->array.level,
content->array.raid_disks,
content->array.layout, clean,
avail))
- pr_err("Not enough devices to "
- "start the array while not clean "
- "- consider --force.\n");
+ pr_err("Not enough devices to start the array while not clean - consider --force.\n");
return 1;
}
content->array.raid_disks,
content->array.layout, clean,
avail))
- fprintf(stderr, " - not enough to start the "
- "array while not clean - consider "
- "--force.\n");
+ fprintf(stderr, " - not enough to start the array while not clean - consider --force.\n");
else {
if (req_cnt == (unsigned)content->array.raid_disks)
fprintf(stderr, " - need all %d to start it", req_cnt);
int err = 0;
int *fdlist = xmalloc(sizeof(int)* bestcnt);
if (c->verbose > 0)
- pr_err(":%s has an active reshape - checking "
- "if critical section needs to be restored\n",
+ pr_err(":%s has an active reshape - checking if critical section needs to be restored\n",
chosen_name);
if (!c->backup_file)
c->backup_file = locate_backup(content->sys_name);
c->backup_file, c->verbose > 0);
if (err && c->invalid_backup) {
if (c->verbose > 0)
- pr_err("continuing"
- " without restoring backup\n");
+ pr_err("continuing without restoring backup\n");
err = 0;
}
}
pr_err("RUN_ARRAY failed: %s\n",
strerror(errno));
if (s->chunk & (s->chunk-1)) {
- cont_err("Problem may be that chunk size"
- " is not a power of 2\n");
+ cont_err("Problem may be that chunk size is not a power of 2\n");
}
goto abort;
}
close(fd);
}
if (st && st->ss->external && s->sparedisks) {
- pr_err("This metadata type does not support "
- "spare disks at create time\n");
+ pr_err("This metadata type does not support spare disks at create time\n");
return 1;
}
if (subdevs > s->raiddisks+s->sparedisks) {
if (do_default_chunk) {
/* default chunk was just set */
if (c->verbose > 0)
- pr_err("chunk size "
- "defaults to %dK\n", s->chunk);
+ pr_err("chunk size defaults to %dK\n", s->chunk);
s->size &= ~(unsigned long long)(s->chunk - 1);
do_default_chunk = 0;
}
dname, strerror(errno));
exit(2);
}
- pr_err("device %s not suitable "
- "for any style of array\n",
+ pr_err("device %s not suitable for any style of array\n",
dname);
exit(2);
}
dname, &freesize,
c->verbose >= 0)) {
- pr_err("%s is not suitable for "
- "this array.\n",
+ pr_err("%s is not suitable for this array.\n",
dname);
fail = 1;
continue;
if (do_default_chunk) {
/* default chunk was just set */
if (c->verbose > 0)
- pr_err("chunk size "
- "defaults to %dK\n", s->chunk);
+ pr_err("chunk size defaults to %dK\n", s->chunk);
s->size &= ~(unsigned long long)(s->chunk - 1);
do_default_chunk = 0;
}
}
if (s->size && freesize < s->size) {
- pr_err("%s is smaller than given size."
- " %lluK < %lluK + metadata\n",
+ pr_err("%s is smaller than given size. %lluK < %lluK + metadata\n",
dname, freesize, s->size);
fail = 1;
continue;
}
}
if (s->raiddisks + s->sparedisks > st->max_devs) {
- pr_err("Too many devices:"
- " %s metadata only supports %d\n",
+ pr_err("Too many devices: %s metadata only supports %d\n",
st->ss->name, st->max_devs);
return 1;
}
memset(&inf, 0, sizeof(inf));
ioctl(mdfd, GET_ARRAY_INFO, &inf);
if (inf.working_disks != 0) {
- pr_err("another array by this name"
- " is already running.\n");
+ pr_err("another array by this name is already running.\n");
goto abort_locked;
}
}
mdi?mdi->text_version:"managed", devnm);
sysfs_free(mdi);
} else
- pr_err("Defaulting to version"
- " %s metadata\n", info.text_version);
+ pr_err("Defaulting to version %s metadata\n", info.text_version);
}
map_update(&map, fd2devnm(mdfd), info.text_version,
*/
container_fd = open_dev_excl(st->container_devnm);
if (container_fd < 0) {
- pr_err("Cannot get exclusive "
- "open on container - weird.\n");
+ pr_err("Cannot get exclusive open on container - weird.\n");
goto abort_locked;
}
if (mdmon_running(st->container_devnm)) {
if (c->verbose)
- pr_err("reusing mdmon "
- "for %s.\n",
+ pr_err("reusing mdmon for %s.\n",
st->container_devnm);
st->update_tail = &st->updates;
} else
fd = open(dv->devname, O_RDWR|O_EXCL);
if (fd < 0) {
- pr_err("failed to open %s "
- "after earlier success - aborting\n",
+ pr_err("failed to open %s after earlier success - aborting\n",
dv->devname);
goto abort_locked;
}
rv = add_disk(mdfd, st, &info, inf);
if (rv) {
- pr_err("ADD_NEW_DISK for %s "
- "failed: %s\n",
+ pr_err("ADD_NEW_DISK for %s failed: %s\n",
dv->devname, strerror(errno));
goto abort_locked;
}
}
sysfs_set_safemode(&info, safe_mode_delay);
if (err) {
- pr_err("failed to"
- " activate array.\n");
+ pr_err("failed to activate array.\n");
ioctl(mdfd, STOP_ARRAY, NULL);
goto abort;
}
pr_err("RUN_ARRAY failed: %s\n",
strerror(errno));
if (info.array.chunk_size & (info.array.chunk_size-1)) {
- cont_err("Problem may be that "
- "chunk size is not a power of 2\n");
+ cont_err("Problem may be that chunk size is not a power of 2\n");
}
ioctl(mdfd, STOP_ARRAY, NULL);
goto abort;
}
free(fdlist);
if (err) {
- pr_err("Failed to restore critical"
- " section for reshape - sorry.\n");
+ pr_err("Failed to restore critical section for reshape - sorry.\n");
if (!backup_file)
- pr_err("Possibly you need"
- " to specify a --backup-file\n");
+ pr_err("Possibly you need to specify a --backup-file\n");
return 1;
}
if (vers < 9003) {
major = BITMAP_MAJOR_HOSTENDIAN;
- pr_err("Warning - bitmaps created on this kernel"
- " are not portable\n"
- " between different architectures. Consider upgrading"
- " the Linux kernel.\n");
+ pr_err("Warning - bitmaps created on this kernel are not portable\n"
+ " between different architectures. Consider upgrading the Linux kernel.\n");
}
if (ioctl(fd, GET_BITMAP_FILE, &bmf) != 0) {
int offset_setable = 0;
struct mdinfo *mdi;
if (st->ss->add_internal_bitmap == NULL) {
- pr_err("Internal bitmaps not supported "
- "with %s metadata\n", st->ss->name);
+ pr_err("Internal bitmaps not supported with %s metadata\n", st->ss->name);
return 1;
}
mdi = sysfs_read(fd, NULL, GET_BITMAP_LOCATION);
)
st->ss->write_bitmap(st, fd2);
else {
- pr_err("failed to create internal bitmap"
- " - chunksize problem.\n");
+ pr_err("failed to create internal bitmap - chunksize problem.\n");
close(fd2);
return 1;
}
}
if (rv < 0) {
if (errno == EBUSY)
- pr_err("Cannot add bitmap while array is"
- " resyncing or reshaping etc.\n");
+ pr_err("Cannot add bitmap while array is resyncing or reshaping etc.\n");
pr_err("failed to set internal bitmap.\n");
return 1;
}
if (ioctl(fd, SET_BITMAP_FILE, bitmap_fd) < 0) {
int err = errno;
if (errno == EBUSY)
- pr_err("Cannot add bitmap while array is"
- " resyncing or reshaping etc.\n");
+ pr_err("Cannot add bitmap while array is resyncing or reshaping etc.\n");
pr_err("Cannot set bitmap file for %s: %s\n",
devname, strerror(err));
return 1;
dev = stb.st_dev;
fstat(fd, &stb);
if (stb.st_rdev == dev) {
- pr_err("backup file must NOT be"
- " on the array being reshaped.\n");
+ pr_err("backup file must NOT be on the array being reshaped.\n");
close(*fdlist);
return 0;
}
memset(buf, 0, 512);
for (i=0; i < blocks + 8 ; i++) {
if (write(*fdlist, buf, 512) != 512) {
- pr_err("%s: cannot create"
- " backup file %s: %s\n",
+ pr_err("%s: cannot create backup file %s: %s\n",
devname, backup_file, strerror(errno));
return 0;
}
*/
if (info->new_level > 1 &&
(info->component_size & 7))
- return "Cannot convert RAID1 of this size - "
- "reduce size to multiple of 4K first.";
+ return "Cannot convert RAID1 of this size - reduce size to multiple of 4K first.";
if (info->new_level == 0) {
if (info->delta_disks != UnSet &&
info->delta_disks != 0)
- return "Cannot change number of disks "
- "with RAID1->RAID0 conversion";
+ return "Cannot change number of disks with RAID1->RAID0 conversion";
re->level = 0;
re->before.data_disks = 1;
re->after.data_disks = 1;
if (far > 1 && !offset)
return "Cannot reshape RAID10 to far-mode";
if (near * far != copies)
- return "Cannot change number of copies"
- " when reshaping RAID10";
+ return "Cannot change number of copies when reshaping RAID10";
}
if (info->delta_disks == UnSet)
info->delta_disks = 0;
/ info->array.raid_disks);
if (info->array.raid_disks * (copies-1)
!= info->delta_disks)
- return "Impossible number of devices"
- " for RAID0->RAID10";
+ return "Impossible number of devices for RAID0->RAID10";
info->new_layout = 0x100 + copies;
}
if (info->delta_disks == UnSet) {
int copies = info->new_layout & 0xff;
if (info->new_layout != 0x100 + copies)
- return "New layout impossible"
- " for RAID0->RAID10";;
+ return "New layout impossible for RAID0->RAID10";;
info->delta_disks = (copies - 1) *
info->array.raid_disks;
}
return "Can only convert a 2-device array to RAID1";
if (info->delta_disks != UnSet &&
info->delta_disks != 0)
- return "Cannot set raid_disk when "
- "converting RAID5->RAID1";
+ return "Cannot set raid_disk when converting RAID5->RAID1";
re->level = 1;
info->new_chunk = 0;
return NULL;
strcat(strcpy(layout, ls), "-6");
l = map_name(r6layout, layout);
if (l == UnSet)
- return "Cannot find RAID6 layout"
- " to convert to";
+ return "Cannot find RAID6 layout to convert to";
} else {
/* Current RAID6 has no equivalent.
* If it is already a '-6' layout we
if (s->size > 0 &&
(s->chunk || s->level!= UnSet || s->layout_str || s->raiddisks)) {
- pr_err("cannot change component size at the same time "
- "as other changes.\n"
- " Change size first, then check data is intact before "
- "making other changes.\n");
+ pr_err("cannot change component size at the same time as other changes.\n"
+ " Change size first, then check data is intact before making other changes.\n");
return 1;
}
return 1;
}
if (s->raiddisks > st->max_devs) {
- pr_err("Cannot increase raid-disks on this array"
- " beyond %d\n", st->max_devs);
+ pr_err("Cannot increase raid-disks on this array beyond %d\n", st->max_devs);
return 1;
}
& (1<<MD_SB_BLOCK_CONTAINER_RESHAPE))
allow_reshape = 0;
if (!allow_reshape) {
- pr_err("cannot reshape arrays in"
- " container with unsupported"
- " metadata: %s(%s)\n",
+ pr_err("cannot reshape arrays in container with unsupported metadata: %s(%s)\n",
devname, container);
sysfs_free(cc);
free(subarray);
if (s->raiddisks > array.raid_disks &&
array.spare_disks +added_disks < (s->raiddisks - array.raid_disks) &&
!c->force) {
- pr_err("Need %d spare%s to avoid degraded array,"
- " and only have %d.\n"
+ pr_err("Need %d spare%s to avoid degraded array, and only have %d.\n"
" Use --force to over-ride this check.\n",
s->raiddisks - array.raid_disks,
s->raiddisks - array.raid_disks == 1 ? "" : "s",
sysfs_free(sra);
return 1;
} else if (frozen < 0) {
- pr_err("%s is performing resync/recovery and cannot"
- " be reshaped\n", devname);
+ pr_err("%s is performing resync/recovery and cannot be reshaped\n", devname);
sysfs_free(sra);
return 1;
}
sizeinfo->array.layout,
sizeinfo->array.raid_disks);
new_size /= data_disks;
- dprintf("Metadata size correction from %llu to "
- "%llu (%llu)\n", orig_size, new_size,
+ dprintf("Metadata size correction from %llu to %llu (%llu)\n", orig_size, new_size,
new_size * data_disks);
s->size = new_size;
sysfs_free(sizeinfo);
}
}
if (rv) {
- pr_err("Cannot set size on "
- "array members.\n");
+ pr_err("Cannot set size on array members.\n");
goto size_change_error;
}
if (min_csize && s->size > min_csize) {
- pr_err("Cannot safely make this array "
- "use more than 2TB per device on this kernel.\n");
+ pr_err("Cannot safely make this array use more than 2TB per device on this kernel.\n");
rv = 1;
goto size_change_error;
}
/* Don't let the kernel choose a size - it will get
* it wrong
*/
- pr_err("Limited v0.90 array to "
- "2TB per device\n");
+ pr_err("Limited v0.90 array to 2TB per device\n");
s->size = min_csize;
}
if (st->ss->external) {
s->size = array.size;
if (c->verbose >= 0) {
if (s->size == orig_size)
- pr_err("component size of %s "
- "unchanged at %lluK\n",
+ pr_err("component size of %s unchanged at %lluK\n",
devname, s->size);
else
- pr_err("component size of %s "
- "has been set to %lluK\n",
+ pr_err("component size of %s has been set to %lluK\n",
devname, s->size);
}
changed = 1;
if (info.array.level == 6 &&
(info.new_level == 6 || info.new_level == UnSet) &&
info.array.layout >= 16) {
- pr_err("%s has a non-standard layout. If you"
- " wish to preserve this\n", devname);
- cont_err("during the reshape, please specify"
- " --layout=preserve\n");
- cont_err("If you want to change it, specify a"
- " layout or use --layout=normalise\n");
+ pr_err("%s has a non-standard layout. If you wish to preserve this\n", devname);
+ cont_err("during the reshape, please specify --layout=preserve\n");
+ cont_err("If you want to change it, specify a layout or use --layout=normalise\n");
rv = 1;
goto release;
}
info.new_layout = map_name(r6layout, l);
}
} else {
- pr_err("%s is only meaningful when reshaping"
- " a RAID6 array.\n", s->layout_str);
+ pr_err("%s is only meaningful when reshaping a RAID6 array.\n", s->layout_str);
rv = 1;
goto release;
}
strcat(l, "-6");
info.new_layout = map_name(r6layout, l);
} else {
- pr_err("%s in only meaningful when reshaping"
- " to RAID6\n", s->layout_str);
+ pr_err("%s in only meaningful when reshaping to RAID6\n", s->layout_str);
rv = 1;
goto release;
}
info.new_layout = parse_layout_faulty(s->layout_str);
break;
default:
- pr_err("layout not meaningful"
- " with this level\n");
+ pr_err("layout not meaningful with this level\n");
rv = 1;
goto release;
}
if (info.new_layout == UnSet) {
- pr_err("layout %s not understood"
- " for this level\n",
+ pr_err("layout %s not understood for this level\n",
s->layout_str);
rv = 1;
goto release;
info->new_layout,
info->array.raid_disks);
if (info->reshape_progress < position) {
- dprintf("Corrected reshape progress (%llu) to "
- "md position (%llu)\n",
+ dprintf("Corrected reshape progress (%llu) to md position (%llu)\n",
info->reshape_progress, position);
info->reshape_progress = position;
ret_val = 1;
} else if (info->reshape_progress > position) {
- pr_err("Fatal error: array "
- "reshape was not properly frozen "
- "(expected reshape position is %llu, "
- "but reshape progress is %llu.\n",
+ pr_err("Fatal error: array reshape was not properly frozen (expected reshape position is %llu, but reshape progress is %llu.\n",
position, info->reshape_progress);
ret_val = -1;
} else {
- dprintf("Reshape position in md and metadata "
- "are the same;");
+ dprintf("Reshape position in md and metadata are the same;");
ret_val = 1;
}
}
if (info2.space_before == 0 &&
info2.space_after == 0) {
/* Metadata doesn't support data_offset changes */
- pr_err("%s: Metadata version doesn't support"
- " data_offset changes\n", devname);
+ pr_err("%s: Metadata version doesn't support data_offset changes\n", devname);
goto fallback;
}
if (before > info2.space_before)
devname);
if (err == EBUSY &&
(info->array.state & (1<<MD_SB_BITMAP_PRESENT)))
- cont_err(" Bitmap must be removed before"
- " shape can be changed\n");
+ cont_err(" Bitmap must be removed before shape can be changed\n");
goto release;
}
sysfs_free(sra);
if (err == EBUSY &&
(array.state & (1<<MD_SB_BITMAP_PRESENT)))
- cont_err("Bitmap must be removed before"
- " shape can be changed\n");
+ cont_err("Bitmap must be removed before shape can be changed\n");
goto release;
}
if (err == EBUSY &&
(array.state & (1<<MD_SB_BITMAP_PRESENT)))
- cont_err("Bitmap must be removed before"
- " shape can be changed\n");
+ cont_err("Bitmap must be removed before shape can be changed\n");
goto release;
}
}
devname, c);
if (err == EBUSY &&
(array.state & (1<<MD_SB_BITMAP_PRESENT)))
- cont_err("Bitmap must be removed"
- " before level can be changed\n");
+ cont_err("Bitmap must be removed before level can be changed\n");
return err;
}
if (verbose >= 0)
reshape.before.layout != info->array.layout ||
reshape.before.data_disks + reshape.parity
!= info->array.raid_disks - max(0, info->delta_disks))) {
- pr_err("reshape info is not in native format -"
- " cannot continue.\n");
+ pr_err("reshape info is not in native format - cannot continue.\n");
goto release;
}
if (!force &&
info->new_level > 1 && info->array.level > 1 &&
spares_needed > info->array.spare_disks + added_disks) {
- pr_err("Need %d spare%s to avoid degraded array,"
- " and only have %d.\n"
+ pr_err("Need %d spare%s to avoid degraded array, and only have %d.\n"
" Use --force to over-ride this check.\n",
spares_needed,
spares_needed == 1 ? "" : "s",
- array.raid_disks;
if ((info->new_level > 1 || info->new_level == 0) &&
spares_needed > info->array.spare_disks +added_disks) {
- pr_err("Need %d spare%s to create working array,"
- " and only have %d.\n",
+ pr_err("Need %d spare%s to create working array, and only have %d.\n",
spares_needed,
spares_needed == 1 ? "" : "s",
info->array.spare_disks + added_disks);
blocks < 16*1024*2)
blocks *= 2;
} else
- pr_err("Need to backup %luK of critical "
- "section..\n", blocks/2);
+ pr_err("Need to backup %luK of critical section..\n", blocks/2);
if (blocks >= sra->component_size/2) {
- pr_err("%s: Something wrong"
- " - reshape aborted\n",
+ pr_err("%s: Something wrong - reshape aborted\n",
devname);
goto release;
}
pr_err(" Please provide one with \"--backup=...\"\n");
goto release;
} else if (sra->array.spare_disks == 0) {
- pr_err("%s: Cannot grow - "
- "need a spare or backup-file to backup "
- "critical section\n", devname);
+ pr_err("%s: Cannot grow - need a spare or backup-file to backup critical section\n", devname);
goto release;
}
} else {
free(fdlist);
free(offsets);
sysfs_free(sra);
- pr_err("Reshape has to be continued from"
- " location %llu when root filesystem has been mounted.\n",
+ pr_err("Reshape has to be continued from location %llu when root filesystem has been mounted.\n",
sra->reshape_progress);
return 1;
}
return 1;
default: /* parent */
if (!freeze_reshape)
- printf("%s: multi-array reshape continues"
- " in background\n", Name);
+ printf("%s: multi-array reshape continues in background\n", Name);
return 0;
case 0: /* child */
map_fork();
* This is possibly interim until the behaviour of
* reshape_array is resolved().
*/
- printf("%s: Multiple reshape execution detected for "
- "device %s.\n", Name, adev);
+ printf("%s: Multiple reshape execution detected for device %s.\n", Name, adev);
close(fd);
break;
}
if (info->array.utime > (int)__le64_to_cpu(bsb.mtime) + 2*60*60 ||
info->array.utime < (int)__le64_to_cpu(bsb.mtime) - 10*60) {
if (check_env("MDADM_GROW_ALLOW_OLD")) {
- pr_err("accepting backup with timestamp %lu "
- "for array with timestamp %lu\n",
+ pr_err("accepting backup with timestamp %lu for array with timestamp %lu\n",
(unsigned long)__le64_to_cpu(bsb.mtime),
(unsigned long)info->array.utime);
} else {
int d;
dprintf_cont("native array (%s)\n", devname);
if (ioctl(fd, GET_ARRAY_INFO, &array.array) < 0) {
- pr_err("%s is not an active md array -"
- " aborting\n", devname);
+ pr_err("%s is not an active md array - aborting\n", devname);
ret_val = 1;
goto Grow_continue_command_exit;
}
fd = cfd;
}
if (cfd < 0) {
- pr_err("Unable to open container "
- "for %s\n", devname);
+ pr_err("Unable to open container for %s\n", devname);
ret_val = 1;
goto Grow_continue_command_exit;
}
allow_reshape = 0;
if (!allow_reshape) {
- pr_err("cannot continue reshape of an array"
- " in container with unsupported"
- " metadata: %s(%s)\n",
+ pr_err("cannot continue reshape of an array in container with unsupported metadata: %s(%s)\n",
devname, container);
ret_val = 1;
goto Grow_continue_command_exit;
break;
}
if (!content) {
- pr_err("Unable to determine reshaped "
- "array for %s\n", devname);
+ pr_err("Unable to determine reshaped array for %s\n", devname);
ret_val = 1;
goto Grow_continue_command_exit;
}
if (mdmon_running(container))
st->update_tail = &st->updates;
else {
- pr_err("No mdmon found. "
- "Grow cannot continue.\n");
+ pr_err("No mdmon found. Grow cannot continue.\n");
ret_val = 1;
goto Grow_continue_command_exit;
}
close(dfd);
if (!rv && st->ss->container_content) {
if (map_lock(&map))
- pr_err("failed to get "
- "exclusive lock on mapfile\n");
+ pr_err("failed to get exclusive lock on mapfile\n");
if (c->export)
printf("MD_DEVNAME=%s\n", devname);
rv = Incremental_container(st, devname, c, NULL);
if (match && match->devname
&& strcasecmp(match->devname, "<ignore>") == 0) {
if (c->verbose >= 0)
- pr_err("array containing %s is explicitly"
- " ignored by mdadm.conf\n",
+ pr_err("array containing %s is explicitly ignored by mdadm.conf\n",
devname);
goto out;
}
if (!match && !conf_test_metadata(st->ss->name, policy,
(trustworthy == LOCAL))) {
if (c->verbose >= 1)
- pr_err("%s has metadata type %s for which "
- "auto-assembly is disabled\n",
+ pr_err("%s has metadata type %s for which auto-assembly is disabled\n",
devname, st->ss->name);
goto out;
}
/* 4/ Check if array exists.
*/
if (map_lock(&map))
- pr_err("failed to get exclusive lock on "
- "mapfile\n");
+ pr_err("failed to get exclusive lock on mapfile\n");
/* Now check we can get O_EXCL. If not, probably "mdadm -A" has
* taken over
*/
* So reject it.
*/
ioctl(mdfd, STOP_ARRAY, NULL);
- pr_err("You have an old buggy kernel which cannot support\n"
- " --incremental reliably. Aborting.\n");
+ pr_err("You have an old buggy kernel which cannot support\n --incremental reliably. Aborting.\n");
rv = 2;
goto out_unlock;
}
st2 = dup_super(st);
if (st2->ss->load_super(st2, dfd2, NULL) ||
st->ss->compare_super(st, st2) != 0) {
- pr_err("metadata mismatch between %s and "
- "chosen array %s\n",
+ pr_err("metadata mismatch between %s and chosen array %s\n",
devname, chosen_name);
close(dfd2);
rv = 2;
*/
if (map_lock(&map)) {
- pr_err("failed to get exclusive lock on "
- "mapfile\n");
+ pr_err("failed to get exclusive lock on mapfile\n");
return 1;
}
for (mp = map ; mp ; mp = mp->next) {
sra->text_version);
if (!st2) {
if (verbose > 1)
- pr_err("not adding %s to %s"
- " as metadata not recognised.\n",
+ pr_err("not adding %s to %s as metadata not recognised.\n",
devname, mp->path);
goto next;
}
if (domain_test(dl, pol, st2->ss->name) != 1) {
/* domain test fails */
if (verbose > 1)
- pr_err("not adding %s to %s as"
- " it is not in a compatible domain\n",
+ pr_err("not adding %s to %s as it is not in a compatible domain\n",
devname, mp->path);
goto next;
!policy_action_allows(pol, st?st->ss->name:NULL,
act_spare_same_slot)) {
if (verbose > 1)
- pr_err("%s is not bare, so not "
- "considering as a spare\n",
+ pr_err("%s is not bare, so not considering as a spare\n",
devname);
return 1;
}
if (match && match->devname &&
strcasecmp(match->devname, "<ignore>") == 0) {
if (c->verbose > 0)
- pr_err("array %s/%s is "
- "explicitly ignored by mdadm.conf\n",
+ pr_err("array %s/%s is explicitly ignored by mdadm.conf\n",
match->container, match->member);
continue;
}
char buf[32];
if (!id_path)
- dprintf("incremental removal without --path <id_path> "
- "lacks the possibility to re-add new device in this "
- "port\n");
+ dprintf("incremental removal without --path <id_path> lacks the possibility to re-add new device in this port\n");
if (strchr(devname, '/')) {
- pr_err("incremental removal requires a "
- "kernel device name, not a file: %s\n", devname);
+ pr_err("incremental removal requires a kernel device name, not a file: %s\n", devname);
return 1;
}
ent = mdstat_by_component(devname);
if (!ent) {
if (verbose >= 0)
- pr_err("%s does not appear to be a component "
- "of any array\n", devname);
+ pr_err("%s does not appear to be a component of any array\n", devname);
return 1;
}
sysfs_init(&mdi, -1, ent->devnm);
if (md_get_version(fd) < 9000) {
if (ioctl(fd, STOP_MD, 0) == 0)
return 0;
- pr_err("stopping device %s "
- "failed: %s\n",
+ pr_err("stopping device %s failed: %s\n",
devname, strerror(errno));
return 1;
}
if (fd >= 0)
close(fd);
if (verbose >= 0)
- pr_err("Cannot get exclusive access to %s:"
- "Perhaps a running "
- "process, mounted filesystem "
- "or active volume group?\n",
+ pr_err("Cannot get exclusive access to %s:Perhaps a running process, mounted filesystem or active volume group?\n",
devname);
return 1;
}
fd = open_dev_excl(devnm);
if (fd < 0) {
if (verbose >= 0)
- pr_err("failed to completely stop %s"
- ": Device is busy\n",
+ pr_err("failed to completely stop %s: Device is busy\n",
devname);
rv = 1;
goto out;
metadata_container_matches(m->metadata_version+9,
devnm)) {
if (verbose >= 0)
- pr_err("Cannot stop container %s: "
- "member %s still active\n",
+ pr_err("Cannot stop container %s: member %s still active\n",
devname, m->dev);
free_mdstat(mds);
rv = 1;
pr_err("failed to stop array %s: %s\n",
devname, strerror(errno));
if (errno == EBUSY)
- cont_err("Perhaps a running "
- "process, mounted filesystem "
- "or active volume group?\n");
+ cont_err("Perhaps a running process, mounted filesystem or active volume group?\n");
}
rv = 1;
goto out;
int rv = -1;
tfd = dev_open(dv->devname, O_RDWR);
if (tfd < 0) {
- pr_err("failed to open %s for"
- " superblock update during re-add\n", dv->devname);
+ pr_err("failed to open %s for superblock update during re-add\n", dv->devname);
return -1;
}
rv = dev_st->ss->store_super(dev_st, tfd);
close(tfd);
if (rv != 0) {
- pr_err("failed to update"
- " superblock during re-add\n");
+ pr_err("failed to update superblock during re-add\n");
return -1;
}
}
if (tst->ss == &super0 && ldsize > 4ULL*1024*1024*1024*1024) {
/* More than 4TB is wasted on v0.90 */
if (!force) {
- pr_err("%s is larger than %s can "
- "effectively use.\n"
- " Add --force is you "
- "really want to add this device.\n",
+ pr_err("%s is larger than %s can effectively use.\n"
+ " Add --force is you really want to add this device.\n",
dv->devname, devname);
return -1;
}
- pr_err("%s is larger than %s can "
- "effectively use.\n"
- " Adding anyway as --force "
- "was given.\n",
+ pr_err("%s is larger than %s can effectively use.\n"
+ " Adding anyway as --force was given.\n",
dv->devname, devname);
}
if (!tst->ss->external &&
container_fd = open_dev_excl(devnm);
if (container_fd < 0) {
- pr_err("add failed for %s:"
- " could not get exclusive access to container\n",
+ pr_err("add failed for %s: could not get exclusive access to container\n",
dv->devname);
tst->ss->free_super(tst);
return -1;
* would block add_disk */
tst->ss->free_super(tst);
if (sysfs_add_disk(sra, &new_mdi, 0) != 0) {
- pr_err("add new device to external metadata"
- " failed for %s\n", dv->devname);
+ pr_err("add new device to external metadata failed for %s\n", dv->devname);
close(container_fd);
sysfs_free(sra);
return -1;
strcpy(devnm, fd2devnm(fd));
lfd = open_dev_excl(devnm);
if (lfd < 0) {
- pr_err("Cannot get exclusive access "
- " to container - odd\n");
+ pr_err("Cannot get exclusive access to container - odd\n");
return -1;
}
/* We may not be able to check on holders in
}
}
if (err) {
- pr_err("hot remove failed "
- "for %s: %s\n", dv->devname,
+ pr_err("hot remove failed for %s: %s\n", dv->devname,
strerror(errno));
if (lfd >= 0)
close(lfd);
strcmp(dv->devname, "faulty") == 0) {
if (dv->disposition != 'A'
&& dv->disposition != 'r') {
- pr_err("%s only meaningful "
- "with -r or --re-add, not -%c\n",
+ pr_err("%s only meaningful with -r or --re-add, not -%c\n",
dv->devname, dv->disposition);
goto abort;
}
}
if (strcmp(dv->devname, "detached") == 0) {
if (dv->disposition != 'r' && dv->disposition != 'f') {
- pr_err("%s only meaningful "
- "with -r of -f, not -%c\n",
+ pr_err("%s only meaningful with -r of -f, not -%c\n",
dv->devname, dv->disposition);
goto abort;
}
struct mddev_dev *add_devlist = NULL;
struct mddev_dev **dp;
if (dv->disposition != 'A') {
- pr_err("'missing' only meaningful "
- "with --re-add\n");
+ pr_err("'missing' only meaningful with --re-add\n");
goto abort;
}
add_devlist = conf_get_devs();
int found = 0;
char dname[55];
if (dv->disposition != 'r' && dv->disposition != 'f') {
- pr_err("%s only meaningful "
- "with -r or -f, not -%c\n",
+ pr_err("%s only meaningful with -r or -f, not -%c\n",
dv->devname, dv->disposition);
goto abort;
}
if (!found) {
sysfd = sysfs_open(fd2devnm(fd), dname, "state");
if (sysfd < 0) {
- pr_err("%s does not appear "
- "to be a component of %s\n",
+ pr_err("%s does not appear to be a component of %s\n",
dv->devname, devname);
goto abort;
}
case 'F': /* --re-add faulty */
/* add the device */
if (subarray) {
- pr_err("Cannot add disks to a"
- " \'member\' array, perform this"
- " operation on the parent container\n");
+ pr_err("Cannot add disks to a \'member\' array, perform this operation on the parent container\n");
goto abort;
}
if (dv->disposition == 'F')
case 'r':
/* hot remove */
if (subarray) {
- pr_err("Cannot remove disks from a"
- " \'member\' array, perform this"
- " operation on the parent container\n");
+ pr_err("Cannot remove disks from a \'member\' array, perform this operation on the parent container\n");
rv = -1;
} else
rv = Manage_remove(tst, fd, dv, sysfd,
break;
case 'R': /* Mark as replaceable */
if (subarray) {
- pr_err("Cannot replace disks in a"
- " \'member\' array, perform this"
- " operation on the parent container\n");
+ pr_err("Cannot replace disks in a \'member\' array, perform this operation on the parent container\n");
rv = -1;
} else {
if (!frozen) {
rv = stat(dir, &buf);
if (rv != -1) {
if (scan) {
- pr_err("Only one "
- "autorebuild process allowed"
- " in scan mode, aborting\n");
+ pr_err("Only one autorebuild process allowed in scan mode, aborting\n");
fclose(fp);
return 1;
} else {
- pr_err("Warning: One"
- " autorebuild process already"
- " running.\n");
+ pr_err("Warning: One autorebuild process already running.\n");
}
}
fclose(fp);
if (scan) {
if (mkdir(MDMON_DIR, S_IRWXU) < 0 &&
errno != EEXIST) {
- pr_err("Can't create "
- "autorebuild.pid file\n");
+ pr_err("Can't create autorebuild.pid file\n");
} else {
fp = fopen(path, "w");
if (!fp)
- pr_err("Cannot create"
- " autorebuild.pid"
- "file\n");
+ pr_err("Cannot create autorebuild.pidfile\n");
else {
pid = getpid();
fprintf(fp, "%d\n", pid);
event, dev, hname);
fprintf(mp,
- "This is an automatically generated"
- " mail message from %s\n", Name);
+ "This is an automatically generated mail message from %s\n", Name);
fprintf(mp, "running on %s\n\n", hname);
fprintf(mp,
- "A %s event had been detected on"
- " md device %s.\n\n", event, dev);
+ "A %s event had been detected on md device %s.\n\n", event, dev);
if (disc && disc[0] != ' ')
fprintf(mp,
- "It could be related to"
- " component device %s.\n\n", disc);
+ "It could be related to component device %s.\n\n", disc);
if (disc && disc[0] == ' ')
fprintf(mp, "Extra information:%s.\n\n", disc);
char buf[8192];
int n;
fprintf(mp,
- "\nP.S. The /proc/mdstat file"
- " currently contains the following:\n\n");
+ "\nP.S. The /proc/mdstat file currently contains the following:\n\n");
while ( (n=fread(buf, 1, sizeof(buf), mdstat)) > 0)
n=fwrite(buf, 1, n, mp);
fclose(mdstat);
if (disc)
syslog(priority,
- "%s event detected on md device %s,"
- " component device %s", event, dev, disc);
+ "%s event detected on md device %s, component device %s", event, dev, disc);
else
syslog(priority,
"%s event detected on md device %s",
mdi = sysfs_read(fd, devnm, GET_VERSION|GET_LEVEL|GET_SAFEMODE);
if (!mdi) {
if (verbose)
- pr_err("Failed to read sysfs attributes for "
- "%s\n", dev);
+ pr_err("Failed to read sysfs attributes for %s\n", dev);
close(fd);
return 0;
}
info = xmalloc(sizeof(*info));
if (n < sizeof(info->sb)) {
- pr_err("failed to read superblock of bitmap "
- "file: %s\n", strerror(errno));
+ pr_err("failed to read superblock of bitmap file: %s\n", strerror(errno));
free(info);
free(buf);
return NULL;
}
if (read_bits < total_bits) { /* file truncated... */
- pr_err("WARNING: bitmap file is not large "
- "enough for array size %llu!\n\n",
+ pr_err("WARNING: bitmap file is not large enough for array size %llu!\n\n",
(unsigned long long)info->sb.sync_size);
total_bits = read_bits;
}
) {
/* This is acceptable */;
if (mis.devname)
- pr_err("only give one "
- "device per ARRAY line: %s and %s\n",
+ pr_err("only give one device per ARRAY line: %s and %s\n",
mis.devname, w);
else
mis.devname = w;
}else {
- pr_err("%s is an invalid name for "
- "an md device - ignored.\n", w);
+ pr_err("%s is an invalid name for an md device - ignored.\n", w);
}
} else if (strncasecmp(w, "uuid=", 5)==0 ) {
if (mis.uuid_set)
!array_list->devices &&
array_list->super_minor == UnSet) {
if (verbose >= 2 && array_list->devname)
- pr_err("%s doesn't have any identifying"
- " information.\n",
+ pr_err("%s doesn't have any identifying information.\n",
array_list->devname);
continue;
}
if (match) {
if (verbose >= 0) {
if (match->devname && array_list->devname)
- pr_err("we match both %s and %s - "
- "cannot decide which to use.\n",
+ pr_err("we match both %s and %s - cannot decide which to use.\n",
match->devname,
array_list->devname);
else
- pr_err("multiple lines in mdadm.conf"
- " match\n");
+ pr_err("multiple lines in mdadm.conf match\n");
}
if (rvp)
*rvp = 2;
"%s have the same name: %s\n",
nbuf, a1->devname);
} else
- pr_err("Device %s given twice"
- " in config file\n", a1->devname);
+ pr_err("Device %s given twice in config file\n", a1->devname);
return 1;
}
}
}
if (devs_found > 0 && mode == MANAGE && !devmode) {
- pr_err("Must give one of -a/-r/-f"
- " for subsequent devices at %s\n", optarg);
+ pr_err("Must give one of -a/-r/-f for subsequent devices at %s\n", optarg);
exit(2);
}
if (devs_found > 0 && mode == GROW && !devmode) {
- pr_err("Must give -a/--add for"
- " devices to add: %s\n", optarg);
+ pr_err("Must give -a/--add for devices to add: %s\n", optarg);
exit(2);
}
dv = xmalloc(sizeof(*dv));
case O(BUILD,'c'): /* chunk or rounding */
case O(BUILD,ChunkSize): /* chunk or rounding */
if (s.chunk) {
- pr_err("chunk/rounding may only be specified once. "
- "Second value is %s.\n", optarg);
+ pr_err("chunk/rounding may only be specified once. Second value is %s.\n", optarg);
exit(2);
}
s.chunk = parse_size(optarg);
case O(CREATE,'z'):
case O(BUILD,'z'): /* size */
if (s.size > 0) {
- pr_err("size may only be specified once. "
- "Second value is %s.\n", optarg);
+ pr_err("size may only be specified once. Second value is %s.\n", optarg);
exit(2);
}
if (strcmp(optarg, "max")==0)
case O(GROW,'Z'): /* array size */
if (array_size > 0) {
- pr_err("array-size may only be specified once. "
- "Second value is %s.\n", optarg);
+ pr_err("array-size may only be specified once. Second value is %s.\n", optarg);
exit(2);
}
if (strcmp(optarg, "max") == 0)
case O(CREATE,DataOffset):
case O(GROW,DataOffset):
if (data_offset != INVALID_SECTORS) {
- pr_err("data-offset may only be specified one. "
- "Second value is %s.\n", optarg);
+ pr_err("data-offset may only be specified one. Second value is %s.\n", optarg);
exit(2);
}
if (mode == CREATE &&
case O(CREATE,'l'):
case O(BUILD,'l'): /* set raid level*/
if (s.level != UnSet) {
- pr_err("raid level may only be set once. "
- "Second value is %s.\n", optarg);
+ pr_err("raid level may only be set once. Second value is %s.\n", optarg);
exit(2);
}
s.level = map_name(pers, optarg);
case O(GROW, 'p'): /* new layout */
case O(GROW, Layout):
if (s.layout_str) {
- pr_err("layout may only be sent once. "
- "Second value was %s\n", optarg);
+ pr_err("layout may only be sent once. Second value was %s\n", optarg);
exit(2);
}
s.layout_str = optarg;
case O(BUILD,'p'): /* faulty layout */
case O(BUILD,Layout):
if (s.layout != UnSet) {
- pr_err("layout may only be sent once. "
- "Second value was %s\n", optarg);
+ pr_err("layout may only be sent once. Second value was %s\n", optarg);
exit(2);
}
switch(s.level) {
case O(CREATE,'u'): /* uuid of array */
case O(ASSEMBLE,'u'): /* uuid of array */
if (ident.uuid_set) {
- pr_err("uuid cannot be set twice. "
- "Second value %s.\n", optarg);
+ pr_err("uuid cannot be set twice. Second value %s.\n", optarg);
exit(2);
}
if (parse_uuid(optarg, ident.uuid))
case O(ASSEMBLE,'N'):
case O(MISC,'N'):
if (ident.name[0]) {
- pr_err("name cannot be set twice. "
- "Second value %s.\n", optarg);
+ pr_err("name cannot be set twice. Second value %s.\n", optarg);
exit(2);
}
if (mode == MISC && !c.subarray) {
case O(ASSEMBLE,'m'): /* super-minor for array */
case O(ASSEMBLE,SuperMinor):
if (ident.super_minor != UnSet) {
- pr_err("super-minor cannot be set twice. "
- "Second value: %s.\n", optarg);
+ pr_err("super-minor cannot be set twice. Second value: %s.\n", optarg);
exit(2);
}
if (strcmp(optarg, "dev")==0)
case O(ASSEMBLE,'U'): /* update the superblock */
case O(MISC,'U'):
if (c.update) {
- pr_err("Can only update one aspect"
- " of superblock, both %s and %s given.\n",
+ pr_err("Can only update one aspect of superblock, both %s and %s given.\n",
c.update, optarg);
exit(2);
}
if (mode == MISC && !c.subarray) {
- pr_err("Only subarrays can be"
- " updated in misc mode\n");
+ pr_err("Only subarrays can be updated in misc mode\n");
exit(2);
}
c.update = optarg;
continue;
if (strcmp(c.update, "byteorder")==0) {
if (ss) {
- pr_err("must not set metadata"
- " type with --update=byteorder.\n");
+ pr_err("must not set metadata type with --update=byteorder.\n");
exit(2);
}
for(i=0; !ss && superlist[i]; i++)
ss = superlist[i]->match_metadata_desc(
"0.swap");
if (!ss) {
- pr_err("INTERNAL ERROR"
- " cannot find 0.swap\n");
+ pr_err("INTERNAL ERROR cannot find 0.swap\n");
exit(2);
}
case O(MANAGE,'U'):
/* update=devicesize is allowed with --re-add */
if (devmode != 'A') {
- pr_err("--update in Manage mode only"
- " allowed with --re-add.\n");
+ pr_err("--update in Manage mode only allowed with --re-add.\n");
exit(1);
}
if (c.update) {
- pr_err("Can only update one aspect"
- " of superblock, both %s and %s given.\n",
+ pr_err("Can only update one aspect of superblock, both %s and %s given.\n",
c.update, optarg);
exit(2);
}
if (strcmp(c.update, "devicesize") != 0 &&
strcmp(c.update, "bbl") != 0 &&
strcmp(c.update, "no-bbl") != 0) {
- pr_err("only 'devicesize', 'bbl' and 'no-bbl' can be"
- " updated with --re-add\n");
+ pr_err("only 'devicesize', 'bbl' and 'no-bbl' can be updated with --re-add\n");
exit(2);
}
continue;
case O(MONITOR,ConfigFile):
case O(CREATE,ConfigFile):
if (configfile) {
- pr_err("configfile cannot be set twice. "
- "Second value is %s.\n", optarg);
+ pr_err("configfile cannot be set twice. Second value is %s.\n", optarg);
exit(2);
}
configfile = optarg;
case O(MISC ,Action):
if (opt == KillSubarray || opt == UpdateSubarray) {
if (c.subarray) {
- pr_err("subarray can only"
- " be specified once\n");
+ pr_err("subarray can only be specified once\n");
exit(2);
}
c.subarray = optarg;
continue;
case O(MISC, UdevRules):
if (devmode && devmode != opt) {
- pr_err("--udev-rules must"
- " be the only option.\n");
+ pr_err("--udev-rules must be the only option.\n");
} else {
if (udev_filename)
- pr_err("only specify one udev "
- "rule filename. %s ignored.\n",
+ pr_err("only specify one udev rule filename. %s ignored.\n",
optarg);
else
udev_filename = optarg;
/* non-existent device is OK */
mdfd = open_mddev(devlist->devname, 0);
if (mdfd == -2) {
- pr_err("device %s exists but is not an "
- "md array.\n", devlist->devname);
+ pr_err("device %s exists but is not an md array.\n", devlist->devname);
exit(1);
}
if ((int)ident.super_minor == -2) {
struct stat stb;
if (mdfd < 0) {
- pr_err("--super-minor=dev given, and "
- "listed device %s doesn't exist.\n",
+ pr_err("--super-minor=dev given, and listed device %s doesn't exist.\n",
devlist->devname);
exit(1);
}
struct mdinfo sra;
int err;
if (s.raiddisks || s.level != UnSet) {
- pr_err("cannot change array size in same operation "
- "as changing raiddisks or level.\n"
+ pr_err("cannot change array size in same operation as changing raiddisks or level.\n"
" Change size first, then check that data is still intact.\n");
rv = 1;
break;
err = sysfs_set_num(&sra, NULL, "array_size", array_size / 2);
if (err < 0) {
if (errno == E2BIG)
- pr_err("--array-size setting"
- " is too large.\n");
+ pr_err("--array-size setting is too large.\n");
else
- pr_err("current kernel does"
- " not support setting --array-size\n");
+ pr_err("current kernel does not support setting --array-size\n");
rv = 1;
break;
}
if (devs_found > 1 && s.raiddisks == 0 && s.level == UnSet) {
/* must be '-a'. */
if (s.size > 0 || s.chunk || s.layout_str != NULL || s.bitmap_file) {
- pr_err("--add cannot be used with "
- "other geometry changes in --grow mode\n");
+ pr_err("--add cannot be used with other geometry changes in --grow mode\n");
rv = 1;
break;
}
} else if (s.bitmap_file) {
if (s.size > 0 || s.raiddisks || s.chunk ||
s.layout_str != NULL || devs_found > 1) {
- pr_err("--bitmap changes cannot be "
- "used with other geometry changes "
- "in --grow mode\n");
+ pr_err("--bitmap changes cannot be used with other geometry changes in --grow mode\n");
rv = 1;
break;
}
int failures, successes;
if (conf_verify_devnames(array_list)) {
- pr_err("Duplicate MD device names in "
- "conf file were found.\n");
+ pr_err("Duplicate MD device names in conf file were found.\n");
return 1;
}
if (devlist == NULL) {
/* name *must* be mdXX or md_dXX in this context */
if (num < 0 ||
(strcmp(cname, "md") != 0 && strcmp(cname, "md_d") != 0)) {
- pr_err("%s is an invalid name "
- "for an md device. Try /dev/md/%s\n",
+ pr_err("%s is an invalid name for an md device. Try /dev/md/%s\n",
dev, dev+5);
return -1;
}
* empty.
*/
if (strchr(cname, '/') != NULL) {
- pr_err("%s is an invalid name "
- "for an md device.\n", dev);
+ pr_err("%s is an invalid name for an md device.\n", dev);
return -1;
}
if (cname[0] == 0) {
- pr_err("%s is an invalid name "
- "for an md device (empty!).", dev);
+ pr_err("%s is an invalid name for an md device (empty!).", dev);
return -1;
}
if (num < 0) {
if (name && name[0] == 0)
name = NULL;
if (name && trustworthy == METADATA && use_mdp == 1) {
- pr_err("%s is not allowed for a %s container. "
- "Consider /dev/md%d.\n", dev, name, num);
+ pr_err("%s is not allowed for a %s container. Consider /dev/md%d.\n", dev, name, num);
return -1;
}
if (name && trustworthy == METADATA)
if (md_get_version(mdfd) <= 0) {
close(mdfd);
if (report_errors)
- pr_err("%s does not appear to be "
- "an md device\n", dev);
+ pr_err("%s does not appear to be an md device\n", dev);
return -2;
}
return mdfd;
static inline char *guid_str(char *buf, struct efi_guid guid)
{
- sprintf(buf, "%02x%02x%02x%02x-%02x%02x-%02x%02x-"
- "%02x%02x-%02x%02x%02x%02x%02x%02x",
+ sprintf(buf, "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",
guid.b[3], guid.b[2], guid.b[1], guid.b[0],
guid.b[5], guid.b[4], guid.b[7], guid.b[6],
guid.b[8], guid.b[9], guid.b[10], guid.b[11],
FILE *f = NULL;
if (mkdir(FAILED_SLOTS_DIR, S_IRWXU) < 0 && errno != EEXIST) {
- pr_err("can't create file to save path "
- "to old disk: %s\n", strerror(errno));
+ pr_err("can't create file to save path to old disk: %s\n", strerror(errno));
return;
}
snprintf(path, PATH_MAX, FAILED_SLOTS_DIR "/%s", id_path);
f = fopen(path, "w");
if (!f) {
- pr_err("can't create file to"
- " save path to old disk: %s\n",
+ pr_err("can't create file to save path to old disk: %s\n",
strerror(errno));
return;
}
array->metadata,
array->uuid[0], array->uuid[1],
array->uuid[2], array->uuid[3]) <= 0)
- pr_err("Failed to write to "
- "<id_path> cookie\n");
+ pr_err("Failed to write to <id_path> cookie\n");
fclose(f);
}
raid_disks, chunk_size, level, layout,
start, length, disk_name, repair, failed_disk1, failed_disk2);
if (rv != 0) {
- fprintf(stderr,
- "%s: check_stripes returned %d\n", prg, rv);
+ fprintf(stderr, "%s: check_stripes returned %d\n", prg, rv);
exit_err = 7;
goto exitHere;
}
char *err = NULL;
if (argc < 10) {
- fprintf(stderr, "Usage: test_stripe save/restore file raid_disks"
- " chunk_size level layout start length devices...\n");
+ fprintf(stderr, "Usage: test_stripe save/restore file raid_disks chunk_size level layout start length devices...\n");
exit(1);
}
if (strcmp(argv[1], "save")==0)
if (memcmp(super->anchor.revision, DDF_REVISION_0, 8) != 0 &&
memcmp(super->anchor.revision, DDF_REVISION_2, 8) != 0) {
if (devname)
- pr_err("can only support super revision"
- " %.8s and earlier, not %.8s on %s\n",
+ pr_err("can only support super revision %.8s and earlier, not %.8s on %s\n",
DDF_REVISION_2, super->anchor.revision,devname);
return 2;
}
dsize >> 9, 1,
&super->primary, &super->anchor) == 0) {
if (devname)
- pr_err("Failed to load primary DDF header "
- "on %s\n", devname);
+ pr_err("Failed to load primary DDF header on %s\n", devname);
} else
super->active = &super->primary;
/* 32M is a lower bound */
if (dsize <= 32*1024*1024) {
if (devname)
- pr_err("%s is too small for ddf: "
- "size is %llu sectors.\n",
+ pr_err("%s is too small for ddf: size is %llu sectors.\n",
devname, dsize>>9);
return 1;
}
if (dsize & 511) {
if (devname)
- pr_err("%s is an odd size for ddf: "
- "size is %llu bytes.\n",
+ pr_err("%s is an odd size for ddf: size is %llu bytes.\n",
devname, dsize);
return 1;
}
if (rv) {
if (devname)
- pr_err("Failed to load all information "
- "sections on %s\n", devname);
+ pr_err("Failed to load all information sections on %s\n", devname);
free(super);
return rv;
}
if (rv) {
if (devname)
- pr_err("Failed to load all information "
- "sections on %s\n", devname);
+ pr_err("Failed to load all information sections on %s\n", devname);
free(super);
return rv;
}
close(fd);
/* Just a bare device, no good to us */
if (verbose)
- pr_err("ddf: Cannot create this array "
- "on device %s - a container is required.\n",
+ pr_err("ddf: Cannot create this array on device %s - a container is required.\n",
dev);
return 0;
}
}
if (dcnt < raiddisks) {
if (verbose)
- pr_err("ddf: Not enough devices with "
- "space for this array (%d < %d)\n",
+ pr_err("ddf: Not enough devices with space for this array (%d < %d)\n",
dcnt, raiddisks);
return 0;
}
}
if (!dl) {
if (verbose)
- pr_err("ddf: %s is not in the "
- "same DDF set\n",
+ pr_err("ddf: %s is not in the same DDF set\n",
dev);
return 0;
}
list = find_intel_devices();
if (!list) {
if (verbose > 0)
- pr_err("no active Intel(R) RAID "
- "controller found.\n");
+ pr_err("no active Intel(R) RAID controller found.\n");
return 2;
} else if (verbose > 0)
print_found_intel_controllers(list);
host_base = ahci_get_port_count(hba->path, &port_count);
if (ahci_enumerate_ports(hba->path, port_count, host_base, verbose)) {
if (verbose > 0)
- pr_err("failed to enumerate "
- "ports on SATA controller at %s.\n", hba->pci_id);
+ pr_err("failed to enumerate ports on SATA controller at %s.\n", hba->pci_id);
result |= 2;
}
}
info->reshape_progress = blocks_per_unit * units;
- dprintf("IMSM: General Migration checkpoint : %llu "
- "(%llu) -> read reshape progress : %llu\n",
+ dprintf("IMSM: General Migration checkpoint : %llu (%llu) -> read reshape progress : %llu\n",
(unsigned long long)units,
(unsigned long long)blocks_per_unit,
info->reshape_progress);
if (posix_memalign((void**)&anchor, 512, 512) != 0) {
if (devname)
- pr_err("Failed to allocate imsm anchor buffer"
- " on %s\n", devname);
+ pr_err("Failed to allocate imsm anchor buffer on %s\n", devname);
return 1;
}
if (read(fd, anchor, 512) != 512) {
if (devname) {
struct intel_hba *hba = super->hba;
- pr_err("%s is attached to Intel(R) %s RAID "
- "controller (%s),\n"
- " but the container is assigned to Intel(R) "
- "%s RAID controller (",
+ pr_err("%s is attached to Intel(R) %s RAID controller (%s),\n"
+ " but the container is assigned to Intel(R) %s RAID controller (",
devname,
get_sys_dev_type(hba_name->type),
hba_name->pci_id ? : "Err!",
hba = hba->next;
}
fprintf(stderr, ").\n"
- " Mixing devices attached to different controllers "
- "is not allowed.\n");
+ " Mixing devices attached to different controllers is not allowed.\n");
}
return 2;
}
champion = s;
if (conflict)
- pr_err("Chose family %#x on '%s', "
- "assemble conflicts to new container with '--update=uuid'\n",
+ pr_err("Chose family %#x on '%s', assemble conflicts to new container with '--update=uuid'\n",
__le32_to_cpu(s->anchor->family_num), s->disks->devname);
/* collect all dl's onto 'champion', and update them to
if (rv) {
if (devname)
- pr_err("Failed to load all information "
- "sections on %s\n", devname);
+ pr_err("Failed to load all information sections on %s\n", devname);
free_imsm(super);
return rv;
}
unsigned long long num_data_stripes;
if (super->orom && mpb->num_raid_devs >= super->orom->vpa) {
- pr_err("This imsm-container already has the "
- "maximum of %d volumes\n", super->orom->vpa);
+ pr_err("This imsm-container already has the maximum of %d volumes\n", super->orom->vpa);
return 0;
}
if (info->level == 1 && info->raid_disks > 2) {
free(dev);
free(dv);
- pr_err("imsm does not support more than 2 disks"
- "in a raid1 volume\n");
+ pr_err("imsm does not support more than 2 disksin a raid1 volume\n");
return 0;
}
if (super->orom) {
if (raiddisks > super->orom->tds) {
if (verbose)
- pr_err("%d exceeds maximum number of"
- " platform supported disks: %d\n",
+ pr_err("%d exceeds maximum number of platform supported disks: %d\n",
raiddisks, super->orom->tds);
free_imsm(super);
return 0;
*chunk = imsm_default_chunk(super->orom);
if (super->orom && !imsm_orom_has_chunk(super->orom, *chunk)) {
- pr_vrb(": platform does not support a chunk size of: "
- "%d\n", *chunk);
+ pr_vrb(": platform does not support a chunk size of: %d\n", *chunk);
return 0;
}
mpb = super->anchor;
if (!validate_geometry_imsm_orom(super, level, layout, raiddisks, chunk, size, verbose)) {
- pr_err("RAID gemetry validation failed. "
- "Cannot proceed with the action(s).\n");
+ pr_err("RAID gemetry validation failed. Cannot proceed with the action(s).\n");
return 0;
}
if (!dev) {
}
if (dcnt < raiddisks) {
if (verbose)
- pr_err("imsm: Not enough "
- "devices with space for this array "
- "(%d < %d)\n",
+ pr_err("imsm: Not enough devices with space for this array (%d < %d)\n",
dcnt, raiddisks);
return 0;
}
}
if (!dl) {
if (verbose)
- pr_err("%s is not in the "
- "same imsm set\n", dev);
+ pr_err("%s is not in the same imsm set\n", dev);
return 0;
} else if (super->orom && dl->index < 0 && mpb->num_raid_devs) {
/* If a volume is present then the current creation attempt
* understand this configuration (all member disks must be
* members of each array in the container).
*/
- pr_err("%s is a spare and a volume"
- " is already defined for this container\n", dev);
- pr_err("The option-rom requires all member"
- " disks to be a member of all volumes\n");
+ pr_err("%s is a spare and a volume is already defined for this container\n", dev);
+ pr_err("The option-rom requires all member disks to be a member of all volumes\n");
return 0;
} else if (super->orom && mpb->num_raid_devs > 0 &&
mpb->num_disks != raiddisks) {
- pr_err("The option-rom requires all member"
- " disks to be a member of all volumes\n");
+ pr_err("The option-rom requires all member disks to be a member of all volumes\n");
return 0;
}
if (!check_env("IMSM_NO_PLATFORM") &&
mpb->num_raid_devs > 0 && size && size != maxsize) {
- pr_err("attempting to create a second "
- "volume with size less then remaining space. "
- "Aborting...\n");
+ pr_err("attempting to create a second volume with size less then remaining space. Aborting...\n");
return 0;
}
if (maxsize < size || maxsize == 0) {
if (verbose) {
if (maxsize == 0)
- pr_err("no free space"
- " left on device. Aborting...\n");
+ pr_err("no free space left on device. Aborting...\n");
else
- pr_err("not enough space"
- " to create volume of given size"
- " (%llu < %llu). Aborting...\n",
+ pr_err("not enough space to create volume of given size (%llu < %llu). Aborting...\n",
maxsize, size);
}
return 0;
}
if (!check_env("IMSM_NO_PLATFORM") &&
mpb->num_raid_devs > 0 && size && size != maxsize) {
- pr_err("attempting to create a second "
- "volume with size less then remaining space. "
- "Aborting...\n");
+ pr_err("attempting to create a second volume with size less then remaining space. Aborting...\n");
return 0;
}
cnt = 0;
count = count_volumes(super->hba->path,
super->orom->dpa, verbose);
if (super->orom->vphba <= count) {
- pr_vrb(": platform does not support more"
- " than %d raid volumes.\n",
+ pr_vrb(": platform does not support more than %d raid volumes.\n",
super->orom->vphba);
return 0;
}
/* do not assemble arrays when not all attributes are supported */
if (imsm_check_attributes(mpb->attributes) == 0) {
sb_errors = 1;
- pr_err("Unsupported attributes in IMSM metadata."
- "Arrays activation is blocked.\n");
+ pr_err("Unsupported attributes in IMSM metadata.Arrays activation is blocked.\n");
}
/* check for bad blocks */
if (imsm_bbm_log_size(super->anchor)) {
- pr_err("BBM log found in IMSM metadata."
- "Arrays activation is blocked.\n");
+ pr_err("BBM log found in IMSM metadata.Arrays activation is blocked.\n");
sb_errors = 1;
}
*/
if (dev->vol.migr_state &&
(migr_type(dev) == MIGR_STATE_CHANGE)) {
- pr_err("cannot assemble volume '%.16s':"
- " unsupported migration in progress\n",
+ pr_err("cannot assemble volume '%.16s': unsupported migration in progress\n",
dev->volume);
continue;
}
map->num_members, /* raid disks */
&chunk, join_u32(dev->size_low, dev->size_high),
1 /* verbose */)) {
- pr_err("IMSM RAID geometry validation"
- " failed. Array %s activation is blocked.\n",
+ pr_err("IMSM RAID geometry validation failed. Array %s activation is blocked.\n",
dev->volume);
this->array.state |=
(1<<MD_SB_BLOCK_CONTAINER_RESHAPE) |
/* Cannot activate another spare if rebuild is in progress already
*/
if (is_rebuilding(dev)) {
- dprintf("imsm: No spare activation allowed. "
- "Rebuild in progress already.\n");
+ dprintf("imsm: No spare activation allowed. Rebuild in progress already.\n");
return NULL;
}
* are removed from container.
*/
if (failed) {
- dprintf("found failed disks in %.*s, check if there another"
- "failed sub-array.\n",
+ dprintf("found failed disks in %.*s, check if there anotherfailed sub-array.\n",
MAX_RAID_SERIAL_LEN, dev->volume);
/* check if states of the other volumes allow for rebuild */
for (i = 0; i < super->anchor->num_raid_devs; i++) {
new_disk = get_disk_super(super,
major(u->new_disks[0]),
minor(u->new_disks[0]));
- dprintf("imsm: new disk for reshape is: %i:%i "
- "(%p, index = %i)\n",
+ dprintf("imsm: new disk for reshape is: %i:%i (%p, index = %i)\n",
major(u->new_disks[0]),
minor(u->new_disks[0]),
new_disk, new_disk->index);
break;
if (!dl) {
- pr_err("error: imsm_activate_spare passed "
- "an unknown disk (index: %d)\n",
+ pr_err("error: imsm_activate_spare passed an unknown disk (index: %d)\n",
u->dl->index);
return 0;
}
new_disk = get_disk_super(super,
major(u->new_disks[i]),
minor(u->new_disks[i]));
- dprintf("imsm: new disk for reshape is: %i:%i "
- "(%p, index = %i)\n",
+ dprintf("imsm: new disk for reshape is: %i:%i (%p, index = %i)\n",
major(u->new_disks[i]), minor(u->new_disks[i]),
new_disk, new_disk->index);
if ((new_disk == NULL) ||
break;
}
default:
- pr_err("error: unsuported process update type:"
- "(type: %d)\n", type);
+ pr_err("error: unsuported process update type:(type: %d)\n", type);
}
}
unsigned long long curr_migr_unit;
if (load_imsm_migr_rec(super, info) != 0) {
- dprintf("imsm: ERROR: Cannot read migration record "
- "for checkpoint save.\n");
+ dprintf("imsm: ERROR: Cannot read migration record for checkpoint save.\n");
return 1;
}
__cpu_to_le32(curr_migr_unit *
__le32_to_cpu(super->migr_rec->dest_depth_per_unit));
if (write_imsm_migr_rec(st) < 0) {
- dprintf("imsm: Cannot write migration record "
- "outside backup area\n");
+ dprintf("imsm: Cannot write migration record outside backup area\n");
return 1;
}
new_disks,
super,
id->dev)) {
- pr_err("Cannot restore data from backup."
- " Too many failed disks\n");
+ pr_err("Cannot restore data from backup. Too many failed disks\n");
goto abort;
}
if (save_checkpoint_imsm(st, info, UNIT_SRC_NORMAL)) {
/* ignore error == 2, this can mean end of reshape here
*/
- dprintf("imsm: Cannot write checkpoint to "
- "migration record (UNIT_SRC_NORMAL) during restart\n");
+ dprintf("imsm: Cannot write checkpoint to migration record (UNIT_SRC_NORMAL) during restart\n");
} else
retval = 0;
struct mdinfo *info, *member;
int devices_that_can_grow = 0;
- dprintf("imsm: imsm_reshape_is_allowed_on_container(ENTER): "
- "st->devnm = (%s)\n", st->devnm);
+ dprintf("imsm: imsm_reshape_is_allowed_on_container(ENTER): st->devnm = (%s)\n", st->devnm);
if (geo->size > 0 ||
geo->level != UnSet ||
geo->layout != UnSet ||
geo->chunksize != 0 ||
geo->raid_disks == UnSet) {
- dprintf("imsm: Container operation is allowed for "
- "raid disks number change only.\n");
+ dprintf("imsm: Container operation is allowed for raid disks number change only.\n");
return ret_val;
}
if (direction == ROLLBACK_METADATA_CHANGES) {
- dprintf("imsm: Metadata changes rollback is not supported for "
- "container operation.\n");
+ dprintf("imsm: Metadata changes rollback is not supported for container operation.\n");
return ret_val;
}
/* we work on container for Online Capacity Expansion
* only so raid_disks has to grow
*/
- dprintf("imsm: for container operation raid disks "
- "increase is required\n");
+ dprintf("imsm: for container operation raid disks increase is required\n");
break;
}
(info->array.level != 5)) {
/* we cannot use this container with other raid level
*/
- dprintf("imsm: for container operation wrong"
- " raid level (%i) detected\n",
+ dprintf("imsm: for container operation wrong raid level (%i) detected\n",
info->array.level);
break;
} else {
if (!is_raid_level_supported(super->orom,
member->array.level,
geo->raid_disks)) {
- dprintf("platform does not support raid%d with"
- " %d disk%s\n",
+ dprintf("platform does not support raid%d with %d disk%s\n",
info->array.level,
geo->raid_disks,
geo->raid_disks > 1 ? "s" : "");
*/
if (info->component_size %
(info->array.chunk_size/512)) {
- dprintf("Component size is not aligned to "
- "chunk size\n");
+ dprintf("Component size is not aligned to chunk size\n");
break;
}
}
if (spares == NULL
|| delta_disks > spares->array.spare_disks) {
- pr_err("imsm: ERROR: Cannot get spare devices "
- "for %s.\n", geo->dev_name);
+ pr_err("imsm: ERROR: Cannot get spare devices for %s.\n", geo->dev_name);
i = -1;
goto abort;
}
if (geo->chunksize != current_chunk_size) {
u->new_chunksize = geo->chunksize / 1024;
- dprintf("imsm: "
- "chunk size change from %i to %i\n",
+ dprintf("imsm: chunk size change from %i to %i\n",
current_chunk_size, u->new_chunksize);
}
previous_level = map->raid_level;
free(u);
sysfs_free(spares);
update_memory_size = 0;
- dprintf("error: cannot get spare device "
- "for requested migration");
+ dprintf("error: cannot get spare device for requested migration");
return 0;
}
sysfs_free(spares);
if (geo->level == 5) {
change = CH_MIGRATION;
if (geo->layout != ALGORITHM_LEFT_ASYMMETRIC) {
- pr_err("Error. Requested Layout "
- "not supported (left-asymmetric layout "
- "is supported only)!\n");
+ pr_err("Error. Requested Layout not supported (left-asymmetric layout is supported only)!\n");
change = -1;
goto analyse_change_exit;
}
break;
}
if (change == -1) {
- pr_err("Error. Level Migration from %d to %d "
- "not supported!\n",
+ pr_err("Error. Level Migration from %d to %d not supported!\n",
info.array.level, geo->level);
goto analyse_change_exit;
}
geo->layout = 0;
geo->level = 5;
} else {
- pr_err("Error. Layout Migration from %d to %d "
- "not supported!\n",
+ pr_err("Error. Layout Migration from %d to %d not supported!\n",
info.array.layout, geo->layout);
change = -1;
goto analyse_change_exit;
chunk * 1024,
geo->size * 2);
if (geo->size == 0) {
- pr_err("Error. Size expansion is " \
- "supported only (current size is %llu, " \
- "requested size /rounded/ is 0).\n",
+ pr_err("Error. Size expansion is supported only (current size is %llu, requested size /rounded/ is 0).\n",
current_size);
goto analyse_change_exit;
}
if ((current_size != geo->size) && (geo->size > 0)) {
if (change != -1) {
- pr_err("Error. Size change should be the only "
- "one at a time.\n");
+ pr_err("Error. Size change should be the only one at a time.\n");
change = -1;
goto analyse_change_exit;
}
if ((super->current_vol + 1) != super->anchor->num_raid_devs) {
- pr_err("Error. The last volume in container "
- "can be expanded only (%i/%s).\n",
+ pr_err("Error. The last volume in container can be expanded only (%i/%s).\n",
super->current_vol, st->devnm);
goto analyse_change_exit;
}
/* requested size change to the maximum available size
*/
if (max_size == 0) {
- pr_err("Error. Cannot find "
- "maximum available space.\n");
+ pr_err("Error. Cannot find maximum available space.\n");
change = -1;
goto analyse_change_exit;
} else
dprintf("Prepare update for size change to %llu\n",
geo->size );
if (current_size >= geo->size) {
- pr_err("Error. Size expansion is "
- "supported only (current size is %llu, "
- "requested size /rounded/ is %llu).\n",
+ pr_err("Error. Size expansion is supported only (current size is %llu, requested size /rounded/ is %llu).\n",
current_size, geo->size);
goto analyse_change_exit;
}
if (max_size && geo->size > max_size) {
- pr_err("Error. Requested size is larger "
- "than maximum available size (maximum "
- "available size is %llu, "
- "requested size /rounded/ is %llu).\n",
+ pr_err("Error. Requested size is larger than maximum available size (maximum available size is %llu, requested size /rounded/ is %llu).\n",
max_size, geo->size);
goto analyse_change_exit;
}
struct imsm_super *mpb = super->anchor;
if (mpb->num_raid_devs > 1) {
- pr_err("Error. Cannot perform operation on %s"
- "- for this operation it MUST be single "
- "array in container\n",
+ pr_err("Error. Cannot perform operation on %s- for this operation it MUST be single array in container\n",
geo->dev_name);
change = -1;
}
analyse_change_exit:
if ((direction == ROLLBACK_METADATA_CHANGES) &&
((change == CH_MIGRATION) || (change == CH_TAKEOVER))) {
- dprintf("imsm: Metadata changes rollback is not supported for "
- "migration and takeover operations.\n");
+ dprintf("imsm: Metadata changes rollback is not supported for migration and takeover operations.\n");
change = -1;
}
return change;
free(u);
} else {
- pr_err("(imsm) Operation "
- "is not allowed on this container\n");
+ pr_err("(imsm) Operation is not allowed on this container\n");
}
} else {
/* On volume level we support following operations
imsm_create_metadata_update_for_migration(
st, &geo, &u);
if (len < 1) {
- dprintf("imsm: "
- "Cannot prepare update\n");
+ dprintf("imsm: Cannot prepare update\n");
break;
}
ret_val = 0;
imsm_create_metadata_update_for_size_change(
st, &geo, &u);
if (len < 1) {
- dprintf("imsm: "
- "Cannot prepare update\n");
+ dprintf("imsm: Cannot prepare update\n");
break;
}
ret_val = 0;
init_migr_record_imsm(st, dev, sra);
else {
if (__le32_to_cpu(migr_rec->rec_status) != UNIT_SRC_NORMAL) {
- dprintf("imsm: cannot restart migration when data "
- "are present in copy area.\n");
+ dprintf("imsm: cannot restart migration when data are present in copy area.\n");
goto abort;
}
/* Save checkpoint to update migration record for current
if (save_checkpoint_imsm(st, sra, UNIT_SRC_NORMAL) == 1) {
/* ignore error == 2, this can mean end of reshape here
*/
- dprintf("imsm: Cannot write checkpoint to "
- "migration record (UNIT_SRC_NORMAL, "
- "initial save)\n");
+ dprintf("imsm: Cannot write checkpoint to migration record (UNIT_SRC_NORMAL, initial save)\n");
goto abort;
}
}
*/
degraded = check_degradation_change(sra, fds, degraded);
if (degraded > 1) {
- dprintf("imsm: Abort reshape due to degradation"
- " level (%i)\n", degraded);
+ dprintf("imsm: Abort reshape due to degradation level (%i)\n", degraded);
goto abort;
}
if (next_step_filler)
next_step_filler = (old_data_stripe_length
- next_step_filler);
- dprintf("save_stripes() parameters: start = %llu,"
- "\tstart_src = %llu,\tnext_step*512 = %llu,"
- "\tstart_in_buf_shift = %llu,"
- "\tnext_step_filler = %llu\n",
+ dprintf("save_stripes() parameters: start = %llu,\tstart_src = %llu,\tnext_step*512 = %llu,\tstart_in_buf_shift = %llu,\tnext_step_filler = %llu\n",
start, start_src, copy_length,
start_buf_shift, next_step_filler);
copy_length +
next_step_filler + start_buf_shift,
buf)) {
- dprintf("imsm: Cannot save stripes"
- " to buffer\n");
+ dprintf("imsm: Cannot save stripes to buffer\n");
goto abort;
}
/* Convert data to destination format and store it
*/
if (save_backup_imsm(st, dev, sra,
buf + start_buf_shift, copy_length)) {
- dprintf("imsm: Cannot save stripes to "
- "target devices\n");
+ dprintf("imsm: Cannot save stripes to target devices\n");
goto abort;
}
if (save_checkpoint_imsm(st, sra,
UNIT_SRC_IN_CP_AREA)) {
- dprintf("imsm: Cannot write checkpoint to "
- "migration record (UNIT_SRC_IN_CP_AREA)\n");
+ dprintf("imsm: Cannot write checkpoint to migration record (UNIT_SRC_IN_CP_AREA)\n");
goto abort;
}
} else {
if (save_checkpoint_imsm(st, sra, UNIT_SRC_NORMAL) == 1) {
/* ignore error == 2, this can mean end of reshape here
*/
- dprintf("imsm: Cannot write checkpoint to "
- "migration record (UNIT_SRC_NORMAL)\n");
+ dprintf("imsm: Cannot write checkpoint to migration record (UNIT_SRC_NORMAL)\n");
goto abort;
}
}
if (size >= tbmax * 2ULL*1024*1024*1024) {
if (verbose)
- pr_err("0.90 metadata supports at most "
- "%d terabytes per device\n", tbmax);
+ pr_err("0.90 metadata supports at most %d terabytes per device\n", tbmax);
return 0;
}
if (*chunk == UnSet)
if (!bsize || bsize > 4096 || len > 4096) {
if (!bsize)
- fprintf(stderr, "WARNING - aread() called with "
- "invalid block size\n");
+ fprintf(stderr, "WARNING - aread() called with invalid block size\n");
return -1;
}
b = ROUND_UP_PTR((char *)abuf, 4096);
bsize = afd->blk_sz;
if (!bsize || bsize > 4096 || len > 4096) {
if (!bsize)
- fprintf(stderr, "WARNING - awrite() called with "
- "invalid block size\n");
+ fprintf(stderr, "WARNING - awrite() called with invalid block size\n");
return -1;
}
b = ROUND_UP_PTR((char *)abuf, 4096);
}
break;
default:
- pr_err("Failed to write invalid "
- "metadata format 1.%i to %s\n",
+ pr_err("Failed to write invalid metadata format 1.%i to %s\n",
st->minor_version, di->devname);
rv = -EINVAL;
goto out;
if ((vers % 100) < 2 ||
sysfs_set_str(info, NULL, "metadata_version",
ver) < 0) {
- pr_err("This kernel does not "
- "support external metadata.\n");
+ pr_err("This kernel does not support external metadata.\n");
return 1;
}
}
rc = sysfs_set_num(info, NULL, "array_size",
info->custom_array_size/2);
if (rc && errno == ENOENT) {
- pr_err("This kernel does not "
- "have the md/array_size attribute, "
- "the array may be larger than expected\n");
+ pr_err("This kernel does not have the md/array_size attribute, the array may be larger than expected\n");
rc = 0;
}
rv |= rc;
status = execl("/bin/systemctl", "systemctl", "start",
pathbuf, NULL);
exit(1);
- case -1: pr_err("cannot run mdmon. "
- "Array remains readonly\n");
+ case -1: pr_err("cannot run mdmon. Array remains readonly\n");
return -1;
default: /* parent - good */
pid = wait(&status);
devnm, NULL);
}
exit(1);
- case -1: pr_err("cannot run mdmon. "
- "Array remains readonly\n");
+ case -1: pr_err("cannot run mdmon. Array remains readonly\n");
return -1;
default: /* parent - good */
pid = wait(&status);
if (pid < 0 || status != 0) {
- pr_err("failed to launch mdmon. "
- "Array remains readonly\n");
+ pr_err("failed to launch mdmon. Array remains readonly\n");
return -1;
}
}
if (check_env("MDADM_EXPERIMENTAL"))
return 1;
else {
- pr_err("To use this feature MDADM_EXPERIMENTAL"
- " environment variable has to be defined.\n");
+ pr_err("To use this feature MDADM_EXPERIMENTAL environment variable has to be defined.\n");
return 0;
}
}