Two cases here wrt resizing a share after a snapshot's taken and then attempting to revert to that snapshot:
1) Snapshot size is 10GB, share size is 5 GB - reverting-in-place will need 10 GB:
- So, we can:
- Attempt a quota modification and claim the additional 5GB; if this isn't possible, we'd raise a QuotaExceeded error
- If we're able to get the extra quota accounted, we must check if the backend expects an "extend" request to be made before the revert request?
I don't know the answer to this. We must probably make an extend_share call to be safe, and it can be consistently honored across backends that implement revert.
2) Snapshot size is 5 GB, share size is 10 GB - reverting-in-place shouldn't shrink the share here. Backends must extend after reverting in case the share size is affected by the revert.
Thanks for raising this issue, Kiran
Two cases here wrt resizing a share after a snapshot's taken and then attempting to revert to that snapshot:
1) Snapshot size is 10GB, share size is 5 GB - reverting-in-place will need 10 GB:
- So, we can:
- Attempt a quota modification and claim the additional 5GB; if this isn't possible, we'd raise a QuotaExceeded error
- If we're able to get the extra quota accounted, we must check if the backend expects an "extend" request to be made before the revert request?
I don't know the answer to this. We must probably make an extend_share call to be safe, and it can be consistently honored across backends that implement revert.
2) Snapshot size is 5 GB, share size is 10 GB - reverting-in-place shouldn't shrink the share here. Backends must extend after reverting in case the share size is affected by the revert.