Hi Markus,
I have just looked into your formula used for vol size calculation, I think it might required some changes as below,
'+' + (int)( (size * ('1.' + volume.snapshot_reserved_percent) ) - (qtree.disk_limit_mb* ( '1.' + volume.snapshot_reserved_percent)) )
Suppose if your qtree size is 100g then your volume size would be 120g( with 20% snapreseve calcuation)
Then if you are going to increase qtree size to 200g then your volume size needs to be calculated as 240. But with your formula it would be 260, that's why we need to calculate the snapreserve on qtree size as well while deducting it.
Let me know if I'm missing any basic thing here..!
Warm Regards
Sivaprasad K