1. 17 9月, 2018 1 次提交
  2. 17 4月, 2018 1 次提交
  3. 24 1月, 2018 2 次提交
  4. 04 11月, 2017 1 次提交
  5. 03 11月, 2017 1 次提交
    • A
      Remove backslash alignment attempts · 3e7db8d3
      Andrea Bolognani 提交于
      Right-aligning backslashes when defining macros or using complex
      commands in Makefiles looks cute, but as soon as any changes is
      required to the code you end up with either distractingly broken
      alignment or unnecessarily big diffs where most of the changes
      are just pushing all backslashes a few characters to one side.
      
      Generated using
      
        $ git grep -El '[[:blank:]][[:blank:]]\\$' | \
          grep -E '*\.([chx]|am|mk)$$' | \
          while read f; do \
            sed -Ei 's/[[:blank:]]*[[:blank:]]\\$/ \\/g' "$f"; \
          done
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      3e7db8d3
  6. 18 5月, 2017 2 次提交
  7. 13 4月, 2017 1 次提交
  8. 12 4月, 2017 1 次提交
  9. 27 3月, 2017 1 次提交
  10. 21 12月, 2016 1 次提交
    • J
      virsh: Allow display of the physical volume size · f62e418c
      John Ferlan 提交于
      Add a new qualifier '--physical' to the 'vol-info' command in order to
      dispaly the physical size of the volume. The size can differ from the
      allocation value depending on the volume file time. In particular, qcow2
      volumes will have a physical value larger than allocation. This also occurs
      for sparse files, although for those the capacity is the largest size;
      whereas, for qcow2 capacity is the logical size.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      f62e418c
  11. 14 11月, 2016 2 次提交
  12. 13 10月, 2016 1 次提交
  13. 07 9月, 2016 1 次提交
    • Y
      storage: Delete extra wrap after vol-resize error · ed8ba91e
      Yanqiu Zhang 提交于
      This patch is to delete the extra wrap "\n" after failed vol-resize
      error for both "Failed to change size of volume to" and "Failed to change
      size of volume by". For error with wrap, there will be an extra wrap
      between two errors, such as:
      
         (1)# virsh vol-resize --pool default --vol vol-test 5M
              error: Failed to change size of volume 'vol-test' to 5M
      
              error: invalid argument: Can't shrink capacity below current capacity unless shrink flag explicitly specified
      
         (2)# virsh vol-resize /var/lib/libvirt/images/volds --shrink --delta 10M
              error: Failed to change size of volume 'volds' by 10M
      
              error: invalid argument: can't shrink capacity below existing allocation
      ed8ba91e
  14. 24 8月, 2016 2 次提交
    • P
      virsh: use vshError consistently after virBufferError checks · 4362ff43
      Pino Toscano 提交于
      If virBufferError() reports an error, then vshError() is needed to
      report the error situation instead of a simple vshError().
      4362ff43
    • P
      virsh: respect -q/--quiet more · b620bdee
      Pino Toscano 提交于
      Turn various vshPrint() informative messages into vshPrintExtra(), so
      they are not printed when requesting the quiet mode; neither XML/info
      outputs nor the results of commands are affected.
      Also change the expected outputs of the virsh-undefine test, since virsh
      is invoked in quiet mode there.
      
      Some informative messages might still be converted (and thus silenced
      when in quiet mode), but this is an improvements nonetheless.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1358179
      b620bdee
  15. 04 5月, 2016 1 次提交
  16. 20 4月, 2016 1 次提交
  17. 15 4月, 2016 1 次提交
  18. 12 2月, 2016 2 次提交
  19. 30 1月, 2016 1 次提交
    • W
      storage: Add TRIM algorithm to storage volume API · 63cdc92f
      Wido den Hollander 提交于
      This new algorithm adds support for wiping volumes using TRIM.
      
      It does not overwrite all the data in a volume, but it tells the
      backing storage pool/driver that all bytes in a volume can be
      discarded.
      
      It depends on the backing storage pool how this is handled.
      
      A SCSI backend might send UNMAP commands to remove all data present
      on a LUN.
      
      A Ceph backend might use rbd_discard() to instruct the Ceph cluster
      that all data on that RBD volume can be discarded.
      Signed-off-by: NWido den Hollander <wido@widodh.nl>
      63cdc92f
  20. 12 1月, 2016 3 次提交
    • J
      virsh: Create macros for common "vol" options · 5b436359
      John Ferlan 提交于
      Rather than continually cut-n-paste the strings into each command,
      create common macros to be used generically.  Replace the more commonly
      used "vol" option with a macro. This also adjusts 2 commands that
      didn't have the correct helpstr - 'vol-create-from' and 'vol-clone'.
      Both are described in the man page as taking vol, path, or key and
      the code uses the virshCommandOptVol instead of virshCommandOptVolBy.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      5b436359
    • J
      virsh: Create macro for common "file" option · febf69b5
      John Ferlan 提交于
      Rather than continually cut-n-paste the strings into each command,
      create a common macro to be used generically. The macro will take a
      single argument _helpstr for the less common help string for each
      command option.  Note that only file options using "OT_DATA" and
      "OFLAG_REQ" will be replace - others are left as is.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      febf69b5
    • J
      virsh: Adjustments for the VIRSH_COMMON_OPT_POOL · 70c6e677
      John Ferlan 提交于
      The macro is slightly adjusted to add an argument "_helpstr". This
      will be passed as a translation macro string since other uses of the
      option may not have the same exact help string (such as is the case
      when the uuid is not suppliable for create commands).
      
      In virsh-pool.c - we'll create a singular VIRSH_COMMON_OPT_POOL_FULL
      in order to pass along the 'N_("pool name or uuid")'
      
      In virsh-volume.c there will be a VIRSH_COMMON_OPT_POOL_FULL and a
      VIRSH_COMMON_OPT_POOL_NAME, which passes 'N_("pool name")' for
      the commands that can only pass a name. There will also be a
      VIRSH_COMMON_OPT_POOL_OPTIONAL which is used for the command
      options which use OT_STRING and don't require the --pool argument.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      70c6e677
  21. 18 12月, 2015 1 次提交
    • J
      virsh: Add --delete-snapshots flag for undefine and vol-delete · 2eba5c56
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1281710
      
      Commit id '3c7590e0' added the flag to the rbd backend, but provided
      no means via virsh to use the flag.  This patch adds a '--delete-snapshots'
      option to both the "undefine" and "vol-delete" commands.
      
      For "undefine", the flag is combined with the "--remove-all-storage" flag
      in order to add the appropriate flag for the virStorageVolDelete call;
      whereas, for the "vol-delete" command, just the flag is sufficient since
      it's only operating on one volume.
      
      Currently only supported for rbd backends.
      2eba5c56
  22. 09 12月, 2015 1 次提交
  23. 14 8月, 2015 1 次提交
    • E
      tools: Introduce new client generic module vsh · 834c5720
      Erik Skultety 提交于
      In order to share as much virsh' logic as possible with upcomming
      virt-admin client we need to split virsh logic into virsh specific and
      client generic features.
      
      Since majority of virsh methods should be generic enough to be used by
      other clients, it's much easier to rename virsh specific data to virshX
      than doing this vice versa. It moved generic virsh commands (including info
      and opts structures) to generic module vsh.c.
      
      Besides renaming methods and structures, this patch also involves introduction
      of a client specific control structure being referenced as private data in the
      original control structure, introduction of a new global vsh Initializer,
      which currently doesn't do much, but there is a potential for added
      functionality in the future.
      Lastly it introduced client hooks which are especially necessary during
      client connecting phase.
      834c5720
  24. 02 6月, 2015 2 次提交
  25. 01 6月, 2015 1 次提交
    • J
      virsh: make negative values with vol-resize more convenient · 0a33bba1
      Ján Tomko 提交于
      When shrinking a volume by a certain size, instead of typing
        vol-resize volume 1G --delta --shrink
      we allow the convience of specifying a negative value:
        vol-resize volume -1G --delta --shrink
      getting the same results with one more character.
      
      A negative value only makes sense as a delta. Imply the
      --delta parameter if the value is negative.
      
      Still require --shrink, because the operation is potentially
      destructive.
      0a33bba1
  26. 18 5月, 2015 1 次提交
  27. 04 2月, 2015 1 次提交
  28. 03 12月, 2014 1 次提交
  29. 15 11月, 2014 1 次提交
  30. 13 11月, 2014 1 次提交
  31. 20 8月, 2014 1 次提交
  32. 18 7月, 2014 1 次提交
    • J
      virsh vol-upload/download disallow negative offset · 570d0f63
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1087104
      
      Commit id 'c6212539' explicitly allowed a negative value to be used for
      offset and length as a shorthand for the largest value after commit id
      'f18c02ec' modified virStrToLong_ui() to essentially disallow a negative
      value.
      
      However, allowing a negative value for offset ONLY worked if the negative
      value was -1 since the eventual lseek() does allow a -1 to mean the end
      of the file.  Providing other negative values resulted in errors such as:
      
      $ virsh vol-download --pool default qcow3-vol2 /home/vm-images/raw \
        --offset -2 --length -1000
      error: cannot download from volume qcow3-vol2
      error: Unable to seek /home/vm-images/qcow3-vol2 to 18446744073709551614: Invalid argument
      
      $
      
      Thus, it seems unreasonable to expect or allow a negative value for offset
      since the only benefit is to lseek() to the end of the file and then only
      take advantage of how the OS would handle such a seek. For the purposes of
      upload or download of volume data, that seems to be a no-op.  Therefore,
      disallow a negative value for offset.
      
      Additionally, modify the man page for vol-upload and vol-download to provide
      more details regarding the valid values for both offset and length.
      570d0f63