-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add Hypervisor default as cache mode for disk offerings
#10282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
e6d1680
5178bad
9275789
d42432c
a20b6d5
04b49bc
77b85f0
638cebd
391ffb6
976f2e1
a0c2a9f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -20,6 +20,7 @@ | |||||||||
| package org.apache.cloudstack.storage.to; | ||||||||||
|
|
||||||||||
| import com.cloud.agent.api.LogLevel; | ||||||||||
| import com.cloud.offering.DiskOffering; | ||||||||||
| import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo; | ||||||||||
|
|
||||||||||
| import com.cloud.agent.api.to.DataObjectType; | ||||||||||
|
|
@@ -112,8 +113,8 @@ public VolumeObjectTO(VolumeInfo volume) { | |||||||||
| iopsWriteRate = volume.getIopsWriteRate(); | ||||||||||
| iopsWriteRateMax = volume.getIopsWriteRateMax(); | ||||||||||
| iopsWriteRateMaxLength = volume.getIopsWriteRateMaxLength(); | ||||||||||
| cacheMode = volume.getCacheMode(); | ||||||||||
| hypervisorType = volume.getHypervisorType(); | ||||||||||
| setCacheMode(volume.getCacheMode()); | ||||||||||
| setDeviceId(volume.getDeviceId()); | ||||||||||
| this.migrationOptions = volume.getMigrationOptions(); | ||||||||||
| this.directDownload = volume.isDirectDownload(); | ||||||||||
|
|
@@ -337,6 +338,10 @@ public void setDeviceId(Long deviceId) { | |||||||||
| } | ||||||||||
|
|
||||||||||
| public void setCacheMode(DiskCacheMode cacheMode) { | ||||||||||
| if (DiskCacheMode.HYPERVISOR_DEFAULT.equals(cacheMode) && !Hypervisor.HypervisorType.KVM.equals(hypervisorType)) { | ||||||||||
| this.cacheMode = DiskOffering.DiskCacheMode.NONE; | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is a bit confusing.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so, it tests ok, but this is still strange.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as I understand, this code block affects other hypervisors , not KVM.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, but also make clear these are the same enum/value and not accidentally similar named values from different locations. I.e. remove the
Suggested change
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added some changes with my last commit. Could you please take a look and check if your concerns have been addressed? |
||||||||||
| return; | ||||||||||
| } | ||||||||||
| this.cacheMode = cacheMode; | ||||||||||
| } | ||||||||||
|
|
||||||||||
|
|
||||||||||
Uh oh!
There was an error while loading. Please reload this page.