1
0
Fork 0

Merging upstream version 4.2+20230508.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-14 06:05:31 +01:00
parent 8119c4e7dc
commit 8f10cd7248
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
27 changed files with 335 additions and 232 deletions

20
Grow.c
View file

@ -1708,14 +1708,6 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re)
return NULL;
}
if (re->after.data_disks == re->before.data_disks &&
get_linux_version() < 2006032)
return "in-place reshape is not safe before 2.6.32 - sorry.";
if (re->after.data_disks < re->before.data_disks &&
get_linux_version() < 2006030)
return "reshape to fewer devices is not supported before 2.6.30 - sorry.";
re->backup_blocks = compute_backup_blocks(
info->new_chunk, info->array.chunk_size,
re->after.data_disks, re->before.data_disks);
@ -1895,14 +1887,6 @@ int Grow_reshape(char *devname, int fd,
return 1;
}
if (s->raiddisks && s->raiddisks < array.raid_disks &&
array.level > 1 && get_linux_version() < 2006032 &&
!check_env("MDADM_FORCE_FEWER")) {
pr_err("reducing the number of devices is not safe before Linux 2.6.32\n"
" Please use a newer kernel\n");
return 1;
}
if (array.level > 1 && s->size > 1 &&
(unsigned long long) (array.chunk_size / 1024) > s->size) {
pr_err("component size must be larger than chunk size.\n");
@ -3516,7 +3500,7 @@ started:
if (!forked)
if (continue_via_systemd(container ?: sra->sys_name,
GROW_SERVICE)) {
GROW_SERVICE, NULL)) {
free(fdlist);
free(offsets);
sysfs_free(sra);
@ -3714,7 +3698,7 @@ int reshape_container(char *container, char *devname,
ping_monitor(container);
if (!forked && !freeze_reshape)
if (continue_via_systemd(container, GROW_SERVICE))
if (continue_via_systemd(container, GROW_SERVICE, NULL))
return 0;
switch (forked ? 0 : fork()) {