~ubuntu-branches/ubuntu/trusty/qemu/trusty

« back to all changes in this revision

Viewing changes to include/block/block.h

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2013-10-22 22:47:07 UTC
  • mfrom: (1.8.3) (10.1.42 sid)
  • Revision ID: package-import@ubuntu.com-20131022224707-1lya34fw3k3f24tv
Tags: 1.6.0+dfsg-2ubuntu1
* Merge 1.6.0~rc0+dfsg-2exp from debian experimental.  Remaining changes:
  - debian/control
    * update maintainer
    * remove libiscsi, usb-redir, vde, vnc-jpeg, and libssh2-1-dev
      from build-deps
    * enable rbd
    * add qemu-system and qemu-common B/R to qemu-keymaps
    * add D:udev, R:qemu, R:qemu-common and B:qemu-common to
      qemu-system-common
    * qemu-system-arm, qemu-system-ppc, qemu-system-sparc:
      - add qemu-kvm to Provides
      - add qemu-common, qemu-kvm, kvm to B/R
      - remove openbios-sparc from qemu-system-sparc D
      - drop openbios-ppc and openhackware Depends to Suggests (for now)
    * qemu-system-x86:
      - add qemu-common to Breaks/Replaces.
      - add cpu-checker to Recommends.
    * qemu-user: add B/R:qemu-kvm
    * qemu-kvm:
      - add armhf armel powerpc sparc to Architecture
      - C/R/P: qemu-kvm-spice
    * add qemu-common package
    * drop qemu-slof which is not packaged in ubuntu
  - add qemu-system-common.links for tap ifup/down scripts and OVMF link.
  - qemu-system-x86.links:
    * remove pxe rom links which are in kvm-ipxe
    * add symlink for kvm.1 manpage
  - debian/rules
    * add kvm-spice symlink to qemu-kvm
    * call dh_installmodules for qemu-system-x86
    * update dh_installinit to install upstart script
    * run dh_installman (Closes: #709241) (cherrypicked from 1.5.0+dfsg-2)
  - Add qemu-utils.links for kvm-* symlinks.
  - Add qemu-system-x86.qemu-kvm.upstart and .default
  - Add qemu-system-x86.modprobe to set nesting=1
  - Add qemu-system-common.preinst to add kvm group
  - qemu-system-common.postinst: remove bad group acl if there, then have
    udev relabel /dev/kvm.
  - New linaro patches from qemu-linaro rebasing branch
  - Dropped patches:
    * xen-simplify-xen_enabled.patch
    * sparc-linux-user-fix-missing-symbols-in-.rel-.rela.plt-sections.patch
    * main_loop-do-not-set-nonblocking-if-xen_enabled.patch
    * xen_machine_pv-do-not-create-a-dummy-CPU-in-machine-.patch
    * virtio-rng-fix-crash
  - Kept patches:
    * expose_vms_qemu64cpu.patch - updated
    * linaro arm patches from qemu-linaro rebasing branch
  - New patches:
    * fix-pci-add: change CONFIG variable in ifdef to make sure that
      pci_add is defined.
* Add linaro patches
* Add experimental mach-virt patches for arm virtualization.
* qemu-system-common.install: add debian/tmp/usr/lib to install the
  qemu-bridge-helper

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
    uint64_t compressed_clusters;
28
28
} BlockFragInfo;
29
29
 
30
 
typedef struct QEMUSnapshotInfo {
31
 
    char id_str[128]; /* unique snapshot id */
32
 
    /* the following fields are informative. They are not needed for
33
 
       the consistency of the snapshot */
34
 
    char name[256]; /* user chosen name */
35
 
    uint64_t vm_state_size; /* VM state info size */
36
 
    uint32_t date_sec; /* UTC date of the snapshot */
37
 
    uint32_t date_nsec;
38
 
    uint64_t vm_clock_nsec; /* VM clock relative to boot */
39
 
} QEMUSnapshotInfo;
40
 
 
41
30
/* Callbacks for block device models */
42
31
typedef struct BlockDevOps {
43
32
    /*
122
111
 
123
112
void bdrv_init(void);
124
113
void bdrv_init_with_whitelist(void);
125
 
BlockDriver *bdrv_find_protocol(const char *filename);
 
114
BlockDriver *bdrv_find_protocol(const char *filename,
 
115
                                bool allow_protocol_prefix);
126
116
BlockDriver *bdrv_find_format(const char *format_name);
127
 
BlockDriver *bdrv_find_whitelisted_format(const char *format_name);
 
117
BlockDriver *bdrv_find_whitelisted_format(const char *format_name,
 
118
                                          bool readonly);
128
119
int bdrv_create(BlockDriver *drv, const char* filename,
129
120
    QEMUOptionParameter *options);
130
121
int bdrv_create_file(const char* filename, QEMUOptionParameter *options);
166
157
                          uint8_t *buf, int nb_sectors);
167
158
int bdrv_write(BlockDriverState *bs, int64_t sector_num,
168
159
               const uint8_t *buf, int nb_sectors);
 
160
int bdrv_write_zeroes(BlockDriverState *bs, int64_t sector_num,
 
161
               int nb_sectors);
169
162
int bdrv_writev(BlockDriverState *bs, int64_t sector_num, QEMUIOVector *qiov);
170
163
int bdrv_pread(BlockDriverState *bs, int64_t offset,
171
164
               void *buf, int count);
276
269
/* Ensure contents are flushed to disk.  */
277
270
int bdrv_flush(BlockDriverState *bs);
278
271
int coroutine_fn bdrv_co_flush(BlockDriverState *bs);
279
 
void bdrv_flush_all(void);
 
272
int bdrv_flush_all(void);
280
273
void bdrv_close_all(void);
281
274
void bdrv_drain_all(void);
282
275
 
283
276
int bdrv_discard(BlockDriverState *bs, int64_t sector_num, int nb_sectors);
284
277
int bdrv_co_discard(BlockDriverState *bs, int64_t sector_num, int nb_sectors);
 
278
int bdrv_has_zero_init_1(BlockDriverState *bs);
285
279
int bdrv_has_zero_init(BlockDriverState *bs);
286
280
int bdrv_is_allocated(BlockDriverState *bs, int64_t sector_num, int nb_sectors,
287
281
                      int *pnum);
328
322
                               char *filename, int filename_size);
329
323
void bdrv_get_full_backing_filename(BlockDriverState *bs,
330
324
                                    char *dest, size_t sz);
331
 
BlockInfo *bdrv_query_info(BlockDriverState *s);
332
 
BlockStats *bdrv_query_stats(const BlockDriverState *bs);
333
 
int bdrv_can_snapshot(BlockDriverState *bs);
334
325
int bdrv_is_snapshot(BlockDriverState *bs);
335
 
BlockDriverState *bdrv_snapshots(void);
336
 
int bdrv_snapshot_create(BlockDriverState *bs,
337
 
                         QEMUSnapshotInfo *sn_info);
338
 
int bdrv_snapshot_goto(BlockDriverState *bs,
339
 
                       const char *snapshot_id);
340
 
int bdrv_snapshot_delete(BlockDriverState *bs, const char *snapshot_id);
341
 
int bdrv_snapshot_list(BlockDriverState *bs,
342
 
                       QEMUSnapshotInfo **psn_info);
343
 
int bdrv_snapshot_load_tmp(BlockDriverState *bs,
344
 
                           const char *snapshot_name);
345
 
char *bdrv_snapshot_dump(char *buf, int buf_size, QEMUSnapshotInfo *sn);
346
326
 
347
 
char *get_human_readable_size(char *buf, int buf_size, int64_t size);
348
327
int path_is_absolute(const char *path);
349
328
void path_combine(char *dest, int dest_size,
350
329
                  const char *base_path,
449
428
    BLKDBG_CLUSTER_ALLOC_BYTES,
450
429
    BLKDBG_CLUSTER_FREE,
451
430
 
 
431
    BLKDBG_FLUSH_TO_OS,
 
432
    BLKDBG_FLUSH_TO_DISK,
 
433
 
452
434
    BLKDBG_EVENT_MAX,
453
435
} BlkDebugEvent;
454
436