You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by jburwell <gi...@git.apache.org> on 2016/08/04 22:20:29 UTC

[GitHub] cloudstack pull request #672: Allow VM snapshots and volume snapshots to exi...

Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/672#discussion_r73613017
  
    --- Diff: plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java ---
    @@ -1402,6 +1402,12 @@ public VM createWorkingVM(final Connection conn, final String vmName, final Stri
                 vbdr.userdevice = Long.toString(volumeTO.getDeviceId());
                 vbdr.mode = Types.VbdMode.RW;
                 vbdr.type = Types.VbdType.DISK;
    +            Long deviceId = volumeTO.getDeviceId();
    +            if (deviceId != null) {
    +                if (!isDeviceUsed(conn, vm, deviceId) || deviceId.longValue() > 3) {
    --- End diff --
    
    Calling ``longValue`` is unnecessary due to autoboxing.  Also, ``3`` seems like a magic value.  What is its significance?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---