Change in vdsm[master]: Allow moving of sparse images to a block domains
tnisan at redhat.com
tnisan at redhat.com
Sun Mar 16 17:27:33 UTC 2014
Tal Nisan has uploaded a new change for review.
Change subject: Allow moving of sparse images to a block domains
......................................................................
Allow moving of sparse images to a block domains
When attempting to move a sparse image from a file domain to a block domain
the destination image is created as sparse and is not supported on block
domains, this patch introduces a change that creates a the images as
preallocated on domains that do not support sparseness
Change-Id: Id95d700cf6acb46464d6c5d063966f9331a15028
Signed-off-by: Tal Nisan <tnisan at redhat.com>
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1063996
---
M vdsm/storage/image.py
1 file changed, 6 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/78/25778/1
diff --git a/vdsm/storage/image.py b/vdsm/storage/image.py
index b08ecca..341c312 100644
--- a/vdsm/storage/image.py
+++ b/vdsm/storage/image.py
@@ -358,11 +358,13 @@
# we create the target as a sparse volume (since it will be
# soon filled with the data coming from the copy) and then
# we change its metadata back to the original value.
- if (volParams['prealloc'] == volume.PREALLOCATED_VOL
- and destDom.supportsSparseness):
- tmpVolPreallocation = volume.SPARSE_VOL
+ if (destDom.supportsSparseness):
+ if (volParams['prealloc'] == volume.PREALLOCATED_VOL):
+ tmpVolPreallocation = volume.SPARSE_VOL
+ else:
+ tmpVolPreallocation = volParams['prealloc']
else:
- tmpVolPreallocation = volParams['prealloc']
+ tmpVolPreallocation = volume.PREALLOCATED_VOL
destDom.createVolume(imgUUID=imgUUID,
size=volParams['size'],
--
To view, visit http://gerrit.ovirt.org/25778
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id95d700cf6acb46464d6c5d063966f9331a15028
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Tal Nisan <tnisan at redhat.com>
More information about the vdsm-patches
mailing list