Compare commits

...

1 Commits

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

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