rbd: make setThickProvisioned as method of rbdImage

isThickProvisioned is already method of the rbdImage
to keep similar thick provisioner related functions
common making isThickProvisioned as method of rbdImage.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2021-07-07 10:43:28 +05:30 committed by mergify[bot]
parent 708800ddc1
commit 77135599ac

View File

@ -1524,10 +1524,10 @@ func (ri *rbdImage) SetMetadata(key, value string) error {
// setThickProvisioned records in the image metadata that it has been // setThickProvisioned records in the image metadata that it has been
// thick-provisioned. // thick-provisioned.
func (rv *rbdVolume) setThickProvisioned() error { func (ri *rbdImage) setThickProvisioned() error {
err := rv.SetMetadata(thickProvisionMetaKey, "true") err := ri.SetMetadata(thickProvisionMetaKey, "true")
if err != nil { if err != nil {
return fmt.Errorf("failed to set metadata %q for %q: %w", thickProvisionMetaKey, rv, err) return fmt.Errorf("failed to set metadata %q for %q: %w", thickProvisionMetaKey, ri, err)
} }
return nil return nil