1. 16 3月, 2020 2 次提交
  2. 26 2月, 2020 1 次提交
    • P
      virStorageFileGetMetadataRecurse: Allow format probing under special circumstances · ae9e6c2a
      Peter Krempa 提交于
      Allow format probing to work around lazy clients which did not specify
      their format in the overlay. Format probing will be allowed only, if we
      are able to probe the image, the probing result was successful and the
      probed image does not have any backing or data file.
      
      This relaxes the restrictions which were imposed in commit 3615e8b3
      in cases when we know that the image probing will not result in security
      issues or data corruption.
      
      We perform the image format detection and in the case that we were able
      to probe the format and the format does not specify a backing store (or
      doesn't support backing store) we can use this format.
      
      With pre-blockdev configurations this will restore the previous
      behaviour for the images mentioned above as qemu would probe the format
      anyways. It also improves error reporting compared to the old state as
      we now report that the backing chain will be broken in case when there
      is a backing file.
      
      In blockdev configurations this ensures that libvirt will not cause data
      corruption by ending the chain prematurely without notifying the user,
      but still allows the old semantics when the users forgot to specify the
      format.
      
      Users thus don't have to re-invent when image format detection is safe
      to do.
      
      The price for this is that libvirt will need to keep the image format
      detector still current and working or replace it by invocation of
      qemu-img.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      ae9e6c2a
  3. 25 2月, 2020 2 次提交
  4. 24 2月, 2020 5 次提交
  5. 20 2月, 2020 7 次提交
  6. 14 2月, 2020 2 次提交
  7. 11 2月, 2020 5 次提交
  8. 17 1月, 2020 2 次提交
  9. 10 1月, 2020 1 次提交
  10. 07 1月, 2020 1 次提交
  11. 03 1月, 2020 1 次提交
  12. 18 12月, 2019 1 次提交
  13. 17 12月, 2019 2 次提交
  14. 12 12月, 2019 2 次提交
  15. 10 12月, 2019 1 次提交
  16. 13 11月, 2019 1 次提交
  17. 12 11月, 2019 1 次提交
  18. 25 10月, 2019 1 次提交
  19. 24 10月, 2019 1 次提交
    • M
      Drop needless ret variable · 3b4df5d3
      Michal Privoznik 提交于
      In few places we have the following code pattern:
      
        int ret;
        ... /* @ret is not accessed here */
        ret = f(...);
        return ret;
      
      This pattern can be written less verbose:
      
        ...
        return f(...);
      
      This patch was generated with following coccinelle spatch:
      
        @@
        type T;
        constant C;
        expression f;
        identifier ret;
        @@
        -T ret = C;
         ... when != ret
        -ret = f;
        -return ret;
        +return f;
      
      Afterwards I needed to fix a few places, e.g. comment in
      virDomainNetIPParseXML() was removed too because coccinelle
      thinks it refers to @ret while in fact it doesn't. Also in few
      places it replaced @ret declaration with a few spaces instead of
      removing the line. But nothing terribly wrong.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      3b4df5d3
  20. 21 10月, 2019 1 次提交