mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 06:10:22 +00:00
rbd: set thick metadata if ThickProvision is set
instead of checking the parent is thick provisioned or not we can decide based on the rbdVol generated from the request. If the request is to create a Thick Image. set metadata without checking the parent. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
f471a206c5
commit
708800ddc1
@ -170,13 +170,7 @@ func (rv *rbdVolume) createCloneFromImage(ctx context.Context, parentVol *rbdVol
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: copy thick provision config
|
||||
thick, err := parentVol.isThickProvisioned()
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed checking thick-provisioning of %q: %w", parentVol, err)
|
||||
}
|
||||
|
||||
if thick {
|
||||
if rv.ThickProvision {
|
||||
err = rv.setThickProvisioned()
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed mark %q thick-provisioned: %w", rv, err)
|
||||
|
Loading…
Reference in New Issue
Block a user