mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rbd: add hardlimt and softlimit flag
added Hardlimit and Softlimit flags for cephcsi arguments. When the Softlimit is reached cephcsi will start a background task to flatten the rbd image and return success and if the hardlimit is reached it will start a background task to flatten the rbd image and return ready to use as false to make sure that the image will not be used until it is flatten. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
3e7fa93256
commit
9b518726ab
@ -53,6 +53,11 @@ var (
|
||||
// VolumeName to backing RBD images
|
||||
volJournal *journal.Config
|
||||
snapJournal *journal.Config
|
||||
// rbdHardMaxCloneDepth is the hard limit for maximum number of nested volume clones that are taken before a flatten occurs
|
||||
rbdHardMaxCloneDepth uint
|
||||
|
||||
// rbdSoftMaxCloneDepth is the soft limit for maximum number of nested volume clones that are taken before a flatten occurs
|
||||
rbdSoftMaxCloneDepth uint
|
||||
)
|
||||
|
||||
// NewDriver returns new rbd driver
|
||||
@ -103,6 +108,9 @@ func (r *Driver) Run(conf *util.Config, cachePersister util.CachePersister) {
|
||||
CSIInstanceID = conf.InstanceID
|
||||
}
|
||||
|
||||
// update clone soft and hard limit
|
||||
rbdHardMaxCloneDepth = conf.RbdHardMaxCloneDepth
|
||||
rbdSoftMaxCloneDepth = conf.RbdSoftMaxCloneDepth
|
||||
// Create instances of the volume and snapshot journal
|
||||
volJournal = journal.NewCSIVolumeJournal(CSIInstanceID)
|
||||
snapJournal = journal.NewCSISnapshotJournal(CSIInstanceID)
|
||||
|
Reference in New Issue
Block a user