1. 16 6月, 2009 24 次提交
  2. 15 6月, 2009 7 次提交
    • C
      raw-posix: cleanup ioctl methods · 63ec93db
      Christoph Hellwig 提交于
      Rename raw_ioctl and raw_aio_ioctl to hdev_ioctl and hdev_aio_ioctl as they
      are only used for the host device.  Also only add them to the method table
      for the cases where we need them (generic hdev if linux and linux CDROM)
      instead of declaring stubs and always add them.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      63ec93db
    • C
      block: add bdrv_probe_device method · 508c7cb3
      Christoph Hellwig 提交于
      Add a bdrv_probe_device method to all BlockDriver instances implementing
      host devices to move matching of host device types into the actual drivers.
      For now we keep exacly the old matching behaviour based on the devices names,
      although we really should have better detetion methods based on device
      information in the future.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      508c7cb3
    • C
      raw-posix: split hdev drivers · f3a5d3f8
      Christoph Hellwig 提交于
      Instead of declaring one BlockDriver for all host devices declared one
      for each type:  a generic one for normal disk devices, a Linux floppy
      driver and a CDROM driver for Linux and FreeBSD.  This gets rid of a lot
      of messy ifdefs and switching based on the type in the various removal
      device methods.
      
      block.c grows a new method to find the correct host device driver based
      on OS-sepcific criteria, which will later into the actual drivers in a
      later patch in this series.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      f3a5d3f8
    • C
      raw-posix: add a raw_open_common helper · 90babde0
      Christoph Hellwig 提交于
      raw_open and hdev_open contain the same basic logic.  Add a new
      raw_open_common helper containing the guts of the open routine
      and call it from raw_open and hdev_open.
      
      We use the new open_flags field in BDRVRawState to allow passing
      additional open flags to raw_open_common from both.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      90babde0
    • C
      raw-posix: always store open flags · 0e1d8f4c
      Christoph Hellwig 提交于
      Both the Linux floppy and the FreeBSD CDROM host device need to store
      the open flags so that they can re-open the device later.  Store the
      open flags unconditionally to remove the ifdef mess and simply the
      calling conventions for the later patches in the series.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      0e1d8f4c
    • A
      fix qemu_aio_flush · 986c28d6
      Andrea Arcangeli 提交于
      qemu_aio_wait by invoking the bh or one of the aio completion
      callbacks, could end up submitting new pending aio, breaking the
      invariant that qemu_aio_flush returns only when no pending aio is
      outstanding (possibly a problem for migration as such).
      Signed-off-by: NAndrea Arcangeli <aarcange@redhat.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Acked-by: NKevin Wolf <kwolf@redhat.com>
      986c28d6
    • G
      Add rtc reset function. · eeb7c03c
      Gleb Natapov 提交于
      On reset:
      Periodic Interrupt Enable (PIE) bit is cleared to zero
      Alarm Interrupt Enable (AIE) bit is cleared to zero
      Update ended Interrupt Flag (UF) bit is cleared to zero
      Interrupt Request status Flag (IRQF) bit is cleared to zero
      Periodic Interrupt Flag (PF) bit is cleared to zero
      Alarm Interrupt Flag (AF) bit is cleared to zero
      Square Wave output Enable (SQWE) zero
      Signed-off-by: NGleb Natapov <gleb@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      eeb7c03c
  3. 14 6月, 2009 8 次提交
  4. 13 6月, 2009 1 次提交