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:
parent
da0ec96159
commit
61a45c7b3a
@ -1514,9 +1514,9 @@ static void process_remote_command(struct clvm_header *msg, int msglen, int fd,
|
||||
|
||||
if (replyargs != NULL) {
|
||||
/* Run the command */
|
||||
status =
|
||||
do_command(NULL, msg, msglen, &replyargs, buflen,
|
||||
&replylen);
|
||||
/* FIXME: usage of init_test() is unprotected */
|
||||
status = do_command(NULL, msg, msglen, &replyargs,
|
||||
buflen, &replylen);
|
||||
} else {
|
||||
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 */
|
||||
while (!client->bits.localsock.finished) {
|
||||
/* Execute the code */
|
||||
/* FIXME: usage of init_test() is unprotected as in do_command() */
|
||||
status = do_pre_command(client);
|
||||
|
||||
if (status)
|
||||
@ -1733,6 +1734,7 @@ static int process_local_command(struct clvm_header *msg, int msglen,
|
||||
if (replybuf == NULL)
|
||||
return -1;
|
||||
|
||||
/* FIXME: usage of init_test() is unprotected */
|
||||
status = do_command(client, msg, msglen, &replybuf, buflen, &replylen);
|
||||
|
||||
if (status)
|
||||
|
Loading…
Reference in New Issue
Block a user