From dc67a6f90b5e5d53918780d663366c86eccae7a0 Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Wed, 15 Jul 2020 10:52:29 +0200 Subject: [PATCH] main: activate rot and peer for diskless guests --- kernel/sy_old/mars_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/sy_old/mars_main.c b/kernel/sy_old/mars_main.c index 56cc842b..8c8cb1b1 100644 --- a/kernel/sy_old/mars_main.c +++ b/kernel/sy_old/mars_main.c @@ -2427,6 +2427,7 @@ int start_peer(struct mars_peerinfo *peer) return -ENOMEM; } MARS_DBG("started peer thread '%s'\n", peer->peer); + mars_trigger(); return 0; } @@ -5988,6 +5989,7 @@ void activate_rot(struct mars_rotate *rot) tmp = path_make("%s|%s/", tmp_resource_list, rot->parent_path); brick_string_free(tmp_resource_list); tmp_resource_list = tmp; + mars_trigger(); } static @@ -6616,7 +6618,7 @@ int make_dev(struct mars_dent *dent) bool switch_on; int status = 0; - if (!parent || !dent->new_link) { + if (!parent || !dent->new_link || !dent->d_path || !dent->d_rest) { MARS_ERR("nothing to do '%s'\n", dent->d_rest); return -EINVAL; } @@ -6630,15 +6632,13 @@ int make_dev(struct mars_dent *dent) MARS_DBG("nothing to do\n"); goto err; } - if (!rot->trans_brick && !rot->todo_prosumer) { - MARS_DBG("transaction logger does not exist\n"); - goto done; - } if (rot->dev_size <= 0) { MARS_WRN("trying to create device '%s' with zero size\n", dent->d_path); goto done; } + activate_rot(rot); + make_prosumer(rot, dent); make_gate(rot, dent);