qemu/block
Michael Tokarev 1b093c480a consolidate qemu_iovec_copy() and qemu_iovec_concat() and make them consistent
qemu_iovec_concat() is currently a wrapper for
qemu_iovec_copy(), use the former (with extra
"0" arg) in a few places where it is used.

Change skip argument of qemu_iovec_copy() from
uint64_t to size_t, since size of qiov itself
is size_t, so there's no way to skip larger
sizes.  Rename it to soffset, to make it clear
that the offset is applied to src.

Also change the only usage of uint64_t in
hw/9pfs/virtio-9p.c, in v9fs_init_qiov_from_pdu() -
all callers of it actually uses size_t too,
not uint64_t.

One added restriction: as for all other iovec-related
functions, soffset must point inside src.

Order of argumens is already good:
 qemu_iovec_memset(QEMUIOVector *qiov, size_t offset,
                   int c, size_t bytes)
vs:
 qemu_iovec_concat(QEMUIOVector *dst,
                   QEMUIOVector *src,
                   size_t soffset, size_t sbytes)
(note soffset is after _src_ not dst, since it applies to src;
for memset it applies to qiov).

Note that in many places where this function is used,
the previous call is qemu_iovec_reset(), which means
many callers actually want copy (replacing dst content),
not concat.  So we may want to add a wrapper like
qemu_iovec_copy() with the same arguments but which
calls qemu_iovec_reset() before _concat().

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2012-06-11 23:12:11 +04:00
..
blkdebug.c block: push recursive flushing up from drivers 2012-04-05 14:54:39 +02:00
blkverify.c block: replace unchecked strdup/malloc/calloc with glib 2012-01-26 11:39:03 +01:00
bochs.c block: take lock around bdrv_read implementations 2011-10-21 17:34:14 +02:00
cloop.c block/cloop: Use g_free instead of free 2011-11-04 14:24:12 +01:00
cow.c block: Fix spelling in comment (ineffcient -> inefficient) 2012-04-19 15:48:52 +02:00
curl.c allow qemu_iovec_from_buffer() to specify offset from which to start copying 2012-06-11 23:12:11 +04:00
dmg.c block: take lock around bdrv_read implementations 2011-10-21 17:34:14 +02:00
iscsi.c ISCSI: Switch to using READ16/WRITE16 for I/O to the LUN 2012-05-28 14:04:16 +02:00
nbd.c nbd: Fix uninitialised use of s->sock 2012-04-26 17:54:22 +02:00
parallels.c block: take lock around bdrv_read implementations 2011-10-21 17:34:14 +02:00
qcow.c allow qemu_iovec_from_buffer() to specify offset from which to start copying 2012-06-11 23:12:11 +04:00
qcow2-cache.c qcow2: Add some tracing 2012-03-12 15:14:06 +01:00
qcow2-cluster.c qcow2: Check qcow2_alloc_clusters_at() return value 2012-05-25 18:12:54 +02:00
qcow2-refcount.c qcow2: Support reading zero clusters 2012-04-20 15:57:29 +02:00
qcow2-snapshot.c qcow2: fix the return value -ENOENT -> -EEXIST 2012-05-02 18:39:39 +02:00
qcow2.c consolidate qemu_iovec_copy() and qemu_iovec_concat() and make them consistent 2012-06-11 23:12:11 +04:00
qcow2.h qcow2: Zero write support 2012-04-20 15:57:30 +02:00
qed-check.c qed: image fragmentation statistics 2012-04-05 14:54:40 +02:00
qed-cluster.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
qed-gencb.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
qed-l2-cache.c qed: do not evict in-use L2 table cache entries 2012-03-12 15:14:06 +01:00
qed-table.c block: bdrv_aio_* do not return NULL 2011-12-15 12:40:07 +01:00
qed.c consolidate qemu_iovec_copy() and qemu_iovec_concat() and make them consistent 2012-06-11 23:12:11 +04:00
qed.h qed: remove incoming live migration blocker 2012-04-05 16:29:12 +02:00
raw-posix-aio.h prepare for future GPLv2+ relicensing 2012-01-13 10:55:56 -06:00
raw-posix.c raw-posix: Do not use CONFIG_COCOA macro 2012-05-01 00:16:58 +02:00
raw-win32.c block: Rename bdrv_co_flush to bdrv_co_flush_to_disk 2011-11-11 14:02:59 +01:00
raw.c block: push recursive flushing up from drivers 2012-04-05 14:54:39 +02:00
rbd.c allow qemu_iovec_from_buffer() to specify offset from which to start copying 2012-06-11 23:12:11 +04:00
sheepdog.c sheepdog: fix return value of do_load_save_vm_state 2012-05-30 09:58:39 +02:00
stream.c block: fix warning introduced in efcc7a23 2012-05-10 09:10:42 -05:00
vdi.c vdi: change goto to loop 2012-04-05 14:54:40 +02:00
vmdk.c block: push recursive flushing up from drivers 2012-04-05 14:54:39 +02:00
vpc.c block/vpc: write checksum back to footer after check 2012-04-05 14:54:40 +02:00
vvfat.c block: prevent snapshot mode $TMPDIR symlink attack 2012-05-30 10:18:20 +02:00