1. 08 2月, 2016 10 次提交
  2. 07 2月, 2016 1 次提交
  3. 06 2月, 2016 6 次提交
  4. 05 2月, 2016 8 次提交
    • M
      virnetdevbandwidth: Compute quantum value · 065054da
      Michal Privoznik 提交于
      I've noticed couple of warning in dmesg while debugging
      something:
      
      [ 9683.973754] HTB: quantum of class 10001 is big. Consider r2q change.
      [ 9683.976460] HTB: quantum of class 10002 is big. Consider r2q change.
      
      I've read the HTB documentation and linux kernel code to find out
      what's wrong. Basically we need to pass another argument
      "quantum" to our tc cmd line because the default computed by HTB
      does not always work in which case the warning message is printed
      out.
      
      You can read more details here:
      
      http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm#sharingSigned-off-by: NMichal Privoznik <mprivozn@redhat.com>
      065054da
    • P
      conf: Extract code for parsing thread resource scheduler info · 173054ce
      Peter Krempa 提交于
      As the scheduler info elements are represented orthogonally to how it
      makes sense to actually store the information, the extracted code will
      be later used when converting between XML and internal definitions.
      173054ce
    • P
      e992aa21
    • P
      util: bitmap: Introduce bitmap subtraction · 9479642f
      Peter Krempa 提交于
      Performs binary subtraction of two bitmaps. Stores result in the first
      operand.
      9479642f
    • M
      systemd: Modernize machine naming · c3bd0019
      Martin Kletzander 提交于
      So, systemd-machined has this philosophy that machine names are like
      hostnames and hence should follow the same rules.  But we always allowed
      international characters in domain names.  Thus we need to modify the
      machine name we are passing to systemd.
      
      In order to change some machine names that we will be passing to systemd,
      we also need to call TerminateMachine at the end of a lifetime of a
      domain.  Even for domains that were started with older libvirt.  That
      can be achieved thanks to virSystemdGetMachineNameByPID().  And because
      we can change machine names, we can get rid of the inconsistent and
      pointless escaping of domain names when creating machine names.
      
      So this patch modifies the naming in the following way.  It creates the
      name as <drivername>-<id>-<name> where invalid hostname characters are
      stripped out of the name and if the resulting name is longer, it
      truncates it to 64 characters.  That way we can start domains we
      couldn't start before.  Well, at least on systemd.
      
      To make it work all together, the machineName (which is needed only with
      systemd) is saved in domain's private data.  That way the generation is
      moved to the driver and we don't need to pass various unnecessary
      arguments to cgroup functions.
      
      The only thing this complicates a bit is the scope generation when
      validating a cgroup where we must check both old and new naming, so a
      slight modification was needed there.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1282846Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      c3bd0019
    • J
      conf: add caps to virDomainSnapshotDefFormat · b8b03f64
      Joao Martins 提交于
      The virDomainSnapshotDefFormat calls into virDomainDefFormat,
      so should be providing a non-NULL virCapsPtr instance. On the
      qemu driver we change qemuDomainSnapshotWriteMetadata to also
      include caps since it calls virDomainSnapshotDefFormat.
      Signed-off-by: NJoao Martins <joao.m.martins@oracle.com>
      b8b03f64
    • D
      conf: add caps to virDomainObjFormat/SaveStatus · 1036ddad
      Daniel P. Berrange 提交于
      The virDomainObjFormat and virDomainSaveStatus methods
      both call into virDomainDefFormat, so should be providing
      a non-NULL virCapsPtr instance.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      1036ddad
    • R
      bhyve: fix build · 02a34d2a
      Roman Bogorodskiy 提交于
      Fix build fail introduced as a side effect of commit d239a542.
      
      Pushed under the build breaker rule.
      02a34d2a
  5. 04 2月, 2016 9 次提交
  6. 03 2月, 2016 6 次提交
    • E
      util: Export remoteSerializeTypedParameters internally via util · 8cd1d546
      Erik Skultety 提交于
      Same as for deserializer, this method might get handy for admin one day.
      The major reason for this patch is to stay consistent with idea, i.e.
      when deserializer can be shared, why not serializer as well. The only
      problem to be solved was that the daemon side serializer uses a code
      snippet which handles sparse arrays returned by some APIs as well as
      removes any string parameters that can't be returned to older clients.
      This patch makes of the new virTypedParameterRemote datatype introduced
      by one of the pvious patches.
      8cd1d546
    • E
      util: Export remoteFreeTypedParameters internally via util · 9afc115f
      Erik Skultety 提交于
      Since the method is static to remote_driver, it can't even be used by our
      daemon. Other than that, it would be useful to be able to use it with admin as
      well. This patch uses the new virTypedParameterRemote datatype introduced in
      one of previous patches.
      9afc115f
    • E
      util: Export remoteDeserializeTypedParameters internally via util · 0472cef6
      Erik Skultety 提交于
      Currently, the deserializer is hardcoded into remote_driver which makes
      it impossible for admin to use it. One way to achieve a shared implementation
      (besides moving the code to another module) would be pass @ret_params_val as a
      void pointer as opposed to the remote_typed_param pointer and add a new extra
      argument specifying which of those two protocols is being used and typecast
      the pointer at the function entry. An example from remote_protocol:
      
      struct remote_typed_param_value {
              int type;
              union {
                      int i;
                      u_int ui;
                      int64_t l;
                      uint64_t ul;
                      double d;
                      int b;
                      remote_nonnull_string s;
              } remote_typed_param_value_u;
      };
      typedef struct remote_typed_param_value remote_typed_param_value;
      
      struct remote_typed_param {
              remote_nonnull_string field;
              remote_typed_param_value value;
      };
      
      That would leave us with a bunch of if-then-elses that needed to be used across
      the method. This patch takes the other approach using the new datatype
      introduced in one of earlier commits.
      0472cef6
    • E
      util: Introduce virTypedParameterRemote datatype · 41a45994
      Erik Skultety 提交于
      Both admin and remote protocols define their own types
      (remote_typed_param vs admin_typed_param). Because of the naming convention,
      admin typed params wouldn't be able to reuse the serialization/deserialization
      methods, which are tailored for use by remote protocol, even if those method
      were exported properly. In that case, introduce a new internal data type
      structurally copying both admin and remote protocols which, eventually, would
      allow serializer and deserializer to be used in a more generic way.
      41a45994
    • N
      qemu: qemuDomainRename and virDomainObjListNumOfDomains ABBA deadlock fix · 1e93470d
      Nikolay Shirokovskiy 提交于
      A pretty nasty deadlock occurs while trying to rename a VM in parallel
      with virDomainObjListNumOfDomains.
      The short description of the problem is as follows:
      
      Thread #1:
      
      qemuDomainRename:
          ------> aquires domain lock by qemuDomObjFromDomain
             ---------> waits for domain list lock in any of the listed functions:
                - virDomainObjListFindByName
                - virDomainObjListRenameAddNew
                - virDomainObjListRenameRemove
      
      Thread #2:
      
      virDomainObjListNumOfDomains:
          ------> aquires domain list lock
             ---------> waits for domain lock in virDomainObjListCount
      
      Introduce generic virDomainObjListRename function for renaming domains.
      It aquires list lock in right order to avoid deadlock. Callback is used
      to make driver specific domain updates.
      Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      1e93470d
    • M
      92757d4d