oVirt / vdsm

The Virtual Desktop Server Manager
GNU General Public License v2.0
160 stars 201 forks source link

volume: allow extend cow preallocated #380

Closed aesteve-rh closed 1 year ago

aesteve-rh commented 1 year ago

Backport for https://github.com/oVirt/vdsm/pull/379

Currently we assume in the code that cow volumes do not need to be extended in any case. However, all preallocated volumes, both cow and raw, should be extended when requested. Otherwise, cow preallocated volumes have bigger capacity than their truesize. Thus, when the size of the disk reaches the truesize, the VM will pause, which is an undesired effect.

To avoid this, we relax this assumption so that only cow sparse volumes are skipped on extend calls.

Bug-Url: https://bugzilla.redhat.com/2170689 Signed-off-by: Albert Esteve aesteve@redhat.com

nirs commented 1 year ago

@aesteve-rh please fix the pr and commit message to describe only the issue in the bug - preallocated volume are not preallocated during extend.

You can add a comment like:

(commit message was updated to to reflect the actual fix better) 
ahadas commented 1 year ago

@aesteve-rh please fix the pr and commit message to describe only the issue in the bug - preallocated volume are not preallocated during extend.

You can add a comment like:

(commit message was updated to to reflect the actual fix better) 

+1 my approval was on the code changes