Relax partition overlap check to allow Vinum partitions to overlap
other partitiosns. This is necessary when migrating conventional partitions to Vinum and was broken by recent more stringent overlap checks. This is arguably the wrong way to do it. A better method would be to have the loader understand a subset of Vinum partitioning and allow an install directly to Vinum, but until then, this is the best we have. Reviewed by: jhb Approved by: re (rwatson)
This commit is contained in:
parent
ba0b471d64
commit
f2f632579f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=107534
@ -1462,7 +1462,8 @@ checklabel(struct disklabel *lp)
|
|||||||
} else {
|
} else {
|
||||||
/* allow them to be out of order for old-style tables */
|
/* allow them to be out of order for old-style tables */
|
||||||
if (pp->p_offset < current_offset &&
|
if (pp->p_offset < current_offset &&
|
||||||
seen_default_offset && i != RAW_PART) {
|
seen_default_offset && i != RAW_PART &&
|
||||||
|
pp->p_fstype != FS_VINUM) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Offset %ld for partition %c overlaps previous partition which ends at %lu\n",
|
"Offset %ld for partition %c overlaps previous partition which ends at %lu\n",
|
||||||
(long)pp->p_offset,i+'a',current_offset);
|
(long)pp->p_offset,i+'a',current_offset);
|
||||||
@ -1537,9 +1538,11 @@ checklabel(struct disklabel *lp)
|
|||||||
/* check for overlaps */
|
/* check for overlaps */
|
||||||
/* this will check for all possible overlaps once and only once */
|
/* this will check for all possible overlaps once and only once */
|
||||||
for (j = 0; j < i; j++) {
|
for (j = 0; j < i; j++) {
|
||||||
if (j != RAW_PART && i != RAW_PART &&
|
pp2 = &lp->d_partitions[j];
|
||||||
|
if (j != RAW_PART && i != RAW_PART &&
|
||||||
|
pp->p_fstype != FS_VINUM &&
|
||||||
|
pp2->p_fstype != FS_VINUM &&
|
||||||
part_set[i] && part_set[j]) {
|
part_set[i] && part_set[j]) {
|
||||||
pp2 = &lp->d_partitions[j];
|
|
||||||
if (pp2->p_offset < pp->p_offset + pp->p_size &&
|
if (pp2->p_offset < pp->p_offset + pp->p_size &&
|
||||||
(pp2->p_offset + pp2->p_size > pp->p_offset ||
|
(pp2->p_offset + pp2->p_size > pp->p_offset ||
|
||||||
pp2->p_offset >= pp->p_offset)) {
|
pp2->p_offset >= pp->p_offset)) {
|
||||||
|
@ -1462,7 +1462,8 @@ checklabel(struct disklabel *lp)
|
|||||||
} else {
|
} else {
|
||||||
/* allow them to be out of order for old-style tables */
|
/* allow them to be out of order for old-style tables */
|
||||||
if (pp->p_offset < current_offset &&
|
if (pp->p_offset < current_offset &&
|
||||||
seen_default_offset && i != RAW_PART) {
|
seen_default_offset && i != RAW_PART &&
|
||||||
|
pp->p_fstype != FS_VINUM) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Offset %ld for partition %c overlaps previous partition which ends at %lu\n",
|
"Offset %ld for partition %c overlaps previous partition which ends at %lu\n",
|
||||||
(long)pp->p_offset,i+'a',current_offset);
|
(long)pp->p_offset,i+'a',current_offset);
|
||||||
@ -1537,9 +1538,11 @@ checklabel(struct disklabel *lp)
|
|||||||
/* check for overlaps */
|
/* check for overlaps */
|
||||||
/* this will check for all possible overlaps once and only once */
|
/* this will check for all possible overlaps once and only once */
|
||||||
for (j = 0; j < i; j++) {
|
for (j = 0; j < i; j++) {
|
||||||
if (j != RAW_PART && i != RAW_PART &&
|
pp2 = &lp->d_partitions[j];
|
||||||
|
if (j != RAW_PART && i != RAW_PART &&
|
||||||
|
pp->p_fstype != FS_VINUM &&
|
||||||
|
pp2->p_fstype != FS_VINUM &&
|
||||||
part_set[i] && part_set[j]) {
|
part_set[i] && part_set[j]) {
|
||||||
pp2 = &lp->d_partitions[j];
|
|
||||||
if (pp2->p_offset < pp->p_offset + pp->p_size &&
|
if (pp2->p_offset < pp->p_offset + pp->p_size &&
|
||||||
(pp2->p_offset + pp2->p_size > pp->p_offset ||
|
(pp2->p_offset + pp2->p_size > pp->p_offset ||
|
||||||
pp2->p_offset >= pp->p_offset)) {
|
pp2->p_offset >= pp->p_offset)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user