Re: [Qemu-devel] [PATCH v13 00/20] block: Image locking series
On Thu, 04/20 12:03, Kevin Wolf wrote: > Am 20.04.2017 um 10:32 hat Fam Zheng geschrieben: > > > /var/tmp/patchew-tester-tmp-7vbaovju/src/block/file-posix.c: In function > > > ‘raw_handle_lock_update’: > > > /var/tmp/patchew-tester-tmp-7vbaovju/src/block/file-posix.c:1117:17: > > > error: ‘lock_fd’ may be used uninitialized in this function > > > [-Werror=maybe-uninitialized] > > > qemu_close(lock_fd); > > > ^~~ > > > cc1: all warnings being treated as errors > > > /var/tmp/patchew-tester-tmp-7vbaovju/src/rules.mak:69: recipe for target > > > 'block/file-posix.o' failed > > > > False positive. lock_fd is initialized in a "if (op == RAW_LT_PREPARE)" > > branch > > above, and we are in a "case RAW_LT_PREPARE" switch branch too. > > Even if it's a false positive, obviously we still need to work around > the build failure. Sure, easy to do. I'll initialize the variable. Fam
Re: [Qemu-devel] [PATCH v13 00/20] block: Image locking series
Am 20.04.2017 um 10:32 hat Fam Zheng geschrieben: > > /var/tmp/patchew-tester-tmp-7vbaovju/src/block/file-posix.c: In function > > ‘raw_handle_lock_update’: > > /var/tmp/patchew-tester-tmp-7vbaovju/src/block/file-posix.c:1117:17: error: > > ‘lock_fd’ may be used uninitialized in this function > > [-Werror=maybe-uninitialized] > > qemu_close(lock_fd); > > ^~~ > > cc1: all warnings being treated as errors > > /var/tmp/patchew-tester-tmp-7vbaovju/src/rules.mak:69: recipe for target > > 'block/file-posix.o' failed > > False positive. lock_fd is initialized in a "if (op == RAW_LT_PREPARE)" branch > above, and we are in a "case RAW_LT_PREPARE" switch branch too. Even if it's a false positive, obviously we still need to work around the build failure. Kevin
Re: [Qemu-devel] [PATCH v13 00/20] block: Image locking series
On Thu, 04/20 01:39, no-re...@patchew.org wrote: > test-replication: /tmp/qemu-test/src/block/file-posix.c:1168: > raw_init_lock_update: Assertion `!s->lock_update' failed. > GTester: last random seed: R02Scba16429ff5a192bda9c88444de57b96 > test-replication: /tmp/qemu-test/src/block/file-posix.c:1168: > raw_init_lock_update: Assertion `!s->lock_update' failed. > GTester: last random seed: R02S71ef34cf124dcfa2d2816a5a05a83ee9 > test-replication: /tmp/qemu-test/src/block/file-posix.c:1168: > raw_init_lock_update: Assertion `!s->lock_update' failed. > GTester: last random seed: R02S6296241250c2052edfd7157c5417b65f > test-replication: /tmp/qemu-test/src/block/file-posix.c:1168: > raw_init_lock_update: Assertion `!s->lock_update' failed. > GTester: last random seed: R02Sd7e01803d3bd42deab2a0a3015bcc52f Good catch. Centos 6 doesn't have the OFD lock, and the code path missed a cleanup. Will fix this. Fam
Re: [Qemu-devel] [PATCH v13 00/20] block: Image locking series
On Thu, 04/20 01:40, no-re...@patchew.org wrote: > Hi, > > This series seems to have some coding style problems. See output below for > more information: All long lines (>90 cols). Intended. Wrapping will make it less readable. Fam
Re: [Qemu-devel] [PATCH v13 00/20] block: Image locking series
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20170420075237.18219-1-f...@redhat.com Subject: [Qemu-devel] [PATCH v13 00/20] block: Image locking series === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git log --oneline $BASE.. | wc -l) failed=0 # Useful git options git config --local diff.renamelimit 0 git config --local diff.renames True commits="$(git log --format=%H --reverse $BASE..)" for c in $commits; do echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..." if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then failed=1 echo fi n=$((n+1)) done exit $failed === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 Switched to a new branch 'test' 2d5d050 tests: Add test-image-lock a0d4c3c file-posix: Add image locking in perm operations 17c490b osdep: Add qemu_lock_fd and qemu_unlock_fd 2383a28 block: Workaround drive-backup sync=none for image locking 63541e0 tests: Disable image lock in test-replication 354af7e file-posix: Add 'locking' option 9cf4312 tests: Use null-co:// instead of /dev/null as the dummy image 4f5bbc4 iotests: 172: Use separate images for multiple devices 76ff84d iotests: 091: Quit QEMU before checking image 82cf7cc iotests: 087: Don't attach test image twice b9329f3 iotests: 085: Avoid image locking conflict 8a52859 iotests: 055: Don't attach the target image already for drive-backup 4159096 iotests: 046: Prepare for image locking a8af152 iotests: 030: Prepare for image locking 1137b91 qemu-io: Add --unsafe-read option d66cf70 qemu-img: Update documentation for --unsafe-read 7f30dc1 qemu-img: Add --unsafe-read option to subcommands d392aa4 block: Don't require BLK_PERM_CONSISTENT_READ when unsafe open 03a43f3 block: Drop consistent read perm if opened unsafe a45035b block: Introduce BDRV_O_UNSAFE_READ === OUTPUT BEGIN === Checking PATCH 1/20: block: Introduce BDRV_O_UNSAFE_READ... Checking PATCH 2/20: block: Drop consistent read perm if opened unsafe... Checking PATCH 3/20: block: Don't require BLK_PERM_CONSISTENT_READ when unsafe open... Checking PATCH 4/20: qemu-img: Add --unsafe-read option to subcommands... Checking PATCH 5/20: qemu-img: Update documentation for --unsafe-read... Checking PATCH 6/20: qemu-io: Add --unsafe-read option... WARNING: line over 80 characters #140: FILE: qemu-io.c:621: +if (openfile(argv[optind], flags, writethrough, unsafe_read, opts)) { total: 0 errors, 1 warnings, 117 lines checked Your patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. Checking PATCH 7/20: iotests: 030: Prepare for image locking... Checking PATCH 8/20: iotests: 046: Prepare for image locking... Checking PATCH 9/20: iotests: 055: Don't attach the target image already for drive-backup... Checking PATCH 10/20: iotests: 085: Avoid image locking conflict... Checking PATCH 11/20: iotests: 087: Don't attach test image twice... Checking PATCH 12/20: iotests: 091: Quit QEMU before checking image... Checking PATCH 13/20: iotests: 172: Use separate images for multiple devices... Checking PATCH 14/20: tests: Use null-co:// instead of /dev/null as the dummy image... WARNING: line over 80 characters #93: FILE: tests/virtio-scsi-test.c:198: +qs = qvirtio_scsi_start("-drive id=drv1,if=none,file=null-co://,format=raw"); total: 0 errors, 1 warnings, 56 lines checked Your patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. Checking PATCH 15/20: file-posix: Add 'locking' option... Checking PATCH 16/20: tests: Disable image lock in test-replication... Checking PATCH 17/20: block: Workaround drive-backup sync=none for image locking... Checking PATCH 18/20: osdep: Add qemu_lock_fd and qemu_unlock_fd... Checking PATCH 19/20: file-posix: Add image locking in perm operations... WARNING: line over 80 characters #119: FILE: block/file-posix.c:451: +error_setg_errno(errp, -ret, "Failed to lock write byte exclusively"); WARNING: line over 80 characters #261: FILE: block/file-posix.c:743: +ret = qemu_lock_fd(new_lock_fd, RAW_LOCK_BYTE_NO_OTHER_WRITER, 1, false); WARNING: line over 80 characters #268: FILE: block/file-posix.c:750: +error_setg_errno(errp, -ret, "Failed to unlock old fd (share byte)"); WARNING: line over 80 characters #273: FILE: block/file-posix.c:755: +error_setg_errno(errp, -ret, "Failed to upgrade new fd (share byte)"); WARNING: line over 80 characters #279: FILE: block/file-posix.c:761: +error_setg_errno(errp, -ret, "Failed to unlock new fd (share byte)"); WARNING: line over 80 characters #284: FILE: block/file-posix.c:766: +error_setg_errno(errp, -ret, "Failed to downgrade new fd (write byte)"); WARNING: line over 80
Re: [Qemu-devel] [PATCH v13 00/20] block: Image locking series
Hi, This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Type: series Message-id: 20170420075237.18219-1-f...@redhat.com Subject: [Qemu-devel] [PATCH v13 00/20] block: Image locking series === TEST SCRIPT BEGIN === #!/bin/bash set -e git submodule update --init dtc # Let docker tests dump environment info export SHOW_ENV=1 export J=8 make docker-test-quick@centos6 make docker-test-mingw@fedora make docker-test-build@min-glib === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 Switched to a new branch 'test' 2d5d050 tests: Add test-image-lock a0d4c3c file-posix: Add image locking in perm operations 17c490b osdep: Add qemu_lock_fd and qemu_unlock_fd 2383a28 block: Workaround drive-backup sync=none for image locking 63541e0 tests: Disable image lock in test-replication 354af7e file-posix: Add 'locking' option 9cf4312 tests: Use null-co:// instead of /dev/null as the dummy image 4f5bbc4 iotests: 172: Use separate images for multiple devices 76ff84d iotests: 091: Quit QEMU before checking image 82cf7cc iotests: 087: Don't attach test image twice b9329f3 iotests: 085: Avoid image locking conflict 8a52859 iotests: 055: Don't attach the target image already for drive-backup 4159096 iotests: 046: Prepare for image locking a8af152 iotests: 030: Prepare for image locking 1137b91 qemu-io: Add --unsafe-read option d66cf70 qemu-img: Update documentation for --unsafe-read 7f30dc1 qemu-img: Add --unsafe-read option to subcommands d392aa4 block: Don't require BLK_PERM_CONSISTENT_READ when unsafe open 03a43f3 block: Drop consistent read perm if opened unsafe a45035b block: Introduce BDRV_O_UNSAFE_READ === OUTPUT BEGIN === Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc' Cloning into '/var/tmp/patchew-tester-tmp-s4d5iont/src/dtc'... Submodule path 'dtc': checked out '558cd81bdd432769b59bff01240c44f82cfb1a9d' BUILD centos6 make[1]: Entering directory '/var/tmp/patchew-tester-tmp-s4d5iont/src' ARCHIVE qemu.tgz ARCHIVE dtc.tgz COPYRUNNER RUN test-quick in qemu:centos6 Packages installed: SDL-devel-1.2.14-7.el6_7.1.x86_64 ccache-3.1.6-2.el6.x86_64 epel-release-6-8.noarch gcc-4.4.7-17.el6.x86_64 git-1.7.1-4.el6_7.1.x86_64 glib2-devel-2.28.8-5.el6.x86_64 libfdt-devel-1.4.0-1.el6.x86_64 make-3.81-23.el6.x86_64 package g++ is not installed pixman-devel-0.32.8-1.el6.x86_64 tar-1.23-15.el6_8.x86_64 zlib-devel-1.2.3-29.el6.x86_64 Environment variables: PACKAGES=libfdt-devel ccache tar git make gcc g++ zlib-devel glib2-devel SDL-devel pixman-devel epel-release HOSTNAME=aa92988b7e2c TERM=xterm MAKEFLAGS= -j8 HISTSIZE=1000 J=8 USER=root CCACHE_DIR=/var/tmp/ccache EXTRA_CONFIGURE_OPTS= V= SHOW_ENV=1 MAIL=/var/spool/mail/root PATH=/usr/lib/ccache:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PWD=/ LANG=en_US.UTF-8 TARGET_LIST= HISTCONTROL=ignoredups SHLVL=1 HOME=/root TEST_DIR=/tmp/qemu-test LOGNAME=root LESSOPEN=||/usr/bin/lesspipe.sh %s FEATURES= dtc DEBUG= G_BROKEN_FILENAMES=1 CCACHE_HASHDIR= _=/usr/bin/env Configure options: --enable-werror --target-list=x86_64-softmmu,aarch64-softmmu --prefix=/var/tmp/qemu-build/install No C++ compiler available; disabling C++ specific optional code Install prefix/var/tmp/qemu-build/install BIOS directory/var/tmp/qemu-build/install/share/qemu binary directory /var/tmp/qemu-build/install/bin library directory /var/tmp/qemu-build/install/lib module directory /var/tmp/qemu-build/install/lib/qemu libexec directory /var/tmp/qemu-build/install/libexec include directory /var/tmp/qemu-build/install/include config directory /var/tmp/qemu-build/install/etc local state directory /var/tmp/qemu-build/install/var Manual directory /var/tmp/qemu-build/install/share/man ELF interp prefix /usr/gnemul/qemu-%M Source path /tmp/qemu-test/src C compilercc Host C compiler cc C++ compiler Objective-C compiler cc ARFLAGS rv CFLAGS-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g QEMU_CFLAGS -I/usr/include/pixman-1 -I$(SRC_PATH)/dtc/libfdt -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-all LDFLAGS -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64 -g make make install install pythonpython -B smbd /usr/sbin/smbd module supportno host CPU x86_64 host big endian no target list x86_64-softmmu aarch64-softmmu tcg
Re: [Qemu-devel] [PATCH v13 00/20] block: Image locking series
> /var/tmp/patchew-tester-tmp-7vbaovju/src/block/file-posix.c: In function > ‘raw_handle_lock_update’: > /var/tmp/patchew-tester-tmp-7vbaovju/src/block/file-posix.c:1117:17: error: > ‘lock_fd’ may be used uninitialized in this function > [-Werror=maybe-uninitialized] > qemu_close(lock_fd); > ^~~ > cc1: all warnings being treated as errors > /var/tmp/patchew-tester-tmp-7vbaovju/src/rules.mak:69: recipe for target > 'block/file-posix.o' failed False positive. lock_fd is initialized in a "if (op == RAW_LT_PREPARE)" branch above, and we are in a "case RAW_LT_PREPARE" switch branch too. Fam
Re: [Qemu-devel] [PATCH v13 00/20] block: Image locking series
Hi, This series failed build test on s390x host. Please find the details below. Message-id: 20170420075237.18219-1-f...@redhat.com Subject: [Qemu-devel] [PATCH v13 00/20] block: Image locking series Type: series === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git checkout with # HEAD pointing to a commit that has the patches applied on top of "base" # branch set -e echo "=== ENV ===" env echo "=== PACKAGES ===" rpm -qa echo "=== TEST BEGIN ===" CC=$HOME/bin/cc INSTALL=$PWD/install BUILD=$PWD/build echo -n "Using CC: " realpath $CC mkdir -p $BUILD $INSTALL SRC=$PWD cd $BUILD $SRC/configure --cc=$CC --prefix=$INSTALL make -j4 # XXX: we need reliable clean up # make check -j4 V=1 make install === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 From https://github.com/patchew-project/qemu * [new tag] patchew/20170420075237.18219-1-f...@redhat.com -> patchew/20170420075237.18219-1-f...@redhat.com Switched to a new branch 'test' 2d5d050 tests: Add test-image-lock a0d4c3c file-posix: Add image locking in perm operations 17c490b osdep: Add qemu_lock_fd and qemu_unlock_fd 2383a28 block: Workaround drive-backup sync=none for image locking 63541e0 tests: Disable image lock in test-replication 354af7e file-posix: Add 'locking' option 9cf4312 tests: Use null-co:// instead of /dev/null as the dummy image 4f5bbc4 iotests: 172: Use separate images for multiple devices 76ff84d iotests: 091: Quit QEMU before checking image 82cf7cc iotests: 087: Don't attach test image twice b9329f3 iotests: 085: Avoid image locking conflict 8a52859 iotests: 055: Don't attach the target image already for drive-backup 4159096 iotests: 046: Prepare for image locking a8af152 iotests: 030: Prepare for image locking 1137b91 qemu-io: Add --unsafe-read option d66cf70 qemu-img: Update documentation for --unsafe-read 7f30dc1 qemu-img: Add --unsafe-read option to subcommands d392aa4 block: Don't require BLK_PERM_CONSISTENT_READ when unsafe open 03a43f3 block: Drop consistent read perm if opened unsafe a45035b block: Introduce BDRV_O_UNSAFE_READ === OUTPUT BEGIN === === ENV === XDG_SESSION_ID=15468 SHELL=/bin/sh USER=fam PATCHEW=/home/fam/patchew/patchew-cli -s http://patchew.org --nodebug PATH=/usr/bin:/bin PWD=/var/tmp/patchew-tester-tmp-7vbaovju/src LANG=en_US.UTF-8 HOME=/home/fam SHLVL=2 LOGNAME=fam DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1012/bus XDG_RUNTIME_DIR=/run/user/1012 _=/usr/bin/env === PACKAGES === gpg-pubkey-873529b8-54e386ff xz-libs-5.2.2-2.fc24.s390x libxshmfence-1.2-3.fc24.s390x giflib-4.1.6-15.fc24.s390x trousers-lib-0.3.13-6.fc24.s390x ncurses-base-6.0-6.20160709.fc25.noarch gmp-6.1.1-1.fc25.s390x libidn-1.33-1.fc25.s390x slang-2.3.0-7.fc25.s390x libsemanage-2.5-8.fc25.s390x pkgconfig-0.29.1-1.fc25.s390x alsa-lib-1.1.1-2.fc25.s390x yum-metadata-parser-1.1.4-17.fc25.s390x python3-slip-dbus-0.6.4-4.fc25.noarch python2-cssselect-0.9.2-1.fc25.noarch python-fedora-0.8.0-2.fc25.noarch createrepo_c-libs-0.10.0-6.fc25.s390x initscripts-9.69-1.fc25.s390x wget-1.18-2.fc25.s390x dhcp-client-4.3.5-1.fc25.s390x parted-3.2-21.fc25.s390x flex-2.6.0-3.fc25.s390x colord-libs-1.3.4-1.fc25.s390x python-osbs-client-0.33-3.fc25.noarch perl-Pod-Simple-3.35-1.fc25.noarch python2-simplejson-3.10.0-1.fc25.s390x brltty-5.4-2.fc25.s390x librados2-10.2.4-2.fc25.s390x tcp_wrappers-7.6-83.fc25.s390x libcephfs_jni1-10.2.4-2.fc25.s390x nettle-devel-3.3-1.fc25.s390x bzip2-devel-1.0.6-21.fc25.s390x libuuid-2.28.2-2.fc25.s390x mesa-libglapi-13.0.3-5.fc25.s390x pcre-cpp-8.40-5.fc25.s390x pango-1.40.4-1.fc25.s390x python3-magic-5.29-3.fc25.noarch python3-dnf-1.1.10-6.fc25.noarch cryptsetup-libs-1.7.4-1.fc25.s390x texlive-kpathsea-doc-svn41139-33.fc25.1.noarch netpbm-10.77.00-3.fc25.s390x openssh-7.4p1-4.fc25.s390x kernel-headers-4.10.5-200.fc25.s390x texlive-kpathsea-bin-svn40473-33.20160520.fc25.1.s390x texlive-graphics-svn41015-33.fc25.1.noarch texlive-dvipdfmx-def-svn40328-33.fc25.1.noarch texlive-mfware-svn40768-33.fc25.1.noarch texlive-texlive-scripts-svn41433-33.fc25.1.noarch texlive-euro-svn22191.1.1-33.fc25.1.noarch texlive-etex-svn37057.0-33.fc25.1.noarch texlive-iftex-svn29654.0.2-33.fc25.1.noarch texlive-palatino-svn31835.0-33.fc25.1.noarch texlive-texlive-docindex-svn41430-33.fc25.1.noarch texlive-xunicode-svn30466.0.981-33.fc25.1.noarch texlive-koma-script-svn41508-33.fc25.1.noarch texlive-pst-grad-svn15878.1.06-33.fc25.1.noarch texlive-pst-blur-svn15878.2.0-33.fc25.1.noarch texlive-jknapltx-svn19440.0-33.fc25.1.noarch netpbm-progs-10.77.00-3.fc25.s390x mesa-libgbm-devel-13.0.3-5.fc25.s390x texinfo-6.1-4.fc25.s390x openssl-devel-1.0.2k-1.fc25.s390x python2-sssdconfig-1.15.2-1.fc25.noarch libaio-0.3.110-6.fc24.s390x libfontenc-1.1.3-3.fc24.s390x lzo-2.08-8.fc24.s390x isl-0.14-5.fc24.s390x libXau-1.0.8-6.fc24.s390x linux-atm-libs-2.5.1-14.fc24.s390x libXext-1.3.3-4.fc24.s390x libXxf86vm-1.1.4-3.fc24.s390x bison-3.0.4-4.fc24.s390x perl-srpm-macros-1-20.fc25.noarch