mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-26 00:00:23 +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
|
||||
// thick-provisioned.
|
||||
func (rv *rbdVolume) setThickProvisioned() error {
|
||||
err := rv.SetMetadata(thickProvisionMetaKey, "true")
|
||||
func (ri *rbdImage) setThickProvisioned() error {
|
||||
err := ri.SetMetadata(thickProvisionMetaKey, "true")
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user