mirror of
git://sourceware.org/git/lvm2.git
synced 2025-02-25 21:57:45 +03:00
thin: limited support for -l%FREE allocation
This is just a temporary fix to support allocation of -l%FREE. The number of free extent serves to calculate estimated metadata size. This value is then substracted twice to keep some free space for recover.
This commit is contained in:
parent
55fe07ad98
commit
6fc67f5509
@ -321,6 +321,14 @@ static int _update_extents_params(struct volume_group *vg,
|
||||
if (!(lp->poolmetadataextents =
|
||||
extents_from_size(vg->cmd, lp->poolmetadatasize, vg->extent_size)))
|
||||
return_0;
|
||||
if (lcp->percent == PERCENT_FREE) {
|
||||
if (lp->extents <= (2 * lp->poolmetadataextents)) {
|
||||
log_error("Not enough space for thin pool creation.");
|
||||
return 0;
|
||||
}
|
||||
/* FIXME: persistent hidden space in VG wanted */
|
||||
lp->extents -= (2 * lp->poolmetadataextents);
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user