Skip to content
Snippets Groups Projects
  1. May 14, 2021
  2. Apr 01, 2021
  3. Mar 29, 2021
    • Hanna Reitz's avatar
      qsd: Document FUSE exports · 220222a0
      Hanna Reitz authored
      
      Implementing FUSE exports required no changes to the storage daemon, so
      we forgot to document them there.  Considering that both NBD and
      vhost-user-blk exports are documented in its man page (and NBD exports
      in its --help text), we should probably do the same for FUSE.
      
      Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
      Message-Id: <20210217115844.62661-1-mreitz@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      220222a0
  4. Mar 19, 2021
    • Kevin Wolf's avatar
      qemu-img: Use user_creatable_process_cmdline() for --object · 99b1e646
      Kevin Wolf authored
      
      This switches qemu-img from a QemuOpts-based parser for --object to
      user_creatable_process_cmdline() which uses a keyval parser and enforces
      the QAPI schema.
      
      Apart from being a cleanup, this makes non-scalar properties accessible.
      
      As a side effect, fix wrong exit codes in the object parsing error path
      of 'qemu-img compare'. This was broken in commit 334c43e2 because
      &error_fatal exits with an exit code of 1, while it should have been 2.
      
      Document that exit code 0 is also returned when just requested help was
      printed instead of comparing images. This is preexisting behaviour that
      isn't changed by this patch, though another instance of it is added with
      '--object help'.
      
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Acked-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Acked-by: default avatarPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      99b1e646
  5. Mar 08, 2021
  6. Mar 04, 2021
    • Dr. David Alan Gilbert's avatar
      virtiofs: drop remapped security.capability xattr as needed · e586edcb
      Dr. David Alan Gilbert authored
      
      On Linux, the 'security.capability' xattr holds a set of
      capabilities that can change when an executable is run, giving
      a limited form of privilege escalation to those programs that
      the writer of the file deemed worthy.
      
      Any write causes the 'security.capability' xattr to be dropped,
      stopping anyone from gaining privilege by modifying a blessed
      file.
      
      Fuse relies on the daemon to do this dropping, and in turn the
      daemon relies on the host kernel to drop the xattr for it.  However,
      with the addition of -o xattrmap, the xattr that the guest
      stores its capabilities in is now not the same as the one that
      the host kernel automatically clears.
      
      Where the mapping changes 'security.capability', explicitly clear
      the remapped name to preserve the same behaviour.
      
      This bug is assigned CVE-2021-20263.
      
      Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Reviewed-by: default avatarVivek Goyal <vgoyal@redhat.com>
      e586edcb
  7. Feb 25, 2021
  8. Feb 12, 2021
  9. Jan 19, 2021
    • Peter Maydell's avatar
      docs: Build and install all the docs in a single manual · b93f4fbd
      Peter Maydell authored
      
      When we first converted our documentation to Sphinx, we split it into
      multiple manuals (system, interop, tools, etc), which are all built
      separately.  The primary driver for this was wanting to be able to
      avoid shipping the 'devel' manual to end-users.  However, this is
      working against the grain of the way Sphinx wants to be used and
      causes some annoyances:
       * Cross-references between documents become much harder or
         possibly impossible
       * There is no single index to the whole documentation
       * Within one manual there's no links or table-of-contents info
         that lets you easily navigate to the others
       * The devel manual doesn't get published on the QEMU website
         (it would be nice to able to refer to it there)
      
      Merely hiding our developer documentation from end users seems like
      it's not enough benefit for these costs.  Combine all the
      documentation into a single manual (the same way that the readthedocs
      site builds it) and install the whole thing.  The previous manual
      divisions remain as the new top level sections in the manual.
      
       * The per-manual conf.py files are no longer needed
       * The man_pages[] specifications previously in each per-manual
         conf.py move to the top level conf.py
       * docs/meson.build logic is simplified as we now only need to run
         Sphinx once for the HTML and then once for the manpages5B
       * The old index.html.in that produced the top-level page with
         links to each manual is no longer needed
      
      Unfortunately this means that we now have to build the HTML
      documentation into docs/manual in the build tree rather than directly
      into docs/; otherwise it is too awkward to ensure we install only the
      built manual and not also the dependency info, stamp file, etc.  The
      manual still ends up in the same place in the final installed
      directory, but anybody who was consulting documentation from within
      the build tree will have to adjust where they're looking.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 20210115154449.4801-1-peter.maydell@linaro.org
      b93f4fbd
  10. Dec 18, 2020
    • Stefan Hajnoczi's avatar
      docs: add qemu-storage-daemon(1) man page · 1982e160
      Stefan Hajnoczi authored
      
      Document the qemu-storage-daemon tool. Most of the command-line options
      are identical to their QEMU counterparts. Perhaps Sphinx hxtool
      integration could be extended to extract documentation for individual
      command-line options so they can be shared. For now the
      qemu-storage-daemon simply refers to the qemu(1) man page where the
      command-line options are identical.
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Message-Id: <20201209103802.350848-3-stefanha@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      1982e160
  11. Nov 23, 2020
  12. Nov 18, 2020
  13. Nov 10, 2020
  14. Oct 30, 2020
    • Eric Blake's avatar
      nbd: Add 'qemu-nbd -A' to expose allocation depth · dbc7b014
      Eric Blake authored
      
      Allow the server to expose an additional metacontext to be requested
      by savvy clients.  qemu-nbd adds a new option -A to expose the
      qemu:allocation-depth metacontext through NBD_CMD_BLOCK_STATUS; this
      can also be set via QMP when using block-export-add.
      
      qemu as client is hacked into viewing the key aspects of this new
      context by abusing the already-experimental x-dirty-bitmap option to
      collapse all depths greater than 2, which results in a tri-state value
      visible in the output of 'qemu-img map --output=json' (yes, that means
      x-dirty-bitmap is now a bit of a misnomer, but I didn't feel like
      renaming it as it would introduce a needless break of back-compat,
      even though we make no compat guarantees with x- members):
      
      unallocated (depth 0) => "zero":false, "data":true
      local (depth 1)       => "zero":false, "data":false
      backing (depth 2+)    => "zero":true,  "data":true
      
      libnbd as client is probably a nicer way to get at the information
      without having to decipher such hacks in qemu as client. ;)
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <20201027050556.269064-11-eblake@redhat.com>
      Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      dbc7b014
  15. Oct 27, 2020
  16. Oct 26, 2020
  17. Oct 12, 2020
  18. Sep 25, 2020
  19. Sep 17, 2020
  20. Aug 28, 2020
  21. Jul 14, 2020
    • Eric Blake's avatar
      qcow2: Deprecate use of qemu-img amend to change backing file · bc5ee6da
      Eric Blake authored
      
      The use of 'qemu-img amend' to change qcow2 backing files is not
      tested very well.  In particular, our implementation has a bug where
      if a new backing file is provided without a format, then the prior
      format is blindly reused, even if this results in data corruption, but
      this is not caught by iotests.
      
      There are also situations where amending other options needs access to
      the original backing file (for example, on a downgrade to a v2 image,
      knowing whether a v3 zero cluster must be allocated or may be left
      unallocated depends on knowing whether the backing file already reads
      as zero), but the command line does not have a nice way to tell us
      both the backing file to use for opening the image as well as the
      backing file to install after the operation is complete.
      
      Even if we do allow changing the backing file, it is redundant with
      the existing ability to change backing files via 'qemu-img rebase -u'.
      It is time to deprecate this support (leaving the existing behavior
      intact, even if it is buggy), and at a point in the future, require
      the use of only 'qemu-img rebase' for adjusting backing chain
      relations, saving 'qemu-img amend' for changes unrelated to the
      backing chain.
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <20200706203954.341758-8-eblake@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      bc5ee6da
  22. Jul 06, 2020
  23. Jul 03, 2020
  24. Jun 09, 2020
  25. May 28, 2020
    • Eric Blake's avatar
      qemu-img: Add convert --bitmaps option · 15e39ad9
      Eric Blake authored
      Make it easier to copy all the persistent bitmaps of (the top layer
      of) a source image along with its guest-visible contents, by adding a
      boolean flag for use with qemu-img convert.  This is basically
      shorthand, as the same effect could be accomplished with a series of
      'qemu-img bitmap --add' and 'qemu-img bitmap --merge -b source'
      commands, or by their corresponding QMP commands.
      
      Note that this command will fail in the same scenarios where 'qemu-img
      measure' omits a 'bitmaps size:' line, namely, when either the source
      or the destination lacks persistent bitmap support altogether.
      
      See also https://bugzilla.redhat.com/show_bug.cgi?id=1779893
      
      
      
      While touching this, clean up a couple coding issues spotted in the
      same function: an extra blank line, and merging back-to-back 'if
      (!skip_create)' blocks.
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <20200521192137.1120211-5-eblake@redhat.com>
      Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      15e39ad9
    • Eric Blake's avatar
      qcow2: Expose bitmaps' size during measure · 5d72c68b
      Eric Blake authored
      It's useful to know how much space can be occupied by qcow2 persistent
      bitmaps, even though such metadata is unrelated to the guest-visible
      data.  Report this value as an additional QMP field, present when
      measuring an existing image and output format that both support
      bitmaps.  Update iotest 178 and 190 to updated output, as well as new
      coverage in 190 demonstrating non-zero values made possible with the
      recently-added qemu-img bitmap command (see 3b51ab4b).
      
      The new 'bitmaps size:' field is displayed automatically as part of
      'qemu-img measure' any time it is present in QMP (that is, any time
      both the source image being measured and destination format support
      bitmaps, even if the measurement is 0 because there are no bitmaps
      present).  If the field is absent, it means that no bitmaps can be
      copied (source, destination, or both lack bitmaps, including when
      measuring based on size rather than on a source image).  This behavior
      is compatible with an upcoming patch adding 'qemu-img convert
      --bitmaps': that command will fail in the same situations where this
      patch omits the field.
      
      The addition of a new field demonstrates why we should always
      zero-initialize qapi C structs; while the qcow2 driver still fully
      populates all fields, the raw and crypto drivers had to be tweaked to
      avoid uninitialized data.
      
      Consideration was also given towards having a 'qemu-img measure
      --bitmaps' which errors out when bitmaps are not possible, and
      otherwise sums the bitmaps into the existing allocation totals rather
      than displaying as a separate field, as a potential convenience
      factor.  But this was ultimately decided to be more complexity than
      necessary when the QMP interface was sufficient enough with bitmaps
      remaining a separate field.
      
      See also: https://bugzilla.redhat.com/1779904
      
      
      
      Reported-by: default avatarNir Soffer <nsoffer@redhat.com>
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <20200521192137.1120211-3-eblake@redhat.com>
      Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      5d72c68b
  26. May 19, 2020
    • Eric Blake's avatar
      qemu-img: Add bitmap sub-command · 3b51ab4b
      Eric Blake authored
      
      Include actions for --add, --remove, --clear, --enable, --disable, and
      --merge (note that --clear is a bit of fluff, because the same can be
      accomplished by removing a bitmap and then adding a new one in its
      place, but it matches what QMP commands exist).  Listing is omitted,
      because it does not require a bitmap name and because it was already
      possible with 'qemu-img info'.  A single command line can play one or
      more bitmap commands in sequence on the same bitmap name (although all
      added bitmaps share the same granularity, and and all merged bitmaps
      come from the same source file).  Merge defaults to other bitmaps in
      the primary image, but can also be told to merge bitmaps from a
      distinct image.
      
      While this supports --image-opts for the file being modified, I did
      not think it worth the extra complexity to support that for the source
      file in a cross-file merges.  Likewise, I chose to have --merge only
      take a single source rather than following the QMP support for
      multiple merges in one go (although you can still use more than one
      --merge in the command line); in part because qemu-img is offline and
      therefore atomicity is not an issue.
      
      Upcoming patches will add iotest coverage of these commands while
      also testing other features.
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
      Message-Id: <20200513011648.166876-7-eblake@redhat.com>
      Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      3b51ab4b
    • Eric Blake's avatar
      docs: Sort sections on qemu-img subcommand parameters · 6edb788f
      Eric Blake authored
      
      We already list the subcommand summaries alphabetically, we should do
      the same for the documentation related to subcommand-specific
      parameters.
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
      Message-Id: <20200513011648.166876-2-eblake@redhat.com>
      Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      6edb788f
  27. May 18, 2020
  28. Feb 25, 2020
Loading