1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Add FIXMEs for init_test

Usage of thread unprotected init_test is not correct and needs probably lvm lock
since it part of lvm library. Current implementation may probably fail with
test mode and actually create something unexpectedly (and vice versa).
This commit is contained in:
Zdenek Kabelac 2011-10-11 09:23:48 +00:00
parent da0ec96159
commit 61a45c7b3a

View File

@ -1514,9 +1514,9 @@ static void process_remote_command(struct clvm_header *msg, int msglen, int fd,
if (replyargs != NULL) { if (replyargs != NULL) {
/* Run the command */ /* Run the command */
status = /* FIXME: usage of init_test() is unprotected */
do_command(NULL, msg, msglen, &replyargs, buflen, status = do_command(NULL, msg, msglen, &replyargs,
&replylen); buflen, &replylen);
} else { } else {
status = ENOMEM; status = ENOMEM;
} }
@ -1651,6 +1651,7 @@ static __attribute__ ((noreturn)) void *pre_and_post_thread(void *arg)
/* Loop around doing PRE and POST functions until the client goes away */ /* Loop around doing PRE and POST functions until the client goes away */
while (!client->bits.localsock.finished) { while (!client->bits.localsock.finished) {
/* Execute the code */ /* Execute the code */
/* FIXME: usage of init_test() is unprotected as in do_command() */
status = do_pre_command(client); status = do_pre_command(client);
if (status) if (status)
@ -1733,6 +1734,7 @@ static int process_local_command(struct clvm_header *msg, int msglen,
if (replybuf == NULL) if (replybuf == NULL)
return -1; return -1;
/* FIXME: usage of init_test() is unprotected */
status = do_command(client, msg, msglen, &replybuf, buflen, &replylen); status = do_command(client, msg, msglen, &replybuf, buflen, &replylen);
if (status) if (status)