check that no disk over 2TB is used to create container when no support
Creation of a container using disks over 2TB should be allowed only when orom supports large disks Signed-off-by: Anna Czarnowska <anna.czarnowska@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
2cc699afbf
commit
9126b9a816
|
@ -5331,14 +5331,22 @@ static int validate_geometry_imsm_container(struct supertype *st, int level,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
if (super->orom && raiddisks > super->orom->tds) {
|
if (super->orom) {
|
||||||
if (verbose)
|
if (raiddisks > super->orom->tds) {
|
||||||
fprintf(stderr, Name ": %d exceeds maximum number of"
|
if (verbose)
|
||||||
" platform supported disks: %d\n",
|
fprintf(stderr, Name ": %d exceeds maximum number of"
|
||||||
raiddisks, super->orom->tds);
|
" platform supported disks: %d\n",
|
||||||
|
raiddisks, super->orom->tds);
|
||||||
free_imsm(super);
|
free_imsm(super);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
if ((super->orom->attr & IMSM_OROM_ATTR_2TB_DISK) == 0 &&
|
||||||
|
(ldsize >> 9) >> 32 > 0) {
|
||||||
|
if (verbose)
|
||||||
|
fprintf(stderr, Name ": %s exceeds maximum platform supported size\n", dev);
|
||||||
|
free_imsm(super);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
*freesize = avail_size_imsm(st, ldsize >> 9);
|
*freesize = avail_size_imsm(st, ldsize >> 9);
|
||||||
|
|
Loading…
Reference in New Issue