infra: bypass name in make_brick_all()

This commit is contained in:
Thomas Schoebel-Theuer 2020-05-07 12:45:26 +02:00
parent ffee628ffe
commit 916c4dd5dd
3 changed files with 13 additions and 12 deletions

View File

@ -571,7 +571,7 @@ int handler_thread(void *data)
resource_name,
_set_server_bio_params,
NULL,
path,
NULL,
(const struct generic_brick_type*)_bio_brick_type,
(const struct generic_brick_type*[]){},
2, // start always

View File

@ -2003,7 +2003,7 @@ int __make_copy(struct mars_dent *belongs,
resource_name,
_set_copy_params,
&cc,
cc.fullpath[1],
NULL,
(const struct generic_brick_type*)&copy_brick_type,
(const struct generic_brick_type*[]){NULL,NULL,NULL,NULL},
switch_copy ? 2 : -1,
@ -4380,7 +4380,7 @@ int make_log_init(struct mars_dent *dent)
parent->d_rest,
_set_aio_params,
NULL,
aio_path,
NULL,
(const struct generic_brick_type*)&aio_brick_type,
(const struct generic_brick_type*[]){},
switch_on ||
@ -4439,7 +4439,7 @@ int make_log_init(struct mars_dent *dent)
parent->d_rest,
_set_trans_params,
NULL,
aio_path,
NULL,
(const struct generic_brick_type*)&trans_logger_brick_type,
(const struct generic_brick_type*[]){NULL},
switch_on ? 1 : 0,
@ -5058,7 +5058,7 @@ void _rotate_trans(struct mars_rotate *rot)
parent->d_rest,
_set_aio_params,
NULL,
rot->next_relevant_log->d_path,
NULL,
(const struct generic_brick_type*)&aio_brick_type,
(const struct generic_brick_type*[]){},
2, // create + activate
@ -5200,7 +5200,7 @@ int _start_trans(struct mars_rotate *rot)
rot->relevant_log->d_parent->d_rest,
_set_aio_params,
NULL,
rot->relevant_log->d_path,
NULL,
(const struct generic_brick_type*)&aio_brick_type,
(const struct generic_brick_type*[]){},
2, // start always
@ -5750,7 +5750,7 @@ int make_bio(struct mars_dent *dent)
dent->d_parent->d_rest,
_set_bio_params,
NULL,
dent->d_path,
NULL,
(const struct generic_brick_type*)&bio_brick_type,
(const struct generic_brick_type*[]){},
rot->trans_brick || switch_on ? 2 : -1,
@ -5927,7 +5927,7 @@ int make_dev(struct mars_dent *dent)
dent->d_parent->d_rest,
_set_if_params,
rot,
dent->d_argv[0],
NULL,
(const struct generic_brick_type*)&if_brick_type,
(const struct generic_brick_type*[]){(const struct generic_brick_type*)&trans_logger_brick_type},
switch_on ? 2 : -1,
@ -6008,7 +6008,7 @@ static int _make_direct(struct mars_dent *dent)
dent->d_parent->d_rest,
_set_bio_params,
NULL,
src_path,
NULL,
(const struct generic_brick_type*)&bio_brick_type,
(const struct generic_brick_type*[]){},
switch_on ? 2 : -1,
@ -6028,7 +6028,7 @@ static int _make_direct(struct mars_dent *dent)
dent->d_parent->d_rest,
_set_if_params,
NULL,
dent->d_argv[1],
NULL,
(const struct generic_brick_type*)&if_brick_type,
(const struct generic_brick_type*[]){NULL},
switch_on ? 2 : -1,

View File

@ -3273,10 +3273,11 @@ struct mars_brick *make_brick_all(
brick = NULL;
if ((new_brick_type == _bio_brick_type || new_brick_type == _aio_brick_type)
&& _client_brick_type != NULL) {
char *remote = strchr(new_name, '@');
char *remote = strchr(new_path, '@');
if (remote) {
remote++;
MARS_DBG("substitute by remote brick '%s' on peer '%s'\n", new_name, remote);
MARS_DBG("substitute by remote brick '%s' on peer '%s'\n",
new_path, remote);
brick = mars_make_brick(global,
belongs,