LVM2 ./WHATS_NEW daemons/clvmd/clvmd-command.c ...
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz at sourceware.org 2011-01-17 23:13:14
Modified files:
. : WHATS_NEW daemons/clvmd : clvmd-command.c clvmd.c clvmd.h man : clvmd.8.in
Log message:
Add -f (don't fork) option to clvmd and fix clvmd -d<num> description.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1883&r2=1.1884
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd-command.c.diff?cvsroot=lvm2&r1=1.47&r2=1.48
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd.c.diff?cvsroot=lvm2&r1=1.92&r2=1.93
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd.h.diff?cvsroot=lvm2&r1=1.12&r2=1.13
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/man/clvmd.8.in.diff?cvsroot=lvm2&r1=1.4&r2=1.5
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.82 - =================================== + Add -f (don't fork) option to clvmd and fix clvmd -d<num> description. Version 2.02.81 - 17th January 2011 ===================================
daemons/clvmd/clvmd-command.c +7 -11
@@ -63,7 +63,6 @@#include <sys/utsname.h> -extern debug_t debug;extern struct cluster_ops *clops;static int restart_clvmd (void );
@@ -144,7 +143,7 @@break ;case CLVMD_CMD_SET_DEBUG : - debug = args[0 ]; +clvmd_set_debug (args[0 ]);break ;case CLVMD_CMD_RESTART :
@@ -310,19 +309,16 @@ client->bits.localsock.private =0 ;break ; -case CLVMD_CMD_LOCK_VG : -case CLVMD_CMD_VG_BACKUP : -case CLVMD_CMD_SYNC_NAMES : -case CLVMD_CMD_LOCK_QUERY : -/* Nothing to do here */ -break ; -case CLVMD_CMD_LOCK_LV : lock_cmd = args[0 ]; lock_flags = args[1 ]; lockname = &args[2 ]; status =post_lock_lv (lock_cmd, lock_flags, lockname);break ; + +default : +/* Nothing to do here */ +break ; }return status; }
@@ -381,9 +377,9 @@ goto_out;/* Propogate debug options */ -if (debug) { +if (clvmd_get_debug ()) {if (!(debug_arg =malloc (16 )) || -dm_snprintf (debug_arg,16 ,"-d%d" , (int )debug) <0 ) +dm_snprintf (debug_arg,16 ,"-d%d" , (int )clvmd_get_debug ()) <0 ) goto_out; argv[argc++] = debug_arg; }
daemons/clvmd/clvmd.c +43 -24
135 lines not on this page · raw message
daemons/clvmd/clvmd.h +3 -0
@@ -117,6 +117,9 @@extern void debuglog (const char *fmt, ... ) __attribute__ ((format (printf,1 ,2 ))); +void clvmd_set_debug (debug_t new_de); +debug_t clvmd_get_debug (void ); +int sync_lock (const char *resource,int mode,int flags,int *lockid);int sync_unlock (const char *resource,int lockid);
man/clvmd.8.in +5 -6
@@ -3,7 +3,7 @@ clvmd \- cluster LVM daemon .SH SYNOPSIS .B clvmd -[\-d [<value>]] [\-C] [\-h] +[\-d[<value>]] [\-C] [\-h] [\-R] [\-S] [\-t <timeout>]
@@ -15,19 +15,18 @@ if a node in the cluster does not have this daemon running. .SH OPTIONS .TP -.I \-d [<value>] +.I \-d[<value>] Enable debug logging. Value can be 0, 1 or 2. .br -0 disables debug logging in a running clvmd +0 disables debug logging .br -1 sends debug logs to stderr (clvmd will not fork in this case) +1 sends debug logs to stderr (implies -f option) .br 2 sends debug logs to syslog .br If .B -d -is specified without a value then 1 is assumed if you are starting a -new clvmd, 2 if you are enabling debug in a running clvmd. +is specified without a value then 1 is assumed. .TP .I \-C Only valid if