diff options
author | Peter Maydell | 2020-11-17 16:58:50 +0100 |
---|---|---|
committer | Peter Maydell | 2020-11-17 16:58:51 +0100 |
commit | c8e5c4b246584da36694a3c259a7dbb8a7e7b1f3 (patch) | |
tree | f83b331ac17173ce5695e623e3a4b1436af67c29 /block | |
parent | Merge remote-tracking branch 'remotes/philmd-gitlab/tags/sdmmc-20201117' into... (diff) | |
parent | iotests/081: Test rewrite-corrupted without WRITE (diff) | |
download | qemu-c8e5c4b246584da36694a3c259a7dbb8a7e7b1f3.tar.gz qemu-c8e5c4b246584da36694a3c259a7dbb8a7e7b1f3.tar.xz qemu-c8e5c4b246584da36694a3c259a7dbb8a7e7b1f3.zip |
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Patches for 5.2.0-rc2:
- quorum: Fix crash with rewrite-corrupted and without read-write user
- io_uring: do not use pointer after free
- file-posix: Use fallback path for -EBUSY from FALLOC_FL_PUNCH_HOLE
- iotests: Fix failure on Python 3.9 due to use of a deprecated function
- char-stdio: Fix QMP default for 'signal'
# gpg: Signature made Tue 17 Nov 2020 11:43:17 GMT
# gpg: using RSA key DC3DEB159A9AF95D3D7456FE7F09B272C88F2FD6
# gpg: issuer "kwolf@redhat.com"
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [full]
# Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6
* remotes/kevin/tags/for-upstream:
iotests/081: Test rewrite-corrupted without WRITE
iotests/081: Filter image format after testdir
quorum: Require WRITE perm with rewrite-corrupted
io_uring: do not use pointer after free
file-posix: allow -EBUSY errors during write zeros on raw block devices
iotests: Replace deprecated ConfigParser.readfp()
char-stdio: Fix QMP default for 'signal'
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'block')
-rw-r--r-- | block/file-posix.c | 1 | ||||
-rw-r--r-- | block/io_uring.c | 2 | ||||
-rw-r--r-- | block/quorum.c | 5 |
3 files changed, 7 insertions, 1 deletions
diff --git a/block/file-posix.c b/block/file-posix.c index c63926d592..d5fd1dbcd2 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -1698,6 +1698,7 @@ static int handle_aiocb_write_zeroes_unmap(void *opaque) switch (ret) { case -ENOTSUP: case -EINVAL: + case -EBUSY: break; default: return ret; diff --git a/block/io_uring.c b/block/io_uring.c index 037af09471..00a3ee9fb8 100644 --- a/block/io_uring.c +++ b/block/io_uring.c @@ -425,6 +425,6 @@ LuringState *luring_init(Error **errp) void luring_cleanup(LuringState *s) { io_uring_queue_exit(&s->ring); - g_free(s); trace_luring_cleanup_state(s); + g_free(s); } diff --git a/block/quorum.c b/block/quorum.c index e846a7e892..b10fc2089e 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -1163,7 +1163,12 @@ static void quorum_child_perm(BlockDriverState *bs, BdrvChild *c, uint64_t perm, uint64_t shared, uint64_t *nperm, uint64_t *nshared) { + BDRVQuorumState *s = bs->opaque; + *nperm = perm & DEFAULT_PERM_PASSTHROUGH; + if (s->rewrite_corrupted) { + *nperm |= BLK_PERM_WRITE; + } /* * We cannot share RESIZE or WRITE, as this would make the |