dd7aef2877
- kvm-block-nbd-Fix-hang-in-.bdrv_close.patch [bz#1640894] - kvm-block-Generic-file-creation-fallback.patch [bz#1640894] - kvm-file-posix-Drop-hdev_co_create_opts.patch [bz#1640894] - kvm-iscsi-Drop-iscsi_co_create_opts.patch [bz#1640894] - kvm-iotests-Add-test-for-image-creation-fallback.patch [bz#1640894] - kvm-block-Fix-leak-in-bdrv_create_file_fallback.patch [bz#1640894] - kvm-iotests-Use-complete_and_wait-in-155.patch [bz#1790482 bz#1805143] - kvm-block-Introduce-bdrv_reopen_commit_post-step.patch [bz#1790482 bz#1805143] - kvm-block-qcow2-Move-bitmap-reopen-into-bdrv_reopen_comm.patch [bz#1790482 bz#1805143] - kvm-iotests-Refactor-blockdev-reopen-test-for-iothreads.patch [bz#1790482 bz#1805143] - kvm-block-bdrv_reopen-with-backing-file-in-different-Aio.patch [bz#1790482 bz#1805143] - kvm-block-Versioned-x-blockdev-reopen-API-with-feature-f.patch [bz#1790482 bz#1805143] - kvm-block-Make-bdrv_get_cumulative_perm-public.patch [bz#1790482 bz#1805143] - kvm-block-Relax-restrictions-for-blockdev-snapshot.patch [bz#1790482 bz#1805143] - kvm-iotests-Fix-run_job-with-use_log-False.patch [bz#1790482 bz#1805143] - kvm-iotests-Test-mirror-with-temporarily-disabled-target.patch [bz#1790482 bz#1805143] - kvm-block-Fix-cross-AioContext-blockdev-snapshot.patch [bz#1790482 bz#1805143] - kvm-iotests-Add-iothread-cases-to-155.patch [bz#1790482 bz#1805143] - kvm-qapi-Add-allow-write-only-overlay-feature-for-blockd.patch [bz#1790482 bz#1805143] - kvm-exec-rom_reset-Free-rom-data-during-inmigrate-skip.patch [bz#1809380] - Resolves: bz#1640894 (Fix generic file creation fallback for qemu-img nvme:// image creation support) - Resolves: bz#1790482 (bitmaps in backing images can't be modified) - Resolves: bz#1805143 (allow late/lazy opening of backing chain for shallow blockdev-mirror) - Resolves: bz#1809380 (guest hang during reboot process after migration from RHEl7.8 to RHEL8.2.0.)
114 lines
3.7 KiB
Diff
114 lines
3.7 KiB
Diff
From 58b7d33e1bc17b89103ceaa39f5722a69b35d810 Mon Sep 17 00:00:00 2001
|
|
From: Maxim Levitsky <mlevitsk@redhat.com>
|
|
Date: Wed, 11 Mar 2020 10:51:45 +0000
|
|
Subject: [PATCH 04/20] iscsi: Drop iscsi_co_create_opts()
|
|
|
|
RH-Author: Maxim Levitsky <mlevitsk@redhat.com>
|
|
Message-id: <20200311105147.13208-5-mlevitsk@redhat.com>
|
|
Patchwork-id: 94226
|
|
O-Subject: [RHEL-AV-8.2.0 qemu-kvm PATCH v2 4/6] iscsi: Drop iscsi_co_create_opts()
|
|
Bugzilla: 1640894
|
|
RH-Acked-by: Stefano Garzarella <sgarzare@redhat.com>
|
|
RH-Acked-by: John Snow <jsnow@redhat.com>
|
|
RH-Acked-by: Max Reitz <mreitz@redhat.com>
|
|
|
|
From: Max Reitz <mreitz@redhat.com>
|
|
|
|
The generic fallback implementation effectively does the same.
|
|
|
|
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
|
|
Signed-off-by: Max Reitz <mreitz@redhat.com>
|
|
Message-Id: <20200122164532.178040-5-mreitz@redhat.com>
|
|
Signed-off-by: Max Reitz <mreitz@redhat.com>
|
|
(cherry picked from commit 80f0900905b555f00d644894c786b6d66ac2e00e)
|
|
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
|
|
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
---
|
|
block/iscsi.c | 56 --------------------------------------------------------
|
|
1 file changed, 56 deletions(-)
|
|
|
|
diff --git a/block/iscsi.c b/block/iscsi.c
|
|
index cbd5729..b45da65 100644
|
|
--- a/block/iscsi.c
|
|
+++ b/block/iscsi.c
|
|
@@ -2164,58 +2164,6 @@ static int coroutine_fn iscsi_co_truncate(BlockDriverState *bs, int64_t offset,
|
|
return 0;
|
|
}
|
|
|
|
-static int coroutine_fn iscsi_co_create_opts(const char *filename, QemuOpts *opts,
|
|
- Error **errp)
|
|
-{
|
|
- int ret = 0;
|
|
- int64_t total_size = 0;
|
|
- BlockDriverState *bs;
|
|
- IscsiLun *iscsilun = NULL;
|
|
- QDict *bs_options;
|
|
- Error *local_err = NULL;
|
|
-
|
|
- bs = bdrv_new();
|
|
-
|
|
- /* Read out options */
|
|
- total_size = DIV_ROUND_UP(qemu_opt_get_size_del(opts, BLOCK_OPT_SIZE, 0),
|
|
- BDRV_SECTOR_SIZE);
|
|
- bs->opaque = g_new0(struct IscsiLun, 1);
|
|
- iscsilun = bs->opaque;
|
|
-
|
|
- bs_options = qdict_new();
|
|
- iscsi_parse_filename(filename, bs_options, &local_err);
|
|
- if (local_err) {
|
|
- error_propagate(errp, local_err);
|
|
- ret = -EINVAL;
|
|
- } else {
|
|
- ret = iscsi_open(bs, bs_options, 0, NULL);
|
|
- }
|
|
- qobject_unref(bs_options);
|
|
-
|
|
- if (ret != 0) {
|
|
- goto out;
|
|
- }
|
|
- iscsi_detach_aio_context(bs);
|
|
- if (iscsilun->type != TYPE_DISK) {
|
|
- ret = -ENODEV;
|
|
- goto out;
|
|
- }
|
|
- if (bs->total_sectors < total_size) {
|
|
- ret = -ENOSPC;
|
|
- goto out;
|
|
- }
|
|
-
|
|
- ret = 0;
|
|
-out:
|
|
- if (iscsilun->iscsi != NULL) {
|
|
- iscsi_destroy_context(iscsilun->iscsi);
|
|
- }
|
|
- g_free(bs->opaque);
|
|
- bs->opaque = NULL;
|
|
- bdrv_unref(bs);
|
|
- return ret;
|
|
-}
|
|
-
|
|
static int iscsi_get_info(BlockDriverState *bs, BlockDriverInfo *bdi)
|
|
{
|
|
IscsiLun *iscsilun = bs->opaque;
|
|
@@ -2486,8 +2434,6 @@ static BlockDriver bdrv_iscsi = {
|
|
.bdrv_parse_filename = iscsi_parse_filename,
|
|
.bdrv_file_open = iscsi_open,
|
|
.bdrv_close = iscsi_close,
|
|
- .bdrv_co_create_opts = iscsi_co_create_opts,
|
|
- .create_opts = &iscsi_create_opts,
|
|
.bdrv_reopen_prepare = iscsi_reopen_prepare,
|
|
.bdrv_reopen_commit = iscsi_reopen_commit,
|
|
.bdrv_co_invalidate_cache = iscsi_co_invalidate_cache,
|
|
@@ -2525,8 +2471,6 @@ static BlockDriver bdrv_iser = {
|
|
.bdrv_parse_filename = iscsi_parse_filename,
|
|
.bdrv_file_open = iscsi_open,
|
|
.bdrv_close = iscsi_close,
|
|
- .bdrv_co_create_opts = iscsi_co_create_opts,
|
|
- .create_opts = &iscsi_create_opts,
|
|
.bdrv_reopen_prepare = iscsi_reopen_prepare,
|
|
.bdrv_reopen_commit = iscsi_reopen_commit,
|
|
.bdrv_co_invalidate_cache = iscsi_co_invalidate_cache,
|
|
--
|
|
1.8.3.1
|
|
|