mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-10 00:10:20 +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
|
||||
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
|
||||
// based split, pool for the image will be updated subsequently
|
||||
|
@ -164,6 +164,9 @@ type rbdVolume struct {
|
||||
VolName string `json:"volName"`
|
||||
MonValueFromSecret string `json:"monValueFromSecret"`
|
||||
VolSize int64 `json:"volSize"`
|
||||
// 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
|
||||
Primary bool
|
||||
|
Loading…
Reference in New Issue
Block a user