1. 08 3月, 2019 4 次提交
  2. 20 2月, 2019 2 次提交
  3. 14 2月, 2019 1 次提交
  4. 12 2月, 2019 1 次提交
  5. 01 2月, 2019 2 次提交
  6. 31 1月, 2019 1 次提交
  7. 15 1月, 2019 2 次提交
  8. 14 12月, 2018 2 次提交
  9. 05 11月, 2018 1 次提交
    • K
      block: Add auto-read-only option · e35bdc12
      Kevin Wolf 提交于
      If a management application builds the block graph node by node, the
      protocol layer doesn't inherit its read-only option from the format
      layer any more, so it must be set explicitly.
      
      Backing files should work on read-only storage, but at the same time, a
      block job like commit should be able to reopen them read-write if they
      are on read-write storage. However, without option inheritance, reopen
      only changes the read-only option for the root node (typically the
      format layer), but not the protocol layer, so reopening fails (the
      format layer wants to get write permissions, but the protocol layer is
      still read-only).
      
      A simple workaround for the problem in the management tool would be to
      open the protocol layer always read-write and to make only the format
      layer read-only for backing files. However, sometimes the file is
      actually stored on read-only storage and we don't know whether the image
      can be opened read-write (for example, for NBD it depends on the server
      we're trying to connect to). This adds an option that makes QEMU try to
      open the image read-write, but allows it to degrade to a read-only mode
      without returning an error.
      
      The documentation for this option is consciously phrased in a way that
      allows QEMU to switch to a better model eventually: Instead of trying
      when the image is first opened, making the read-only flag dynamic and
      changing it automatically whenever the first BLK_PERM_WRITE user is
      attached or the last one is detached would be much more useful
      behaviour.
      
      Unfortunately, this more useful behaviour is also a lot harder to
      implement, and libvirt needs a solution now before it can switch to
      -blockdev, so let's start with this easier approach for now.
      
      Instead of adding a new auto-read-only option, turning the existing
      read-only into an enum (with a bool alternate for compatibility) was
      considered, but it complicated the implementation to the point that it
      didn't seem to be worth it.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      e35bdc12
  10. 30 10月, 2018 1 次提交
  11. 02 10月, 2018 1 次提交
  12. 01 10月, 2018 1 次提交
  13. 27 9月, 2018 1 次提交
  14. 25 9月, 2018 5 次提交
  15. 15 8月, 2018 2 次提交
  16. 30 7月, 2018 1 次提交
  17. 10 7月, 2018 2 次提交
  18. 05 7月, 2018 3 次提交
    • A
      block/blklogwrites: Add an option for the update interval of the log superblock · 1dce698e
      Ari Sundholm 提交于
      This is a way to ensure that the log superblock is periodically
      updated. Before, this was only done on flush requests, which may
      not be enough if the VM exits abnormally, omitting the final flush.
      
      The default interval is 4096 write requests.
      Signed-off-by: NAri Sundholm <ari@tuxera.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      1dce698e
    • A
      block/blklogwrites: Add an option for appending to an old log · 0878b3c1
      Ari Sundholm 提交于
      Suggested by Kevin Wolf. May be useful when testing multiple batches
      of writes or doing long-term testing involving restarts of the VM.
      Signed-off-by: NAri Sundholm <ari@tuxera.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      0878b3c1
    • A
      block: Add blklogwrites · bfcc224e
      Aapo Vienamo 提交于
      Implements a block device write logging system, similar to Linux kernel
      device mapper dm-log-writes. The write operations that are performed
      on a block device are logged to a file or another block device. The
      write log format is identical to the dm-log-writes format. Currently,
      log markers are not supported.
      
      This functionality can be used for crash consistency and fs consistency
      testing. By implementing it in qemu, tests utilizing write logs can be
      be used to test non-Linux drivers and older kernels.
      
      The driver accepts an optional parameter to set the sector size used
      for logging. This makes the driver require all requests to be aligned
      to this sector size and also makes offsets and sizes of writes in the
      log metadata to be expressed in terms of this value (the log format has
      a granularity of one sector for offsets and sizes). This allows
      accurate logging of writes to guest block devices that have unusual
      sector sizes.
      
      The implementation is based on the blkverify and blkdebug block
      drivers.
      Signed-off-by: NAapo Vienamo <aapo@tuxera.com>
      Signed-off-by: NAri Sundholm <ari@tuxera.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      bfcc224e
  19. 03 7月, 2018 1 次提交
    • E
      nbd/client: Add x-dirty-bitmap to query bitmap from server · 216ee365
      Eric Blake 提交于
      In order to test that the NBD server is properly advertising
      dirty bitmaps, we need a bare minimum client that can request
      and read the context.  Since feature freeze for 3.0 is imminent,
      this is the smallest workable patch, which replaces the qemu
      block status report with the results of the NBD server's dirty
      bitmap (making it very easy to use 'qemu-img map --output=json'
      to learn where the dirty portions are).  Note that the NBD
      protocol defines a dirty section with the same bit but opposite
      sense that normal "base:allocation" uses to report an allocated
      section; so in qemu-img map output, "data":true corresponds to
      clean, "data":false corresponds to dirty.
      
      A more complete solution that allows dirty bitmaps to be queried
      at the same time as normal block status will be required before
      this addition can lose the x- prefix.  Until then, the fact that
      this replaces normal status with dirty status means actions
      like 'qemu-img convert' will likely misbehave due to treating
      dirty regions of the file as if they are unallocated.
      
      The next patch adds an iotest to exercise this new code.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20180702191458.28741-2-eblake@redhat.com>
      216ee365
  20. 22 6月, 2018 1 次提交
  21. 18 6月, 2018 2 次提交
    • M
      block/mirror: Add copy mode QAPI interface · 481debaa
      Max Reitz 提交于
      This patch allows the user to specify whether to use active or only
      background mode for mirror block jobs.  Currently, this setting will
      remain constant for the duration of the entire block job.
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NAlberto Garcia <berto@igalia.com>
      Message-id: 20180613181823.13618-14-mreitz@redhat.com
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      481debaa
    • M
      block/mirror: Add active mirroring · d06107ad
      Max Reitz 提交于
      This patch implements active synchronous mirroring.  In active mode, the
      passive mechanism will still be in place and is used to copy all
      initially dirty clusters off the source disk; but every write request
      will write data both to the source and the target disk, so the source
      cannot be dirtied faster than data is mirrored to the target.  Also,
      once the block job has converged (BLOCK_JOB_READY sent), source and
      target are guaranteed to stay in sync (unless an error occurs).
      
      Active mode is completely optional and currently disabled at runtime.  A
      later patch will add a way for users to enable it.
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Message-id: 20180613181823.13618-13-mreitz@redhat.com
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      d06107ad
  22. 15 6月, 2018 2 次提交
    • M
      rbd: New parameter key-secret · d083f954
      Markus Armbruster 提交于
      Legacy -drive supports "password-secret" parameter that isn't
      available with -blockdev / blockdev-add.  That's because we backed out
      our first try to provide it there due to interface design doubts, in
      commit 577d8c9a, v2.9.0.
      
      This is the second try.  It brings back the parameter, except it's
      named "key-secret" now.
      
      Let's review our reasons for backing out the first try, as stated in
      the commit message:
      
          * BlockdevOptionsRbd member @password-secret isn't actually a
            password, it's a key generated by Ceph.
      
      Addressed by the rename.
      
          * We're not sure where member @password-secret belongs (see the
            previous commit).
      
      See previous commit.
      
          * How @password-secret interacts with settings from a configuration
            file specified with @conf is undocumented.
      
      Not actually true, the documentation for @conf says "Values in the
      configuration file will be overridden by options specified via QAPI",
      and we've tested this.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      d083f954
    • M
      rbd: New parameter auth-client-required · a3699de4
      Markus Armbruster 提交于
      Parameter auth-client-required lets you configure authentication
      methods.  We tried to provide that in v2.9.0, but backed out due to
      interface design doubts (commit 464444fc).
      
      This commit is similar to what we backed out, but simpler: we use a
      list of enumeration values instead of a list of objects with a member
      of enumeration type.
      
      Let's review our reasons for backing out the first try, as stated in
      the commit message:
      
          * The implementation uses deprecated rados_conf_set() key
            "auth_supported".  No biggie.
      
      Fixed: we use "auth-client-required".
      
          * The implementation makes -drive silently ignore invalid parameters
            "auth" and "auth-supported.*.X" where X isn't "auth".  Fixable (in
            fact I'm going to fix similar bugs around parameter server), so
            again no biggie.
      
      That fix is commit 2836284d.  This commit doesn't bring the bugs
      back.
      
          * BlockdevOptionsRbd member @password-secret applies only to
            authentication method cephx.  Should it be a variant member of
            RbdAuthMethod?
      
      We've had time to ponder, and we decided to stick to the way Ceph
      configuration works: the key configured separately, and silently
      ignored if the authentication method doesn't use it.
      
          * BlockdevOptionsRbd member @user could apply to both methods cephx
            and none, but I'm not sure it's actually used with none.  If it
            isn't, should it be a variant member of RbdAuthMethod?
      
      Likewise.
      
          * The client offers a *set* of authentication methods, not a list.
            Should the methods be optional members of BlockdevOptionsRbd instead
            of members of list @auth-supported?  The latter begs the question
            what multiple entries for the same method mean.  Trivial question
            now that RbdAuthMethod contains nothing but @type, but less so when
            RbdAuthMethod acquires other members, such the ones discussed above.
      
      Again, we decided to stick to the way Ceph configuration works, except
      we make auth-client-required a list of enumeration values instead of a
      string containing keywords separated by delimiters.
      
          * How BlockdevOptionsRbd member @auth-supported interacts with
            settings from a configuration file specified with @conf is
            undocumented.  I suspect it's untested, too.
      
      Not actually true, the documentation for @conf says "Values in the
      configuration file will be overridden by options specified via QAPI",
      and we've tested this.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      a3699de4
  23. 12 6月, 2018 1 次提交