mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
doc: correct some source code comments in rbd driver code
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
parent
7c2cbf473c
commit
5089a4ce5d
@ -97,7 +97,7 @@ func (rv *rbdVolume) checkCloneImage(ctx context.Context, parentVol *rbdVolume)
|
||||
return false, err
|
||||
}
|
||||
}
|
||||
// snap will be create after we flatten the temporary cloned image,no
|
||||
// snap will be created after we flatten the temporary cloned image,no
|
||||
// need to check for flatten here.
|
||||
// as the snap exists,create clone image and delete temporary snapshot
|
||||
// and add task to flatten temporary cloned image
|
||||
@ -266,8 +266,8 @@ func (rv *rbdVolume) flattenCloneImage(ctx context.Context) error {
|
||||
// If the intermediate clone reaches the depth we may need to return ABORT
|
||||
// error message as it need to be flatten before continuing, this may leak
|
||||
// omap entries and stale temporary snapshots in corner cases, if we reduce
|
||||
// the limit and check for the depth of the parent image clain it self we
|
||||
// can flatten the parent images before use to avoid the stale omap entries.
|
||||
// the limit and check for the depth of the parent image clain itself we
|
||||
// can flatten the parent images before used to avoid the stale omap entries.
|
||||
hardLimit := rbdHardMaxCloneDepth
|
||||
softLimit := rbdSoftMaxCloneDepth
|
||||
// choosing 2 so that we don't need to flatten the image in the request.
|
||||
|
@ -418,7 +418,7 @@ func (cs *ControllerServer) repairExistingVolume(ctx context.Context, req *csi.C
|
||||
"restoring thick-provisioned volume %q has been interrupted, please retry", rbdVol)
|
||||
}
|
||||
}
|
||||
// restore from snapshot imploes rbdSnap != nil
|
||||
// restore from snapshot implies rbdSnap != nil
|
||||
// check if image depth is reached limit and requires flatten
|
||||
err := checkFlatten(ctx, rbdVol, cr)
|
||||
if err != nil {
|
||||
@ -533,7 +533,7 @@ func flattenTemporaryClonedImages(ctx context.Context, rbdVol *rbdVolume, cr *ut
|
||||
return nil
|
||||
}
|
||||
|
||||
// checkFlatten ensures that that the image chain depth is not reached
|
||||
// checkFlatten ensures that the image chain depth is not reached
|
||||
// hardlimit or softlimit. if the softlimit is reached it adds a task and
|
||||
// return success,the hardlimit is reached it starts a task to flatten the
|
||||
// image and return Aborted.
|
||||
@ -823,7 +823,7 @@ func (cs *ControllerServer) DeleteVolume(
|
||||
}
|
||||
|
||||
// lock out parallel create requests against the same volume name as we
|
||||
// cleanup the image and associated omaps for the same
|
||||
// clean up the image and associated omaps for the same
|
||||
if acquired := cs.VolumeLocks.TryAcquire(rbdVol.RequestName); !acquired {
|
||||
util.ErrorLog(ctx, util.VolumeOperationAlreadyExistsFmt, rbdVol.RequestName)
|
||||
|
||||
@ -1302,7 +1302,7 @@ func (cs *ControllerServer) DeleteSnapshot(
|
||||
|
||||
rbdSnap := &rbdSnapshot{}
|
||||
if err = genSnapFromSnapID(ctx, rbdSnap, snapshotID, cr, req.GetSecrets()); err != nil {
|
||||
// if error is ErrPoolNotFound, the pool is already deleted we dont
|
||||
// if error is ErrPoolNotFound, the pool is already deleted we don't
|
||||
// need to worry about deleting snapshot or omap data, return success
|
||||
if errors.Is(err, util.ErrPoolNotFound) {
|
||||
util.WarningLog(ctx, "failed to get backend snapshot for %s: %v", snapshotID, err)
|
||||
|
@ -50,11 +50,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
|
||||
// rbdHardMaxCloneDepth is the hard limit for maximum number of nested volume clones that are taken before flatten
|
||||
// occurs.
|
||||
rbdHardMaxCloneDepth uint
|
||||
|
||||
// rbdSoftMaxCloneDepth is the soft limit for maximum number of nested volume clones that are taken before a flatten
|
||||
// rbdSoftMaxCloneDepth is the soft limit for maximum number of nested volume clones that are taken before flatten
|
||||
// occurs.
|
||||
rbdSoftMaxCloneDepth uint
|
||||
maxSnapshotsOnImage uint
|
||||
@ -141,7 +141,7 @@ func (r *Driver) Run(conf *util.Config) {
|
||||
// general
|
||||
// In addition, we want to add the remaining modes like MULTI_NODE_READER_ONLY,
|
||||
// MULTI_NODE_SINGLE_WRITER etc, but need to do some verification of RO modes first
|
||||
// will work those as follow up features
|
||||
// will work those as follow-up features
|
||||
r.cd.AddVolumeCapabilityAccessModes(
|
||||
[]csi.VolumeCapability_AccessMode_Mode{
|
||||
csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER,
|
||||
|
Loading…
Reference in New Issue
Block a user