Merge remote-tracking branch 'mjt/trivial-patches' into staging
# By Fam Zheng (1) and others # Via Michael Tokarev * mjt/trivial-patches: vmdk: fix comment for vmdk_co_write_zeroes memory.c: drop kvm.h dependency block/iscsi.c: Fix printf format error. qemu-ga: build it even if !system Message-id: 1375453248-7178-1-git-send-email-mjt@msgid.tls.msk.ru Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
commit
f5e7dad8ee
@ -247,7 +247,9 @@ static bool is_request_lun_aligned(int64_t sector_num, int nb_sectors,
|
||||
{
|
||||
if ((sector_num * BDRV_SECTOR_SIZE) % iscsilun->block_size ||
|
||||
(nb_sectors * BDRV_SECTOR_SIZE) % iscsilun->block_size) {
|
||||
error_report("iSCSI misaligned request: iscsilun->block_size %u, sector_num %ld, nb_sectors %d",
|
||||
error_report("iSCSI misaligned request: "
|
||||
"iscsilun->block_size %u, sector_num %" PRIi64
|
||||
", nb_sectors %d",
|
||||
iscsilun->block_size, sector_num, nb_sectors);
|
||||
return 0;
|
||||
}
|
||||
|
@ -1200,8 +1200,10 @@ static coroutine_fn int vmdk_co_read(BlockDriverState *bs, int64_t sector_num,
|
||||
/**
|
||||
* vmdk_write:
|
||||
* @zeroed: buf is ignored (data is zero), use zeroed_grain GTE feature
|
||||
* if possible, otherwise return -ENOTSUP.
|
||||
* @zero_dry_run: used for zeroed == true only, don't update L2 table, just
|
||||
* if possible, otherwise return -ENOTSUP.
|
||||
* @zero_dry_run: used for zeroed == true only, don't update L2 table, just try
|
||||
* with each cluster. By dry run we can find if the zero write
|
||||
* is possible without modifying image data.
|
||||
*
|
||||
* Returns: error code with 0 for success.
|
||||
*/
|
||||
@ -1328,6 +1330,8 @@ static int coroutine_fn vmdk_co_write_zeroes(BlockDriverState *bs,
|
||||
int ret;
|
||||
BDRVVmdkState *s = bs->opaque;
|
||||
qemu_co_mutex_lock(&s->lock);
|
||||
/* write zeroes could fail if sectors not aligned to cluster, test it with
|
||||
* dry_run == true before really updating image */
|
||||
ret = vmdk_write(bs, sector_num, NULL, nb_sectors, true, true);
|
||||
if (!ret) {
|
||||
ret = vmdk_write(bs, sector_num, NULL, nb_sectors, true, false);
|
||||
|
11
configure
vendored
11
configure
vendored
@ -231,7 +231,7 @@ libusb=""
|
||||
usb_redir=""
|
||||
glx=""
|
||||
zlib="yes"
|
||||
guest_agent="yes"
|
||||
guest_agent=""
|
||||
want_tools="yes"
|
||||
libiscsi=""
|
||||
coroutine=""
|
||||
@ -3444,10 +3444,15 @@ if test "$softmmu" = yes ; then
|
||||
virtfs=no
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ "$guest_agent" != "no" ]; then
|
||||
if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
|
||||
if [ "$guest_agent" = "yes" ]; then
|
||||
tools="qemu-ga\$(EXESUF) $tools"
|
||||
fi
|
||||
guest_agent=yes
|
||||
elif [ "$guest_agent" != yes ]; then
|
||||
guest_agent=no
|
||||
else
|
||||
error_exit "Guest agent is not supported on this platform"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user