Switch qdisk to logsys
PATCH 1/1 Switch qdisk to logsys
Hi Lon,
in attachement there is my proposed patch to switch qdisk to logsys and it is untested at the moment. My qdisk cluster is temporary under full reinstallation.
Could you please give it a shot and let me know?
Thanks
Fabio
--
I'm going to make him an offer he can't refuse.
-------------- next part --------------
cman/qdisk/Makefile +2 -2
@@ -25,17 +25,17 @@ include $(OBJDIR)/make/uninstall.mk CFLAGS += -D_GNU_SOURCE CFLAGS += -Werror -Wstrict-prototypes -Wshadow -CFLAGS += -I${ccsincdir} -I${cmanincdir} +CFLAGS += -I${ccsincdir} -I${cmanincdir} -L${openaisincdir} CFLAGS += -I$(S) CFLAGS += -I${incdir} EXTRA_LDFLAGS += -L${cmanlibdir} -L${ccslibdir} -lcman -lccs +EXTRA_LDFLAGS += -L${openaislibdir} -llogsys EXTRA_LDFLAGS += -lpthread OBJS1= main.o \ score.o \ bitmap.o \ - clulog.o \ gettid.o \ daemon_init.o
cman/qdisk/clulog.c deleted +0 -291
291 lines not on this page · raw message
cman/qdisk/clulog.h deleted +0 -161
161 lines not on this page · raw message
cman/qdisk/main.c +79 -67
493 lines not on this page · raw message
cman/qdisk/score.c +7 -6
@@ -31,7 +31,7 @@#include <pthread.h> #include <string.h> #include <ccs.h> -#include <clulog.h> +#include <openais/service/logsys.h> #include <sched.h> #include <sys/mman.h> #include "disk.h"
@@ -49,6 +49,7 @@ struct h_arg {int count; }; +LOGSYS_DECLARE_SUBSYS ("QDISK" ,LOG_LEVEL_INFO );/* XXX Messy, but works for now...
@@ -211,7 +212,7 @@ check_heuristic(struct h_data *h, int block)/* Returned 0 and was not killed */ if (!h->available) { h->available =1 ; -clulog (LOG_INFO ,"Heuristic: '%s' UP\n" , h->program); +log_printf (LOG_INFO ,"Heuristic: '%s' UP\n" , h->program); } h->misses =0 ;return 0 ;
@@ -220,12 +221,12 @@ miss:if (h->available) { h->misses++;if (h->misses >= h->tko) { -clulog (LOG_INFO , +log_printf (LOG_INFO ,"Heuristic: '%s' DOWN (%d/%d)\n" , h->program, h->misses, h->tko); h->available =0 ; }else { -clulog (LOG_DEBUG , +log_printf (LOG_DEBUG ,"Heuristic: '%s' missed (%d/%d)\n" , h->program, h->misses, h->tko); }
@@ -324,13 +325,13 @@ configure_heuristics(int ccsfd, struct h_data *h, int max) h[x].tko =1 ; } -clulog (LOG_DEBUG , +log_printf (LOG_DEBUG ,"Heuristic: '%s' score=%d interval=%d tko=%d\n" , h[x].program, h[x].score, h[x].interval, h[x].tko); }while (++x < max); -clulog (LOG_DEBUG ,"%d heuristics loaded\n" , x); +log_printf (LOG_DEBUG ,"%d heuristics loaded\n" , x);return x; }