doc: correct some source code comments in rbd driver code

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
Humble Chirammal 2021-08-17 11:09:56 +05:30 committed by mergify[bot]
parent 7c2cbf473c
commit 5089a4ce5d
3 changed files with 10 additions and 10 deletions

View File

@ -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
@ -267,7 +267,7 @@ func (rv *rbdVolume) flattenCloneImage(ctx context.Context) error {
// 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 itself we
// can flatten the parent images before use to avoid the stale omap entries.
// 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.

View File

@ -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.
@ -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)

View File

@ -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,