Block layer patches
The following changes since commit 55b1f14cefcb19ce6d5e28c4c83404230888aa7e:
Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-3.0-pull-request' into staging (2018-07-23 14:03:14 +0100)
are available in the git repository at:
git://repo.or.cz/qemu/kevin.git tags/for-upstream
for you to fetch changes up to 3e31b4e17064d22e533071aaa57d3f01499ef910:
block/vvfat: Disable debug message by default (2018-07-23 16:50:43 +0200)
----------------------------------------------------------------
Block layer patches:
- vvfat: Disable debug message by default
- qemu-iotests fixes
- Fix typos in comments
----------------------------------------------------------------
John Snow (1):
iotests: remove LUKS support from test 226
Kevin Wolf (1):
qemu-iotests: Use host_device instead of file in 149
Max Reitz (2):
iotest: Fix filtering order in 226
iotests: Disallow compat=0.10 in 223
Peter Lieven (1):
qemu-img: avoid overflow of min_sparse parameter
Stefan Weil (1):
block: Fix typos in comments (found by codespell)
Thomas Huth (1):
block/vvfat: Disable debug message by default
block.c | 2 +- block/backup.c | 4 +- block/curl.c | 2 +- block/gluster.c | 2 +- block/vhdx.c | 2 +- block/vvfat.c | 4 +- qemu-img.c | 16 ++- tests/qemu-iotests/149 | 2 +- tests/qemu-iotests/149.out | 344 ++++++++++++++++++++++----------------------- tests/qemu-iotests/223 | 2 + tests/qemu-iotests/226 | 7 +- 11 files changed, 199 insertions(+), 188 deletions(-)
[Qemu-devel] [PULL 2/7] block: Fix typos in comments (found by codespell)
From: Stefan Weil <[email protected]>
--- block.c | 2 +- block/backup.c | 4 ++-- block/curl.c | 2 +- block/gluster.c | 2 +- block/vhdx.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-)
block.c +1 -1
@@ -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
block/backup.c +2 -2
@@ -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,
block/curl.c +1 -1
@@ -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,
block/gluster.c +1 -1
@@ -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)
block/vhdx.c +1 -1
@@ -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. *
Signature · 1 line
2.13.6
[Qemu-devel] [PULL 3/7] qemu-img: avoid overflow of min_sparse parameter
In reply to Kevin WolfFrom: Peter Lieven <[email protected]>
the min_sparse convert parameter can overflow (e.g. -S 1024G) in the conversion from int64_t to int resulting in a negative min_sparse parameter. Avoid this by limiting the valid parameters to sane values. In fact anything exceeding the convert buffer size is also pointless. While at it also forbid values that are non multiple of 512 to avoid undesired behaviour. For instance, values between 1 and 511 were legal, but resulted in full allocation.
--- qemu-img.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
qemu-img.c +11 -5
@@ -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 >>
Signature · 1 line
2.13.6
[Qemu-devel] [PULL 4/7] iotests: remove LUKS support from test 226
In reply to Kevin WolfFrom: John Snow <[email protected]>
This test doesn't actually care about the format anyway, it just supports "all formats" as a convenience. LUKS however does not use a simple image filename which confuses this iotest.
We can simply skip the test for formats that use IMGOPTSSYNTAX for their filenames without missing much coverage.
--- tests/qemu-iotests/226 | 3 +++ 1 file changed, 3 insertions(+)
tests/qemu-iotests/226 +3 -0
@@ -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
Signature · 1 line
2.13.6
[Qemu-devel] [PULL 5/7] iotest: Fix filtering order in 226
In reply to Kevin WolfFrom: Max Reitz <[email protected]>
The test directory should be filtered before the image format, otherwise the test will fail if the image format is part of the test directory, like so:
[...]
-can't open: Could not open 'TEST_DIR/t.IMGFMT': Is a directory +can't open: Could not open '/tmp/test-IMGFMT/t.IMGFMT': Is a directory [...]
--- tests/qemu-iotests/226 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tests/qemu-iotests/226 +2 -2
@@ -55,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
Signature · 1 line
2.13.6
[Qemu-devel] [PULL 6/7] iotests: Disallow compat=0.10 in 223
In reply to Kevin WolfFrom: Max Reitz <[email protected]>
223 tests persistent dirty bitmaps which are not supported in compat=0.10, so that option is unsupported for this test.
--- tests/qemu-iotests/223 | 2 ++ 1 file changed, 2 insertions(+)
tests/qemu-iotests/223 +2 -0
@@ -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() {
Signature · 1 line
2.13.6
[Qemu-devel] [PULL 7/7] block/vvfat: Disable debug message by default
In reply to Kevin WolfFrom: Thomas Huth <[email protected]>
It's annoying to see this debug message every time you use vvfat. Disable it with the DLOG() macro by default, as it is done with the other debug messages in this file.
--- block/vvfat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
block/vvfat.c +2 -2
@@ -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;
Signature · 1 line
2.13.6
[Qemu-devel] [PULL 1/7] qemu-iotests: Use host_device instead of file in 149
In reply to Kevin WolfThe test case uses block devices with driver=file, which causes the test to fail after commit 230ff73904 added a deprecation warning for this. Fix the test case to use driver=host_device and update the reference output accordingly.
--- tests/qemu-iotests/149 | 2 +- tests/qemu-iotests/149.out | 344 ++++++++++++++++++++++----------------------- 2 files changed, 173 insertions(+), 173 deletions(-)
tests/qemu-iotests/149 +1 -1
@@ -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",
tests/qemu-iotests/149.out +172 -172
1,290 lines not on this page · raw message
Signature · 1 line
2.13.6
Peter Maydell
AppliedQuoted 10 lines · Kevin Wolf
The following changes since commit
55b1f14cefcb19ce6d5e28c4c83404230888aa7e:Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-3.0-pull-request' into staging (2018-07-23 14:03:14 +0100)
are available in the git repository at:
git://repo.or.cz/qemu/kevin.gittags/for-upstreamfor you to fetch changes up to
3e31b4e17064d22e533071aaa57d3f01499ef910:
Quoted 9 lines
block/vvfat: Disable debug message by default (2018-07-23 16:50:43 +0200)
----------------------------------------------------------------
Block layer patches:- vvfat: Disable debug message by default
- qemu-iotests fixes
- Fix typos in comments
Applied, thanks.
-- PMM