367a8a8003daa2a4575bb70051d578ddbee29c80
[openafs.git] / src / volser / volmain.c
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  *
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 #include <afsconfig.h>
11 #include <afs/param.h>
12
13 #include <roken.h>
14 #include <afs/opr.h>
15 #ifdef AFS_PTHREAD_ENV
16 # include <opr/lock.h>
17 #endif
18
19 #ifdef AFS_NT40_ENV
20 #include <windows.h>
21 #include <WINNT/afsevent.h>
22 #endif
23
24 #include <rx/rx_queue.h>
25 #include <afs/afsint.h>
26 #include <afs/prs_fs.h>
27 #include <afs/nfs.h>
28 #include <lwp.h>
29 #include <lock.h>
30 #include <afs/afssyscalls.h>
31 #include <afs/ihandle.h>
32 #ifdef AFS_NT40_ENV
33 #include <afs/ntops.h>
34 #endif
35 #include <afs/vnode.h>
36 #include <afs/volume.h>
37 #include <afs/partition.h>
38 #include <rx/rx.h>
39 #include <rx/rxstat.h>
40 #include <rx/rx_globals.h>
41 #include <afs/auth.h>
42 #include <afs/cellconfig.h>
43 #include <afs/keys.h>
44 #include <afs/dir.h>
45 #include <ubik.h>
46 #include <afs/audit.h>
47 #include <afs/afsutil.h>
48 #include <afs/cmd.h>
49 #include <lwp.h>
50
51 #include "volser.h"
52 #include "volint.h"
53 #include "volser_internal.h"
54
55 #define VolserVersion "2.0"
56 #define N_SECURITY_OBJECTS 3
57
58 extern struct Lock localLock;
59 char *GlobalNameHack = NULL;
60 int hackIsIn = 0;
61 afs_int32 GlobalVolCloneId, GlobalVolParentId;
62 int GlobalVolType;
63 int VolumeChanged;              /* XXXX */
64 static char busyFlags[MAXHELPERS];
65 struct volser_trans *QI_GlobalWriteTrans = 0;
66 struct afsconf_dir *tdir;
67 static afs_int32 runningCalls = 0;
68 int DoLogging = 0;
69 int debuglevel = 0;
70 #define MAXLWP 128
71 int lwps = 9;
72 int udpBufSize = 0;             /* UDP buffer size for receive */
73
74 int rxBind = 0;
75 int rxkadDisableDotCheck = 0;
76 int DoPreserveVolumeStats = 0;
77 int rxJumbograms = 0;   /* default is to not send and receive jumbograms. */
78 int rxMaxMTU = -1;
79 char *auditFileName = NULL;
80 char *logFile = NULL;
81 char *configDir = NULL;
82
83 #define ADDRSPERSITE 16         /* Same global is in rx/rx_user.c */
84 afs_uint32 SHostAddrs[ADDRSPERSITE];
85
86 #define VS_EXIT(code)  {                                          \
87                           osi_audit(VS_ExitEvent, code, AUD_END); \
88                           exit(code);                             \
89                        }
90
91 static void
92 MyBeforeProc(struct rx_call *acall)
93 {
94     VTRANS_LOCK;
95     runningCalls++;
96     VTRANS_UNLOCK;
97     return;
98 }
99
100 static void
101 MyAfterProc(struct rx_call *acall, afs_int32 code)
102 {
103     VTRANS_LOCK;
104     runningCalls--;
105     VTRANS_UNLOCK;
106     return;
107 }
108
109 /* Called every GCWAKEUP seconds to try to unlock all our partitions,
110  * if we're idle and there are no active transactions
111  */
112 static void
113 TryUnlock(void)
114 {
115     /* if there are no running calls, and there are no active transactions, then
116      * it should be safe to release any partition locks we've accumulated */
117     VTRANS_LOCK;
118     if (runningCalls == 0 && TransList() == (struct volser_trans *)0) {
119         VTRANS_UNLOCK;
120         VPFullUnlock();         /* in volprocs.c */
121     } else
122         VTRANS_UNLOCK;
123 }
124
125 /* background daemon for timing out transactions */
126 static void*
127 BKGLoop(void *unused)
128 {
129     struct timeval tv;
130     int loop = 0;
131
132     afs_pthread_setname_self("vol bkg");
133     while (1) {
134         tv.tv_sec = GCWAKEUP;
135         tv.tv_usec = 0;
136 #ifdef AFS_PTHREAD_ENV
137 #ifdef AFS_NT40_ENV
138         Sleep(GCWAKEUP * 1000);
139 #else
140         select(0, 0, 0, 0, &tv);
141 #endif
142 #else
143         (void)IOMGR_Select(0, 0, 0, 0, &tv);
144 #endif
145         GCTrans();
146         TryUnlock();
147         loop++;
148         if (loop == 10) {       /* reopen log every 5 minutes */
149             loop = 0;
150             ReOpenLog(AFSDIR_SERVER_VOLSERLOG_FILEPATH);
151         }
152     }
153
154     return NULL;
155 }
156
157 /* Background daemon for sleeping so the volserver does not become I/O bound */
158 afs_int32 TTsleep, TTrun;
159 #ifndef AFS_PTHREAD_ENV
160 static void *
161 BKGSleep(void *unused)
162 {
163     struct volser_trans *tt;
164
165     if (TTsleep) {
166         while (1) {
167 #ifdef AFS_PTHREAD_ENV
168             sleep(TTrun);
169 #else /* AFS_PTHREAD_ENV */
170             IOMGR_Sleep(TTrun);
171 #endif
172             VTRANS_LOCK;
173             for (tt = TransList(); tt; tt = tt->next) {
174                 VTRANS_OBJ_LOCK(tt);
175                 if ((strcmp(tt->lastProcName, "DeleteVolume") == 0)
176                     || (strcmp(tt->lastProcName, "Clone") == 0)
177                     || (strcmp(tt->lastProcName, "ReClone") == 0)
178                     || (strcmp(tt->lastProcName, "Forward") == 0)
179                     || (strcmp(tt->lastProcName, "Restore") == 0)
180                     || (strcmp(tt->lastProcName, "ForwardMulti") == 0)) {
181                     VTRANS_OBJ_UNLOCK(tt);
182                     break;
183                 }
184                 VTRANS_OBJ_UNLOCK(tt);
185             }
186             if (tt) {
187                 VTRANS_UNLOCK;
188                 sleep(TTsleep);
189             } else
190                 VTRANS_UNLOCK;
191         }
192     }
193     return NULL;
194 }
195 #endif
196
197 #ifdef AFS_NT40_ENV
198 /* no volser_syscall */
199 #elif defined(AFS_SUN511_ENV)
200 int
201 volser_syscall(afs_uint32 a3, afs_uint32 a4, void *a5)
202 {
203     int err, code;
204     code = ioctl_sun_afs_syscall(28 /* AFSCALL_CALL */, a3, a4, a5, 0, 0, 0,
205                                  &err);
206     if (code) {
207         err = code;
208     }
209     return err;
210 }
211 #else
212 int
213 volser_syscall(afs_uint32 a3, afs_uint32 a4, void *a5)
214 {
215     afs_uint32 rcode;
216 #ifndef AFS_LINUX20_ENV
217     void (*old) (int);
218
219     old = signal(SIGSYS, SIG_IGN);
220 #endif
221     rcode =
222         syscall(AFS_SYSCALL /* AFS_SYSCALL */ , 28 /* AFSCALL_CALL */ , a3,
223                 a4, a5);
224 #ifndef AFS_LINUX20_ENV
225     signal(SIGSYS, old);
226 #endif
227
228     return rcode;
229 }
230 #endif
231
232
233 /* check whether caller is authorized to manage RX statistics */
234 int
235 vol_rxstat_userok(struct rx_call *call)
236 {
237     return afsconf_SuperUser(tdir, call, NULL);
238 }
239
240 /**
241  * Return true if this name is a member of the local realm.
242  */
243 static int
244 vol_IsLocalRealmMatch(void *rock, char *name, char *inst, char *cell)
245 {
246     struct afsconf_dir *dir = (struct afsconf_dir *)rock;
247     afs_int32 islocal = 0;      /* default to no */
248     int code;
249
250     code = afsconf_IsLocalRealmMatch(dir, &islocal, name, inst, cell);
251     if (code) {
252         ViceLog(0,
253                 ("Failed local realm check; code=%d, name=%s, inst=%s, cell=%s\n",
254                  code, name, inst, cell));
255     }
256     return islocal;
257 }
258
259 enum optionsList {
260     OPT_log,
261     OPT_rxbind,
262     OPT_dotted,
263     OPT_debug,
264     OPT_threads,
265     OPT_auditlog,
266     OPT_audit_interface,
267     OPT_nojumbo,
268     OPT_jumbo,
269     OPT_rxmaxmtu,
270     OPT_sleep,
271     OPT_udpsize,
272     OPT_peer,
273     OPT_process,
274     OPT_preserve_vol_stats,
275     OPT_sync,
276     OPT_syslog,
277     OPT_logfile,
278     OPT_config
279 };
280
281 static int
282 ParseArgs(int argc, char **argv) {
283     int code;
284     int optval;
285     char *optstring;
286     struct cmd_syndesc *opts;
287     char *sleepSpec;
288     char *sync_behavior;
289
290     opts = cmd_CreateSyntax(NULL, NULL, NULL, NULL);
291     cmd_AddParmAtOffset(opts, OPT_log, "-log", CMD_FLAG, CMD_OPTIONAL,
292            "log vos users");
293     cmd_AddParmAtOffset(opts, OPT_rxbind, "-rxbind", CMD_FLAG, CMD_OPTIONAL,
294            "bind only to the primary interface");
295     cmd_AddParmAtOffset(opts, OPT_dotted, "-dotted", CMD_FLAG, CMD_OPTIONAL,
296            "permit Kerberos 5 principals with dots");
297     cmd_AddParmAtOffset(opts, OPT_debug, "-d", CMD_SINGLE, CMD_OPTIONAL,
298            "debug level");
299     cmd_AddParmAtOffset(opts, OPT_threads, "-p", CMD_SINGLE, CMD_OPTIONAL,
300            "number of threads");
301     cmd_AddParmAtOffset(opts, OPT_auditlog, "-auditlog", CMD_SINGLE,
302            CMD_OPTIONAL, "location of audit log");
303     cmd_AddParmAtOffset(opts, OPT_audit_interface, "-audit-interface",
304            CMD_SINGLE, CMD_OPTIONAL, "interface to use for audit logging");
305     cmd_AddParmAtOffset(opts, OPT_nojumbo, "-nojumbo", CMD_FLAG, CMD_OPTIONAL,
306             "disable jumbograms");
307     cmd_AddParmAtOffset(opts, OPT_jumbo, "-jumbo", CMD_FLAG, CMD_OPTIONAL,
308             "enable jumbograms");
309     cmd_AddParmAtOffset(opts, OPT_rxmaxmtu, "-rxmaxmtu", CMD_SINGLE,
310             CMD_OPTIONAL, "maximum MTU for RX");
311     cmd_AddParmAtOffset(opts, OPT_udpsize, "-udpsize", CMD_SINGLE,
312             CMD_OPTIONAL, "size of socket buffer in bytes");
313     cmd_AddParmAtOffset(opts, OPT_sleep, "-sleep", CMD_SINGLE,
314             CMD_OPTIONAL, "make background daemon sleep (LWP only)");
315     cmd_AddParmAtOffset(opts, OPT_peer, "-enable_peer_stats", CMD_FLAG,
316             CMD_OPTIONAL, "enable RX transport statistics");
317     cmd_AddParmAtOffset(opts, OPT_process, "-enable_process_stats", CMD_FLAG,
318             CMD_OPTIONAL, "enable RX RPC statistics");
319     cmd_AddParmAtOffset(opts, OPT_preserve_vol_stats, "-preserve-vol-stats", CMD_FLAG,
320             CMD_OPTIONAL, "preserve volume statistics");
321 #if !defined(AFS_NT40_ENV)
322     cmd_AddParmAtOffset(opts, OPT_syslog, "-syslog", CMD_SINGLE_OR_FLAG,
323             CMD_OPTIONAL, "log to syslog");
324 #endif
325     cmd_AddParmAtOffset(opts, OPT_sync, "-sync",
326             CMD_SINGLE, CMD_OPTIONAL, "always | onclose | never");
327     cmd_AddParmAtOffset(opts, OPT_logfile, "-logfile", CMD_SINGLE,
328            CMD_OPTIONAL, "location of log file");
329     cmd_AddParmAtOffset(opts, OPT_config, "-config", CMD_SINGLE,
330            CMD_OPTIONAL, "configuration location");
331
332     code = cmd_Parse(argc, argv, &opts);
333     if (code == CMD_HELP) {
334         exit(0);
335     }
336     if (code)
337         return 1;
338
339     cmd_OptionAsFlag(opts, OPT_log, &DoLogging);
340     cmd_OptionAsFlag(opts, OPT_rxbind, &rxBind);
341     cmd_OptionAsFlag(opts, OPT_dotted, &rxkadDisableDotCheck);
342     cmd_OptionAsFlag(opts, OPT_preserve_vol_stats, &DoPreserveVolumeStats);
343     cmd_OptionAsInt(opts, OPT_debug, &LogLevel);
344     if (cmd_OptionPresent(opts, OPT_peer))
345         rx_enablePeerRPCStats();
346     if (cmd_OptionPresent(opts, OPT_process))
347         rx_enableProcessRPCStats();
348     if (cmd_OptionPresent(opts, OPT_nojumbo))
349         rxJumbograms = 0;
350     if (cmd_OptionPresent(opts, OPT_jumbo))
351         rxJumbograms = 1;
352 #ifndef AFS_NT40_ENV
353     if (cmd_OptionPresent(opts, OPT_syslog)) {
354         serverLogSyslog = 1;
355         cmd_OptionAsInt(opts, OPT_syslog, &serverLogSyslogFacility);
356     }
357 #endif
358     cmd_OptionAsInt(opts, OPT_rxmaxmtu, &rxMaxMTU);
359     if (cmd_OptionAsInt(opts, OPT_udpsize, &optval) == 0) {
360         if (optval < rx_GetMinUdpBufSize()) {
361             printf("Warning:udpsize %d is less than minimum %d; ignoring\n",
362                     optval, rx_GetMinUdpBufSize());
363         } else
364             udpBufSize = optval;
365     }
366     cmd_OptionAsString(opts, OPT_auditlog, &auditFileName);
367
368     if (cmd_OptionAsString(opts, OPT_audit_interface, &optstring) == 0) {
369         if (osi_audit_interface(optstring)) {
370             printf("Invalid audit interface '%s'\n", optstring);
371             return -1;
372         }
373         free(optstring);
374         optstring = NULL;
375     }
376     if (cmd_OptionAsInt(opts, OPT_threads, &lwps) == 0) {
377         if (lwps > MAXLWP) {
378             printf("Warning: '-p %d' is too big; using %d instead\n", lwps, MAXLWP);
379             lwps = MAXLWP;
380         }
381     }
382     if (cmd_OptionAsString(opts, OPT_sleep, &sleepSpec) == 0) {
383         sscanf(sleepSpec, "%d/%d", &TTsleep, &TTrun);
384         if ((TTsleep < 0) || (TTrun <= 0)) {
385             printf("Warning: '-sleep %d/%d' is incorrect; ignoring\n",
386                     TTsleep, TTrun);
387             TTsleep = TTrun = 0;
388         }
389
390     }
391     if (cmd_OptionAsString(opts, OPT_sync, &sync_behavior) == 0) {
392         if (ih_SetSyncBehavior(sync_behavior)) {
393             printf("Invalid -sync value %s\n", sync_behavior);
394             return -1;
395         }
396     }
397     cmd_OptionAsString(opts, OPT_logfile, &logFile);
398     cmd_OptionAsString(opts, OPT_config, &configDir);
399
400     return 0;
401 }
402
403 #include "AFS_component_version_number.c"
404 int
405 main(int argc, char **argv)
406 {
407     afs_int32 code;
408     struct rx_securityClass **securityClasses;
409     afs_int32 numClasses;
410     struct rx_service *service;
411     int rxpackets = 100;
412     afs_uint32 host = ntohl(INADDR_ANY);
413     VolumePackageOptions opts;
414
415 #ifdef  AFS_AIX32_ENV
416     /*
417      * The following signal action for AIX is necessary so that in case of a
418      * crash (i.e. core is generated) we can include the user's data section
419      * in the core dump. Unfortunately, by default, only a partial core is
420      * generated which, in many cases, isn't too useful.
421      */
422     struct sigaction nsa;
423
424     sigemptyset(&nsa.sa_mask);
425     nsa.sa_handler = SIG_DFL;
426     nsa.sa_flags = SA_FULLDUMP;
427     sigaction(SIGABRT, &nsa, NULL);
428     sigaction(SIGSEGV, &nsa, NULL);
429 #endif
430     osi_audit_init();
431     osi_audit(VS_StartEvent, 0, AUD_END);
432
433     /* Initialize dirpaths */
434     if (!(initAFSDirPath() & AFSDIR_SERVER_PATHS_OK)) {
435 #ifdef AFS_NT40_ENV
436         ReportErrorEventAlt(AFSEVT_SVR_NO_INSTALL_DIR, 0, argv[0], 0);
437 #endif
438         fprintf(stderr, "%s: Unable to obtain AFS server directory.\n",
439                 argv[0]);
440         exit(2);
441     }
442
443     TTsleep = TTrun = 0;
444
445     configDir = strdup(AFSDIR_SERVER_ETC_DIRPATH);
446     logFile = strdup(AFSDIR_SERVER_VOLSERLOG_FILEPATH);
447
448     ParseArgs(argc, argv);
449
450     if (auditFileName) {
451         osi_audit_file(auditFileName);
452         osi_audit(VS_StartEvent, 0, AUD_END);
453     }
454 #ifdef AFS_SGI_VNODE_GLUE
455     if (afs_init_kernel_config(-1) < 0) {
456         printf
457             ("Can't determine NUMA configuration, not starting volserver.\n");
458         exit(1);
459     }
460 #endif
461     InitErrTabs();
462
463 #ifdef AFS_PTHREAD_ENV
464     SetLogThreadNumProgram( rx_GetThreadNum );
465 #endif
466
467 #ifdef AFS_NT40_ENV
468     if (afs_winsockInit() < 0) {
469         ReportErrorEventAlt(AFSEVT_SVR_WINSOCK_INIT_FAILED, 0, argv[0], 0);
470         printf("Volume server unable to start winsock, exiting.\n");
471         exit(1);
472     }
473 #endif
474     /* Open VolserLog and map stdout, stderr into it; VInitVolumePackage2 can
475        log, so we need to do this here */
476     OpenLog(logFile);
477
478     VOptDefaults(volumeServer, &opts);
479     if (VInitVolumePackage2(volumeServer, &opts)) {
480         Log("Shutting down: errors encountered initializing volume package\n");
481         exit(1);
482     }
483     /* For nuke() */
484     Lock_Init(&localLock);
485     DInit(40);
486 #ifndef AFS_PTHREAD_ENV
487     vol_PollProc = IOMGR_Poll;  /* tell vol pkg to poll io system periodically */
488 #endif
489 #ifndef AFS_NT40_ENV
490     rxi_syscallp = volser_syscall;
491 #endif
492     rx_nPackets = rxpackets;    /* set the max number of packets */
493     if (udpBufSize)
494         rx_SetUdpBufSize(udpBufSize);   /* set the UDP buffer size for receive */
495     if (rxBind) {
496         afs_int32 ccode;
497         if (AFSDIR_SERVER_NETRESTRICT_FILEPATH ||
498             AFSDIR_SERVER_NETINFO_FILEPATH) {
499             char reason[1024];
500             ccode = afsconf_ParseNetFiles(SHostAddrs, NULL, NULL,
501                                           ADDRSPERSITE, reason,
502                                           AFSDIR_SERVER_NETINFO_FILEPATH,
503                                           AFSDIR_SERVER_NETRESTRICT_FILEPATH);
504         } else
505         {
506             ccode = rx_getAllAddr(SHostAddrs, ADDRSPERSITE);
507         }
508         if (ccode == 1)
509             host = SHostAddrs[0];
510     }
511
512     code = rx_InitHost(host, (int)htons(AFSCONF_VOLUMEPORT));
513     if (code) {
514         fprintf(stderr, "rx init failed on socket AFSCONF_VOLUMEPORT %u\n",
515                 AFSCONF_VOLUMEPORT);
516         VS_EXIT(1);
517     }
518     if (!rxJumbograms) {
519         /* Don't allow 3.4 vos clients to send jumbograms and we don't send. */
520         rx_SetNoJumbo();
521     }
522     if (rxMaxMTU != -1) {
523         if (rx_SetMaxMTU(rxMaxMTU) != 0) {
524             fprintf(stderr, "rxMaxMTU %d is invalid\n", rxMaxMTU);
525             VS_EXIT(1);
526         }
527     }
528     rx_GetIFInfo();
529     rx_SetRxDeadTime(420);
530     memset(busyFlags, 0, sizeof(busyFlags));
531
532     SetupLogSignals();
533
534     {
535 #ifdef AFS_PTHREAD_ENV
536         pthread_t tid;
537         pthread_attr_t tattr;
538         opr_Verify(pthread_attr_init(&tattr) == 0);
539         opr_Verify(pthread_attr_setdetachstate(&tattr,
540                                                PTHREAD_CREATE_DETACHED) == 0);
541         opr_Verify(pthread_create(&tid, &tattr, BKGLoop, NULL) == 0);
542 #else
543         PROCESS pid;
544         LWP_CreateProcess(BKGLoop, 16*1024, 3, 0, "vol bkg daemon", &pid);
545         LWP_CreateProcess(BKGSleep,16*1024, 3, 0, "vol slp daemon", &pid);
546 #endif
547     }
548
549     /* Create a single security object, in this case the null security object, for unauthenticated connections, which will be used to control security on connections made to this server */
550
551     tdir = afsconf_Open(configDir);
552     if (!tdir) {
553         Abort("volser: could not open conf files in %s\n",
554               configDir);
555         VS_EXIT(1);
556     }
557
558     /* initialize audit user check */
559     osi_audit_set_user_check(tdir, vol_IsLocalRealmMatch);
560
561     afsconf_BuildServerSecurityObjects(tdir, &securityClasses, &numClasses);
562     if (securityClasses[0] == NULL)
563         Abort("rxnull_NewServerSecurityObject");
564     service =
565         rx_NewServiceHost(host, 0, VOLSERVICE_ID, "VOLSER", securityClasses,
566                           numClasses, AFSVolExecuteRequest);
567     if (service == (struct rx_service *)0)
568         Abort("rx_NewService");
569     rx_SetBeforeProc(service, MyBeforeProc);
570     rx_SetAfterProc(service, MyAfterProc);
571     rx_SetIdleDeadTime(service, 0);     /* never timeout */
572     if (lwps < 4)
573         lwps = 4;
574     rx_SetMaxProcs(service, lwps);
575 #if defined(AFS_XBSD_ENV)
576     rx_SetStackSize(service, (128 * 1024));
577 #elif defined(AFS_SGI_ENV)
578     rx_SetStackSize(service, (48 * 1024));
579 #else
580     rx_SetStackSize(service, (32 * 1024));
581 #endif
582
583     if (rxkadDisableDotCheck) {
584         rx_SetSecurityConfiguration(service, RXS_CONFIG_FLAGS,
585                                     (void *)RXS_CONFIG_FLAGS_DISABLE_DOTCHECK);
586     }
587
588     service =
589         rx_NewService(0, RX_STATS_SERVICE_ID, "rpcstats", securityClasses,
590                       numClasses, RXSTATS_ExecuteRequest);
591     if (service == (struct rx_service *)0)
592         Abort("rx_NewService");
593     rx_SetMinProcs(service, 2);
594     rx_SetMaxProcs(service, 4);
595
596     LogCommandLine(argc, argv, "Volserver", VolserVersion, "Starting AFS",
597                    Log);
598     if (afsconf_GetLatestKey(tdir, NULL, NULL) == 0) {
599         LogDesWarning();
600     }
601     if (TTsleep) {
602         Log("Will sleep %d second%s every %d second%s\n", TTsleep,
603             (TTsleep > 1) ? "s" : "", TTrun + TTsleep,
604             (TTrun + TTsleep > 1) ? "s" : "");
605     }
606
607     /* allow super users to manage RX statistics */
608     rx_SetRxStatUserOk(vol_rxstat_userok);
609
610     rx_StartServer(1);          /* Donate this process to the server process pool */
611
612     osi_audit(VS_FinishEvent, (-1), AUD_END);
613     Abort("StartServer returned?");
614     return 0; /* not reached */
615 }