mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
rbd: add RequestedVolSize to rbdVolume struct
when doing the internal operation to get the latest details the rbd image size is also getting updated and this will update the volume size also without actual requested size we cannot do the resize operation for bigger clones. This commit adds a new field called RequestedVolSize to rbdVolume struct to hold the user requested size. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
22365ab77f
commit
124281519f
@ -136,6 +136,8 @@ func (cs *ControllerServer) parseVolCreateRequest(
|
|||||||
|
|
||||||
// always round up the request size in bytes to the nearest MiB/GiB
|
// always round up the request size in bytes to the nearest MiB/GiB
|
||||||
rbdVol.VolSize = util.RoundOffBytes(volSizeBytes)
|
rbdVol.VolSize = util.RoundOffBytes(volSizeBytes)
|
||||||
|
// RequestedVolSize has the size of the volume requested by the user.
|
||||||
|
rbdVol.RequestedVolSize = rbdVol.VolSize
|
||||||
|
|
||||||
// start with pool the same as journal pool, in case there is a topology
|
// start with pool the same as journal pool, in case there is a topology
|
||||||
// based split, pool for the image will be updated subsequently
|
// based split, pool for the image will be updated subsequently
|
||||||
|
@ -164,7 +164,10 @@ type rbdVolume struct {
|
|||||||
VolName string `json:"volName"`
|
VolName string `json:"volName"`
|
||||||
MonValueFromSecret string `json:"monValueFromSecret"`
|
MonValueFromSecret string `json:"monValueFromSecret"`
|
||||||
VolSize int64 `json:"volSize"`
|
VolSize int64 `json:"volSize"`
|
||||||
DisableInUseChecks bool `json:"disableInUseChecks"`
|
// RequestedVolSize has the size of the volume requested by the user and
|
||||||
|
// this value will not be updated when doing getImageInfo() on rbdVolume.
|
||||||
|
RequestedVolSize int64
|
||||||
|
DisableInUseChecks bool `json:"disableInUseChecks"`
|
||||||
readOnly bool
|
readOnly bool
|
||||||
Primary bool
|
Primary bool
|
||||||
ThickProvision bool
|
ThickProvision bool
|
||||||
|
Loading…
Reference in New Issue
Block a user