mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 14:20:19 +00:00
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:
parent
708800ddc1
commit
77135599ac
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user