mirror of https://gitee.com/openkylin/qemu.git
Block layer patches:
- vvfat: Disable debug message by default - qemu-iotests fixes - Fix typos in comments -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJbVgX4AAoJEH8JsnLIjy/WAJkQAIO61ydCkVEGch9GBThPHKlH wqmE2jVfiM08aFKrfNXvIyJTvYskZ78PCFSLwKp2SSJsggkmSc2RyQUkZJEw1ECx wS3rW6OynwwfcDBJkUiM2J21r0eByuxZpn1hQUv7sX1ZaxXmmwB4fGS4F+fNi2j1 kxQIvWbsxswB58v0jcpZiidJGgrBlxxR3TyBN2d2bnfLEJSRUoCHUqq7d1KIgQA2 YfVKEt0La6w9IuXWrfzXps3sZlMWoJn8AoEjHzTUEnxWZE0TgsQPfFEbkxeCnaYv /JqeVw6ErJm46swgxWtPEkK3vjBBAum5wZ6USPi/KDhULVRh4djVrAzhUN1Y87YR p2U1GEnpCPRL6bgq22eHD6ub70wn02FpgCuHIsK044xMjOvGhpsCnPUMlkNHBAZU BCroEJ3OWOxZaedb4vPaVicOAnoBuxJWzuUBpbrX/a6w7r8vP/Xy540NHcL3RetO +N1YgtTuc8J7Kleo35MvQAZtEfwcOt0JOeGED0facpqcQunVY7u7lAbbH7gqvhbk biuw7+u7lvvy3jYwVmBP+KYU686voqE6o9zE42dtUPbtdqDPdQ6Cf6/Iwipu/RKI UZVVNP0gzXhSG5pMRKbbOFgHa1wU+tF7iedckGwsuC+97Scq5kekT+nKlwn4RDI1 o8Vd8Uql8lz88rbKdirX =YWeJ -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging Block layer patches: - vvfat: Disable debug message by default - qemu-iotests fixes - Fix typos in comments # gpg: Signature made Mon 23 Jul 2018 17:44:40 BST # gpg: using RSA key 7F09B272C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6 * remotes/kevin/tags/for-upstream: block/vvfat: Disable debug message by default iotests: Disallow compat=0.10 in 223 iotest: Fix filtering order in 226 iotests: remove LUKS support from test 226 qemu-img: avoid overflow of min_sparse parameter block: Fix typos in comments (found by codespell) qemu-iotests: Use host_device instead of file in 149 Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
5c29b203df
2
block.c
2
block.c
|
@ -3002,7 +3002,7 @@ BlockReopenQueue *bdrv_reopen_queue(BlockReopenQueue *bs_queue,
|
|||
*
|
||||
* Reopens all BDS specified in the queue, with the appropriate
|
||||
* flags. All devices are prepared for reopen, and failure of any
|
||||
* device will cause all device changes to be abandonded, and intermediate
|
||||
* device will cause all device changes to be abandoned, and intermediate
|
||||
* data cleaned up.
|
||||
*
|
||||
* If all devices prepare successfully, then the changes are committed
|
||||
|
|
|
@ -91,7 +91,7 @@ static void cow_request_end(CowRequest *req)
|
|||
}
|
||||
|
||||
/* Copy range to target with a bounce buffer and return the bytes copied. If
|
||||
* error occured, return a negative error number */
|
||||
* error occurred, return a negative error number */
|
||||
static int coroutine_fn backup_cow_with_bounce_buffer(BackupBlockJob *job,
|
||||
int64_t start,
|
||||
int64_t end,
|
||||
|
@ -148,7 +148,7 @@ fail:
|
|||
|
||||
}
|
||||
|
||||
/* Copy range to target and return the bytes copied. If error occured, return a
|
||||
/* Copy range to target and return the bytes copied. If error occurred, return a
|
||||
* negative error number. */
|
||||
static int coroutine_fn backup_cow_with_offload(BackupBlockJob *job,
|
||||
int64_t start,
|
||||
|
|
|
@ -804,7 +804,7 @@ static int curl_open(BlockDriverState *bs, QDict *options, int flags,
|
|||
}
|
||||
/* Prior CURL 7.19.4 return value of 0 could mean that the file size is not
|
||||
* know or the size is zero. From 7.19.4 CURL returns -1 if size is not
|
||||
* known and zero if it is realy zero-length file. */
|
||||
* known and zero if it is really zero-length file. */
|
||||
#if LIBCURL_VERSION_NUM >= 0x071304
|
||||
if (d < 0) {
|
||||
pstrcpy(state->errmsg, CURL_ERROR_SIZE,
|
||||
|
|
|
@ -1326,7 +1326,7 @@ static int qemu_gluster_has_zero_init(BlockDriverState *bs)
|
|||
* If @start is in a trailing hole or beyond EOF, return -ENXIO.
|
||||
* If we can't find out, return a negative errno other than -ENXIO.
|
||||
*
|
||||
* (Shamefully copied from file-posix.c, only miniscule adaptions.)
|
||||
* (Shamefully copied from file-posix.c, only minuscule adaptions.)
|
||||
*/
|
||||
static int find_allocation(BlockDriverState *bs, off_t start,
|
||||
off_t *data, off_t *hole)
|
||||
|
|
|
@ -185,7 +185,7 @@ uint32_t vhdx_checksum_calc(uint32_t crc, uint8_t *buf, size_t size,
|
|||
/* Validates the checksum of the buffer, with an in-place CRC.
|
||||
*
|
||||
* Zero is substituted during crc calculation for the original crc field,
|
||||
* and the crc field is restored afterwards. But the buffer will be modifed
|
||||
* and the crc field is restored afterwards. But the buffer will be modified
|
||||
* during the calculation, so this may not be not suitable for multi-threaded
|
||||
* use.
|
||||
*
|
||||
|
|
|
@ -1245,8 +1245,8 @@ static int vvfat_open(BlockDriverState *bs, QDict *options, int flags,
|
|||
s->fat2 = NULL;
|
||||
s->downcase_short_names = 1;
|
||||
|
||||
fprintf(stderr, "vvfat %s chs %d,%d,%d\n",
|
||||
dirname, cyls, heads, secs);
|
||||
DLOG(fprintf(stderr, "vvfat %s chs %d,%d,%d\n",
|
||||
dirname, cyls, heads, secs));
|
||||
|
||||
s->sector_count = cyls * heads * secs - s->offset_to_bootsector;
|
||||
|
||||
|
|
16
qemu-img.c
16
qemu-img.c
|
@ -2005,6 +2005,8 @@ static int convert_do_copy(ImgConvertState *s)
|
|||
return s->ret;
|
||||
}
|
||||
|
||||
#define MAX_BUF_SECTORS 32768
|
||||
|
||||
static int img_convert(int argc, char **argv)
|
||||
{
|
||||
int c, bs_i, flags, src_flags = 0;
|
||||
|
@ -2100,8 +2102,12 @@ static int img_convert(int argc, char **argv)
|
|||
int64_t sval;
|
||||
|
||||
sval = cvtnum(optarg);
|
||||
if (sval < 0) {
|
||||
error_report("Invalid minimum zero buffer size for sparse output specified");
|
||||
if (sval < 0 || sval & (BDRV_SECTOR_SIZE - 1) ||
|
||||
sval / BDRV_SECTOR_SIZE > MAX_BUF_SECTORS) {
|
||||
error_report("Invalid buffer size for sparse output specified. "
|
||||
"Valid sizes are multiples of %llu up to %llu. Select "
|
||||
"0 to disable sparse detection (fully allocates output).",
|
||||
BDRV_SECTOR_SIZE, MAX_BUF_SECTORS * BDRV_SECTOR_SIZE);
|
||||
goto fail_getopt;
|
||||
}
|
||||
|
||||
|
@ -2385,9 +2391,9 @@ static int img_convert(int argc, char **argv)
|
|||
}
|
||||
|
||||
/* increase bufsectors from the default 4096 (2M) if opt_transfer
|
||||
* or discard_alignment of the out_bs is greater. Limit to 32768 (16MB)
|
||||
* as maximum. */
|
||||
s.buf_sectors = MIN(32768,
|
||||
* or discard_alignment of the out_bs is greater. Limit to
|
||||
* MAX_BUF_SECTORS as maximum which is currently 32768 (16MB). */
|
||||
s.buf_sectors = MIN(MAX_BUF_SECTORS,
|
||||
MAX(s.buf_sectors,
|
||||
MAX(out_bs->bl.opt_transfer >> BDRV_SECTOR_BITS,
|
||||
out_bs->bl.pdiscard_alignment >>
|
||||
|
|
|
@ -259,7 +259,7 @@ def qemu_io_image_args(config, dev=False):
|
|||
if dev:
|
||||
return [
|
||||
"--image-opts",
|
||||
"driver=file,filename=%s" % config.device_path()]
|
||||
"driver=host_device,filename=%s" % config.device_path()]
|
||||
else:
|
||||
return [
|
||||
"--object",
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -40,6 +40,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
|
|||
_supported_fmt qcow2
|
||||
_supported_proto file # uses NBD as well
|
||||
_supported_os Linux
|
||||
# Persistent dirty bitmaps require compat=1.1
|
||||
_unsupported_imgopts 'compat=0.10'
|
||||
|
||||
function do_run_qemu()
|
||||
{
|
||||
|
|
|
@ -41,6 +41,9 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
|
|||
|
||||
# Generic format, but tests file-protocol specific error handling
|
||||
_supported_fmt generic
|
||||
if [ "$IMGOPTSSYNTAX" = "true" ]; then
|
||||
_unsupported_fmt $IMGFMT
|
||||
fi
|
||||
_supported_proto file
|
||||
_supported_os Linux
|
||||
|
||||
|
@ -52,10 +55,10 @@ for PROTO in "file" "host_device" "host_cdrom"; do
|
|||
echo "=== Testing with driver:$PROTO ==="
|
||||
echo
|
||||
echo "== Testing RO =="
|
||||
$QEMU_IO -c "open -r -o driver=$PROTO,filename=$TEST_IMG" 2>&1 | _filter_imgfmt | _filter_testdir
|
||||
$QEMU_IO -c "open -r -o driver=$PROTO,filename=$TEST_IMG" 2>&1 | _filter_testdir | _filter_imgfmt
|
||||
$QEMU_IO -c "open -r -o driver=$PROTO,filename=/dev/null" 2>&1 | _filter_imgfmt
|
||||
echo "== Testing RW =="
|
||||
$QEMU_IO -c "open -o driver=$PROTO,filename=$TEST_IMG" 2>&1 | _filter_imgfmt | _filter_testdir
|
||||
$QEMU_IO -c "open -o driver=$PROTO,filename=$TEST_IMG" 2>&1 | _filter_testdir | _filter_imgfmt
|
||||
$QEMU_IO -c "open -o driver=$PROTO,filename=/dev/null" 2>&1 | _filter_imgfmt
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in New Issue