1. 01 3月, 2017 1 次提交
  2. 24 2月, 2017 1 次提交
    • K
      block: Attach bs->file only during .bdrv_open() · 4e4bf5c4
      Kevin Wolf 提交于
      The way that attaching bs->file worked was a bit unusual in that it was
      the only child that would be attached to a node which is not opened yet.
      Because of this, the block layer couldn't know yet which permissions the
      driver would eventually need.
      
      This patch moves the point where bs->file is attached to the beginning
      of the individual .bdrv_open() implementations, so drivers already know
      what they are going to do with the child. This is also more consistent
      with how driver-specific children work.
      
      For a moment, bdrv_open() gets its own BdrvChild to perform image
      probing, but instead of directly assigning this BdrvChild to the BDS, it
      becomes a temporary one and the node name is passed as an option to the
      drivers, so that they can simply use bdrv_open_child() to create another
      reference for their own use.
      
      This duplicated child for (the not opened yet) bs is not the final
      state, a follow-up patch will change the image probing code to use a
      BlockBackend, which is completely independent of bs.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      4e4bf5c4
  3. 07 10月, 2016 1 次提交
    • F
      dmg: Move libbz2 code to dmg-bz2.so · 27685a8d
      Fam Zheng 提交于
      dmg.o was moved to block-obj-m in 5505e8b7 to become a separate module,
      so that its reference to libbz2, since 6b383c08, doesn't add an extra
      library to the main executable.
      
      Until recently, commit 06e60f70a (blockdev: Add dynamic module loading
      for block drivers) moved it back to block-obj-y to simplify the design
      of dynamic loading of block modules. But we don't want to lose the
      feature of less library dependency on the main executable.
      
      The solution here is to move only the bz2 related code to a separate
      DSO file, and load it when dmg_open is called.
      
      dmg_probe doesn't depend on bz2 support to work, and is the only code in
      this file which can run before dmg_open.
      
      While we are at it, fix the unhelpful cast of last argument passed to
      dmg_uncompress_bz2.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-id: 1473043845-13197-4-git-send-email-famz@redhat.com
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      27685a8d
  4. 05 7月, 2016 4 次提交
  5. 07 6月, 2016 1 次提交
  6. 12 5月, 2016 1 次提交
  7. 23 3月, 2016 1 次提交
    • M
      include/qemu/osdep.h: Don't include qapi/error.h · da34e65c
      Markus Armbruster 提交于
      Commit 57cb38b3 included qapi/error.h into qemu/osdep.h to get the
      Error typedef.  Since then, we've moved to include qemu/osdep.h
      everywhere.  Its file comment explains: "To avoid getting into
      possible circular include dependencies, this file should not include
      any other QEMU headers, with the exceptions of config-host.h,
      compiler.h, os-posix.h and os-win32.h, all of which are doing a
      similar job to this file and are under similar constraints."
      qapi/error.h doesn't do a similar job, and it doesn't adhere to
      similar constraints: it includes qapi-types.h.  That's in excess of
      100KiB of crap most .c files don't actually need.
      
      Add the typedef to qemu/typedefs.h, and include that instead of
      qapi/error.h.  Include qapi/error.h in .c files that need it and don't
      get it now.  Include qapi-types.h in qom/object.h for uint16List.
      
      Update scripts/clean-includes accordingly.  Update it further to match
      reality: replace config.h by config-target.h, add sysemu/os-posix.h,
      sysemu/os-win32.h.  Update the list of includes in the qemu/osdep.h
      comment quoted above similarly.
      
      This reduces the number of objects depending on qapi/error.h from "all
      of them" to less than a third.  Unfortunately, the number depending on
      qapi-types.h shrinks only a little.  More work is needed for that one.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      [Fix compilation without the spice devel packages. - Paolo]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      da34e65c
  8. 20 1月, 2016 1 次提交
  9. 16 10月, 2015 1 次提交
  10. 23 6月, 2015 1 次提交
  11. 07 2月, 2015 12 次提交
  12. 15 8月, 2014 1 次提交
  13. 30 4月, 2014 1 次提交
  14. 01 4月, 2014 7 次提交
  15. 12 9月, 2013 1 次提交
  16. 23 3月, 2013 1 次提交
  17. 15 3月, 2013 1 次提交
  18. 01 2月, 2013 2 次提交
  19. 19 12月, 2012 1 次提交