summaryrefslogtreecommitdiffstats
path: root/daemons/clvmd/clvmd.c
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2011-10-11 09:23:48 +0000
committerZdenek Kabelac <zkabelac@redhat.com>2011-10-11 09:23:48 +0000
commit61a45c7b3a8570ee1fe54669bdfeadb731d3e712 (patch)
tree173551aa0cbe869a6abbba141318aa6492cfd146 /daemons/clvmd/clvmd.c
parentda0ec961594355e64e514fba2990ad02b4d913e8 (diff)
downloadlvm2-61a45c7b3a8570ee1fe54669bdfeadb731d3e712.tar.gz
lvm2-61a45c7b3a8570ee1fe54669bdfeadb731d3e712.tar.xz
lvm2-61a45c7b3a8570ee1fe54669bdfeadb731d3e712.zip
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).
Diffstat (limited to 'daemons/clvmd/clvmd.c')
-rw-r--r--daemons/clvmd/clvmd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/daemons/clvmd/clvmd.c b/daemons/clvmd/clvmd.c
index 9973baca..9e97eb64 100644
--- a/daemons/clvmd/clvmd.c
+++ b/daemons/clvmd/clvmd.c
@@ -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)