1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-30 01:47:56 +03:00

removed ~64limit for PEs per PV agk introduced

This commit is contained in:
Heinz Mauelshagen 2002-01-24 19:20:35 +00:00
parent c4b5ade752
commit a975e85548
3 changed files with 3 additions and 11 deletions

View File

@ -21,7 +21,7 @@
#define MIN_PE_SIZE ( 8192L / SECTOR_SIZE) /* 8 KB in sectors */
#define MAX_PE_SIZE ( 16L * 1024L * 1024L / SECTOR_SIZE * 1024)
#define PE_SIZE_PV_SIZE_REL 5 /* PV size must be at least 5 times PE size */
#define MAX_PE_TOTAL ( ( 1 << ( sizeof ( uint16_t) * 8)) - 2)
#define MAX_LE_TOTAL ( ( 1 << ( sizeof ( uint16_t) * 8)) - 2)
#define UNMAPPED_EXTENT 0

View File

@ -358,9 +358,9 @@ static int _pv_setup(struct format_instance *fi, struct physical_volume *pv,
static int _lv_setup(struct format_instance *fi, struct logical_volume *lv)
{
if (lv->le_count > 65534UL) {
if (lv->le_count > MAX_LE_TOTAL) {
log_err("Format 1 logical volumes cannot contain more than "
"65534 extents.");
"%d extents.", MAX_LE_TOTAL);
return 0;
}

View File

@ -147,14 +147,6 @@ int calculate_extent_count(struct physical_volume *pv)
} while((pvd->pe_start + (pvd->pe_total * pv->pe_size)) > pv->size);
if (pvd->pe_total > MAX_PE_TOTAL) {
log_error("Metadata extent limit (%u) exceeded for %s - "
"%u required", MAX_PE_TOTAL, dev_name(pv->dev),
pvd->pe_total);
dbg_free(pvd);
return 0;
}
pv->pe_count = pvd->pe_total;
pv->pe_start = pvd->pe_start;
dbg_free(pvd);