Compare commits

...

1 Commits

Author SHA1 Message Date
Vitaliy Filippov afcab324e1 Destroy qemu driver under lock (may fix crashes after attach/detach?)
Test / test_root_node (push) Successful in 12s Details
Test / test_rebalance_verify_ec (push) Successful in 1m44s Details
Test / test_write_no_same (push) Successful in 12s Details
Test / test_write (push) Successful in 34s Details
Test / test_switch_primary (push) Successful in 37s Details
Test / test_write_xor (push) Successful in 38s Details
Test / test_heal_pg_size_2 (push) Successful in 2m19s Details
Test / test_heal_ec (push) Successful in 2m20s Details
Test / test_heal_antietcd (push) Successful in 2m22s Details
Test / test_heal_csum_32k_dmj (push) Successful in 2m23s Details
Test / test_heal_csum_32k_dj (push) Successful in 2m22s Details
Test / test_heal_csum_32k (push) Successful in 2m21s Details
Test / test_heal_csum_4k_dmj (push) Successful in 2m23s Details
Test / test_heal_csum_4k_dj (push) Successful in 2m22s Details
Test / test_resize (push) Successful in 17s Details
Test / test_resize_auto (push) Successful in 13s Details
Test / test_snapshot_pool2 (push) Successful in 17s Details
Test / test_osd_tags (push) Successful in 12s Details
Test / test_enospc (push) Successful in 14s Details
Test / test_enospc_imm (push) Successful in 14s Details
Test / test_enospc_xor (push) Successful in 16s Details
Test / test_enospc_imm_xor (push) Successful in 18s Details
Test / test_scrub (push) Successful in 18s Details
Test / test_scrub_zero_osd_2 (push) Successful in 19s Details
Test / test_scrub_xor (push) Successful in 19s Details
Test / test_scrub_pg_size_3 (push) Successful in 19s Details
Test / test_scrub_pg_size_6_pg_minsize_4_osd_count_6_ec (push) Successful in 20s Details
Test / test_scrub_ec (push) Successful in 18s Details
Test / test_nfs (push) Successful in 14s Details
Test / test_heal_csum_4k (push) Successful in 2m18s Details
2025-03-07 13:13:27 +03:00
1 changed files with 3 additions and 1 deletions

View File

@ -568,6 +568,7 @@ static int vitastor_file_open(BlockDriverState *bs, QDict *options, int flags, E
static void vitastor_close(BlockDriverState *bs)
{
VitastorClient *client = bs->opaque;
qemu_mutex_lock(&client->mutex);
vitastor_c_destroy(client->proxy);
if (client->fds)
{
@ -575,7 +576,6 @@ static void vitastor_close(BlockDriverState *bs)
client->fds = NULL;
client->fd_alloc = client->fd_count = 0;
}
qemu_mutex_destroy(&client->mutex);
if (client->config_path)
g_free(client->config_path);
if (client->etcd_host)
@ -586,6 +586,8 @@ static void vitastor_close(BlockDriverState *bs)
g_free(client->image);
free(client->last_bitmap);
client->last_bitmap = NULL;
qemu_mutex_unlock(&client->mutex);
qemu_mutex_destroy(&client->mutex);
}
#if QEMU_VERSION_MAJOR >= 3 || QEMU_VERSION_MAJOR == 2 && QEMU_VERSION_MINOR > 2