]> arthur.barton.de Git - netatalk.git/commitdiff
Remove excessive logging.
authorfranklahm <franklahm>
Thu, 4 Feb 2010 14:34:31 +0000 (14:34 +0000)
committerfranklahm <franklahm>
Thu, 4 Feb 2010 14:34:31 +0000 (14:34 +0000)
Add dircachesize option for afpd.conf.
Add dircache dumping with a -SIGHUP handler.

12 files changed:
etc/afpd/afp_dsi.c
etc/afpd/afp_options.c
etc/afpd/catsearch.c
etc/afpd/dircache.c
etc/afpd/dircache.h
etc/afpd/directory.c
etc/afpd/enumerate.c
etc/afpd/file.c
etc/afpd/filedir.c
etc/afpd/globals.h
etc/afpd/ofork.c
libatalk/cnid/dbd/cnid_dbd.c

index 22ef5fc7e80caea74524d4997ae0fb0e6447b559..efe1d241825a4123aeb3dd3886f40f2b93a07b65 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_dsi.c,v 1.49.2.1 2010-02-01 10:56:08 franklahm Exp $
+ * $Id: afp_dsi.c,v 1.49.2.2 2010-02-04 14:34:31 franklahm Exp $
  *
  * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
@@ -338,7 +338,7 @@ void afp_over_dsi(AFPObj *obj)
     }
 #endif /* DEBUGGING */
 
-    if (dircache_init(0) != 0)
+    if (dircache_init(obj->options.dircachesize) != 0)
         afp_dsi_die(EXITERR_SYS);
 
     /* get stuck here until the end */
@@ -349,6 +349,7 @@ void afp_over_dsi(AFPObj *obj)
         if (reload_request) {
             reload_request = 0;
             load_volumes(child.obj);
+            dircache_dump();
         }
 
         if (cmd == DSIFUNC_TICKLE) {
index 2637e1a8cf1c6fa105de3157a5d22a818b78b8d2..8930422689bd87cc45b47d376b10cd9dd633444c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_options.c,v 1.51 2009-11-24 21:01:45 didg Exp $
+ * $Id: afp_options.c,v 1.51.4.1 2010-02-04 14:34:31 franklahm Exp $
  *
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
@@ -195,6 +195,7 @@ void afp_options_init(struct afp_options *options)
     /* don't advertize slp by default */
     options->flags |= OPTION_NOSLP;
 #endif
+    options->dircachesize = 8192;
 }
 
 /* parse an afpd.conf line. i'm doing it this way because it's
@@ -448,6 +449,9 @@ int afp_options_parseline(char *buf, struct afp_options *options)
 
     if ((c = getoption(buf, "-ntseparator")) && (opt = strdup(c)))
        options->ntseparator = opt;
+
+    if ((c = getoption(buf, "-dircachesize")))
+        options->dircachesize = atoi(c);
      
     return 1;
 }
index 24094c8dce784ae4d47a83decf2e44eba8d355e1..d85f25cbf995ea377c1f41a1ec92498173bbe2fb 100644 (file)
@@ -592,7 +592,7 @@ static int catsearch(struct vol *vol, struct dir *dir,
                                */
                 int unlen = strlen(path.u_name);
                                if (cached)
-                       path.d_dir = dircache_search_by_name(vol, dstack[cidx].dir->d_did, path.u_name, unlen);
+                       path.d_dir = dircache_search_by_name(vol, dstack[cidx].dir, path.u_name, unlen);
                else
                        path.d_dir = NULL;
                if (!path.d_dir) {
index a4f0fe4addd976687c099ab8846514b3200eb7b3..7059f6284363210d2e3e8ec69cc5b3998fd3eec9 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  $Id: dircache.c,v 1.1.2.2 2010-02-02 14:39:48 franklahm Exp $
+  $Id: dircache.c,v 1.1.2.3 2010-02-04 14:34:31 franklahm Exp $
   Copyright (c) 2010 Frank Lahm <franklahm@gmail.com>
 
   This program is free software; you can redistribute it and/or modify
@@ -188,6 +188,8 @@ static void dircache_evict(void)
     int i = dircache_free_quantum;
     struct dir *dir;
 
+    LOG(log_debug, logtype_afpd, "dircache: {starting cache eviction}");
+
     while (i--) {
         if ((dir = (struct dir *)dequeue(index_queue)) == NULL) { /* 1 */
             dircache_dump();
@@ -210,6 +212,8 @@ static void dircache_evict(void)
 
     assert(queue_count == dircache->hash_nodecount);
     assert(queue_count + dircache_free_quantum <= dircache_maxsize);
+
+    LOG(log_debug, logtype_afpd, "dircache: {finished cache eviction}");
 }
 
 
@@ -251,24 +255,28 @@ struct dir *dircache_search_by_did(const struct vol *vol, cnid_t did)
  * @brief Search the cache via did/name hashtable
  *
  * @param vol    (r) volume
- * @param did    (r) directory CNID
+ * @param dir    (r) directory
  * @param name   (r) name (server side encoding)
  * @parma len    (r) strlen of name
  *
  * @returns pointer to struct dir if found in cache, else NULL
  */
-struct dir *dircache_search_by_name(const struct vol *vol, cnid_t did, char *name, int len)
+struct dir *dircache_search_by_name(const struct vol *vol, const struct dir *dir, char *name, int len)
 {
     struct dir *cdir = NULL;
     struct dir key;
     hnode_t *hn;
     static_bstring uname = {-1, len, (unsigned char *)name};
 
-    assert(vol != NULL && name != NULL && len && len < 256);
+    assert(vol);
+    assert(dir);
+    assert(name);
+    assert(len == strlen(name));
+    assert(len < 256);
 
-    if ((did && did != DIRDID_ROOT_PARENT)) {
+    if (dir->d_did != DIRDID_ROOT_PARENT) {
         key.d_vid = vol->v_vid;
-        key.d_pdid = did;
+        key.d_pdid = dir->d_did;
         key.d_u_name = &uname;
 
         if ((hn = hash_lookup(index_didname, &key)))
@@ -276,9 +284,11 @@ struct dir *dircache_search_by_name(const struct vol *vol, cnid_t did, char *nam
     }
 
     if (cdir)
-        LOG(log_debug, logtype_afpd, "dircache(did:%u,'%s'): {cached: path:'%s'}", ntohl(did), name, cfrombstring(cdir->d_fullpath));
+        LOG(log_debug, logtype_afpd, "dircache(pdid:%u, did:%u, '%s'): {found in cache}",
+            ntohl(dir->d_did), ntohl(cdir->d_did), cfrombstring(cdir->d_fullpath));
     else
-        LOG(log_debug, logtype_afpd, "dircache(did:%u,'%s'): {not in cache}", ntohl(did), name);
+        LOG(log_debug, logtype_afpd, "dircache(pdid:%u,'%s/%s'): {not in cache}",
+            ntohl(dir->d_did), cfrombstring(dir->d_fullpath), name);
 
     return cdir;
 }
@@ -294,13 +304,13 @@ struct dir *dircache_search_by_name(const struct vol *vol, cnid_t did, char *nam
  */
 int dircache_add(struct dir *dir)
 {
-    assert(dir != NULL
-           && ntohl(dir->d_pdid) >= 2
-           && ntohl(dir->d_did) >= CNID_START
-           && dir->d_fullpath != NULL
-           && dir->d_u_name != NULL
-           && dir->d_vid != 0
-           && dircache->hash_nodecount <= dircache_maxsize);
+    assert(dir);
+    assert(ntohl(dir->d_pdid) >= 2);
+    assert(ntohl(dir->d_did) >= CNID_START);
+    assert(dir->d_fullpath);
+    assert(dir->d_u_name);
+    assert(dir->d_vid);
+    assert(dircache->hash_nodecount <= dircache_maxsize);
 
     /* Check if cache is full */
     if (dircache->hash_nodecount == dircache_maxsize)
@@ -326,6 +336,8 @@ int dircache_add(struct dir *dir)
         queue_count++;
     }
 
+    LOG(log_debug, logtype_afpd, "dircache(did:%u,'%s'): {added}", ntohl(dir->d_did), cfrombstring(dir->d_fullpath));
+
     assert(queue_count == index_didname->hash_nodecount 
            && queue_count == dircache->hash_nodecount);
 
@@ -374,6 +386,8 @@ void dircache_remove(const struct vol *vol _U_, struct dir *dir, int flags)
         hash_delete(dircache, hn);
     }
 
+    LOG(log_debug, logtype_afpd, "dircache(did:%u,'%s'): {removed}", ntohl(dir->d_did), cfrombstring(dir->d_fullpath));
+
     assert(queue_count == index_didname->hash_nodecount 
            && queue_count == dircache->hash_nodecount);
 }
@@ -434,7 +448,33 @@ int dircache_init(int reqsize)
  */
 void dircache_dump(void)
 {
-    LOG(log_error, logtype_afpd, "Fatal directory cache corruption. Dumping...\n");
+    char tmpnam[64];
+    FILE *dump;
+    qnode_t *n = index_queue->next;
+    const struct dir *dir;
+
+    LOG(log_warning, logtype_afpd, "Dumping directory cache...");
+
+    sprintf(tmpnam, "/tmp/dircache.%u", getpid());
+    if ((dump = fopen(tmpnam, "w+")) == NULL) {
+        LOG(log_error, logtype_afpd, "dircache_dump: %s", strerror(errno));
+        return;
+    }
+    setbuf(dump, NULL);
+
+    fprintf(dump, "Number of cache entries: %u\n", queue_count);
+    fprintf(dump, "Configured maximum cache size: %u\n", dircache_maxsize);
+    fprintf(dump, "==================================================\n\n");
+
+    for (int i = 1; i <= queue_count; i++) {
+        if (n == index_queue)
+            break;
+        dir = (struct dir *)n->data;
+        fprintf(dump, "%05u: vid:%u, pdid:%u, did:%u, path:%s\n",
+                i, ntohs(dir->d_vid), ntohl(dir->d_pdid), ntohl(dir->d_did), cfrombstring(dir->d_fullpath));
+        n = n->next;
+    }
 
+    fprintf(dump, "\n");
     return;
 }
index 88c15f2a35ba7645fbfa91a82e103ce48fa2045e..2a99c2a203b00c6c5ac0a8214fb7ec5ed4aa9426 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   $Id: dircache.h,v 1.1.2.1 2010-02-01 10:56:08 franklahm Exp $
+   $Id: dircache.h,v 1.1.2.2 2010-02-04 14:34:31 franklahm Exp $
    Copyright (c) 2010 Frank Lahm <franklahm@gmail.com>
 
    This program is free software; you can redistribute it and/or modify
@@ -28,7 +28,7 @@ extern int        dircache_init(int reqsize);
 extern int        dircache_add(struct dir *);
 extern void       dircache_remove(const struct vol *, struct dir *, int flag);
 extern struct dir *dircache_search_by_did(const struct vol *vol, cnid_t did);
-extern struct dir *dircache_search_by_name(const struct vol *, cnid_t did, char *name, int len);
+extern struct dir *dircache_search_by_name(const struct vol *, const struct dir *dir, char *name, int len);
 extern void       dircache_dump(void);
 
 #endif /* DIRCACHE_H */
index cd834419e2fb66fe92bb394b47ccf8a46d1a2e1a..43ef8a9196e01e5ec8fe12e44d1a732717fa168b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: directory.c,v 1.131.2.8 2010-02-02 14:39:48 franklahm Exp $
+ * $Id: directory.c,v 1.131.2.9 2010-02-04 14:34:31 franklahm Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -49,11 +49,13 @@ extern void addir_inherit_acl(const struct vol *vol);
 
 /*
  * FIXMEs, loose ends after the dircache rewrite:
- * o case-insensitivity is gone
+ * o dircache aging, place dirlookup'ed dirs on front of queue ??
+ * o merge dircache_search_by_name and dir_add ??
+ * o case-insensitivity is gone from cname
  * o catsearch doesn't work, see FIXMEs in catsearch.c
  * o curdir per volume caching is gone
  * o directory offspring count calculation probably broken
- * o doesn't work with CNID backend last and the like.
+ * o doesn't work with CNID backend last and the like,
  *   CNID backend must support persistent CNIDs.
  */
 
@@ -800,7 +802,7 @@ struct dir *dir_add(const struct vol *vol, const struct dir *dir, struct path *p
     assert(path);
     assert(len > 0);
 
-    if ((cdir = dircache_search_by_name(vol, dir->d_did, path->u_name, strlen(path->u_name))) != NULL) {
+    if ((cdir = dircache_search_by_name(vol, dir, path->u_name, strlen(path->u_name))) != NULL) {
         /* there's a stray entry in the dircache */
         LOG(log_debug, logtype_afpd, "dir_add(did:%u,'%s/%s'): {stray cache entry: did:%u,'%s', removing}",
             ntohl(dir->d_did), cfrombstring(dir->d_fullpath), path->u_name,
@@ -1032,7 +1034,7 @@ struct path *cname(struct vol *vol, struct dir *dir, char **cpath)
     int         size = 0;
     int         toUTF8 = 0;
 
-    LOG(log_debug, logtype_afpd, "came('%s'): {start}", cfrombstring(dir->d_fullpath));
+    LOG(log_maxdebug, logtype_afpd, "came('%s'): {start}", cfrombstring(dir->d_fullpath));
 
     data = *cpath;
     afp_errno = AFPERR_NOOBJ;
@@ -1197,7 +1199,7 @@ struct path *cname(struct vol *vol, struct dir *dir, char **cpath)
 
             /* Search the cache */
             int unamelen = strlen(ret.u_name);
-            cdir = dircache_search_by_name(vol, dir->d_did, ret.u_name, unamelen);
+            cdir = dircache_search_by_name(vol, dir, ret.u_name, unamelen);
             if (cdir == NULL) {
                 /* Not in cache, create one */
                 if ((cdir = dir_add(vol, dir, &ret, unamelen)) == NULL) {
@@ -1411,6 +1413,8 @@ int getdirparams(const struct vol *vol,
         case DIRPBIT_PDID :
             memcpy( data, &pdid, sizeof( pdid ));
             data += sizeof( pdid );
+            LOG(log_debug, logtype_afpd, "metadata('%s'):     Parent DID: %u",
+                s_path->u_name, ntohl(pdid));
             break;
 
         case DIRPBIT_CDATE :
@@ -1467,6 +1471,8 @@ int getdirparams(const struct vol *vol,
         case DIRPBIT_DID :
             memcpy( data, &dir->d_did, sizeof( aint ));
             data += sizeof( aint );
+            LOG(log_debug, logtype_afpd, "metadata('%s'):            DID: %u",
+                s_path->u_name, ntohl(dir->d_did));
             break;
 
         case DIRPBIT_OFFCNT :
index 61ae747e677b2ea4d17ffa7dd442702e921806e0..3f754a26d19ba07be8ae24d4a06b017c9cd89614 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: enumerate.c,v 1.48.2.1 2010-02-01 10:56:08 franklahm Exp $
+ * $Id: enumerate.c,v 1.48.2.2 2010-02-04 14:34:31 franklahm Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -377,7 +377,7 @@ static int enumerate(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_,
                 continue;
             }
             int len = strlen(s_path.u_name);
-            if ((dir = dircache_search_by_name(vol, curdir->d_did, s_path.u_name, len)) == NULL) {
+            if ((dir = dircache_search_by_name(vol, curdir, s_path.u_name, len)) == NULL) {
                 if ((dir = dir_add(vol, curdir, &s_path, len)) == NULL) {
                     LOG(log_error, logtype_afpd, "enumerate(vid:%u, did:%u, name:'%s'): error adding dir: '%s'",
                         ntohs(vid), ntohl(did), o_path->u_name, s_path.u_name);
index 9bc04b2c62a7ff09de13d63e4dbdfc15ef41b10d..30e077d0a4ba2a3a0b705919f560788061fd4365 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: file.c,v 1.131.2.2 2010-02-02 13:15:30 franklahm Exp $
+ * $Id: file.c,v 1.131.2.3 2010-02-04 14:34:31 franklahm Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -248,9 +248,6 @@ int getmetadata(struct vol *vol,
     struct stat         *st;
     struct maccess     ma;
 
-#ifdef DEBUG
-    LOG(log_debug9, logtype_afpd, "begin getmetadata:");
-#endif /* DEBUG */
 
     upath = path->u_name;
     st = &path->st;
@@ -298,11 +295,15 @@ int getmetadata(struct vol *vol,
 #endif
             memcpy(data, &ashort, sizeof( ashort ));
             data += sizeof( ashort );
+            LOG(log_debug, logtype_afpd, "metadata('%s'): AFP Attributes: %04x",
+                path->u_name, ntohs(ashort));
             break;
 
         case FILPBIT_PDID :
             memcpy(data, &dir->d_did, sizeof( u_int32_t ));
             data += sizeof( u_int32_t );
+            LOG(log_debug, logtype_afpd, "metadata('%s'):     Parent DID: %u",
+                path->u_name, ntohl(dir->d_did));
             break;
 
         case FILPBIT_CDATE :
@@ -349,6 +350,8 @@ int getmetadata(struct vol *vol,
         case FILPBIT_FNUM :
             memcpy(data, &id, sizeof( id ));
             data += sizeof( id );
+            LOG(log_debug, logtype_afpd, "metadata('%s'):           CNID: %u",
+                path->u_name, ntohl(id));
             break;
 
         case FILPBIT_DFLEN :
@@ -513,10 +516,6 @@ int getfilparams(struct vol *vol,
     int                 opened = 0;
     int rc;    
 
-#ifdef DEBUG
-    LOG(log_debug9, logtype_default, "begin getfilparams:");
-#endif /* DEBUG */
-
     opened = PARAM_NEED_ADP(bitmap);
     adp = NULL;
 
@@ -547,9 +546,6 @@ int getfilparams(struct vol *vol,
     if ( adp ) {
         ad_close_metadata( adp);
     }
-#ifdef DEBUG
-    LOG(log_debug9, logtype_afpd, "end getfilparams:");
-#endif /* DEBUG */
 
     return( rc );
 }
index fa3e5f617d1df400769cd5822334afee46fae40b..b79e1251c65d17add04d1c6541eafc8032ea33b4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: filedir.c,v 1.69.2.2 2010-02-01 16:13:52 franklahm Exp $
+ * $Id: filedir.c,v 1.69.2.3 2010-02-04 14:34:31 franklahm Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -179,7 +179,6 @@ int afp_getfildirparams(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *r
 
     st   = &s_path->st;
     if (!s_path->st_valid) {
-        LOG(log_debug, logtype_afpd, "getfildirparams: !s_path->st_valid");
         /* it's a dir and it should be there
          * because we chdir in it in cname or
          * it's curdir (maybe deleted, but then we can't know).
@@ -189,7 +188,6 @@ int afp_getfildirparams(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *r
     }
     if ( s_path->st_errno != 0 ) {
         if (afp_errno != AFPERR_ACCESS) {
-            LOG(log_debug, logtype_afpd, "getfildirparams: s_path->st_errno != 0");
             return( AFPERR_NOOBJ );
         }
     }
index ec1911e692348e943bf57ef39a6f92d6ae0a49b6..e6989e39bada6eb6a779633ef92d08c73ecb06c2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: globals.h,v 1.31.2.1 2010-02-01 10:56:08 franklahm Exp $
+ * $Id: globals.h,v 1.31.2.2 2010-02-04 14:34:31 franklahm Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -56,7 +56,7 @@ struct afp_volume_name {
 };
 
 struct afp_options {
-    int connections, transports, tickleval, timeout, server_notif, flags;
+    int connections, transports, tickleval, timeout, server_notif, flags, dircachesize;
     unsigned char passwdbits, passwdminlen, loginmaxfail;
     u_int32_t server_quantum;
     char hostname[MAXHOSTNAMELEN + 1], *server, *ipaddr, *port, *configfile;
index 14f0bb88f834f8f9d4e2d95d8a41a1affd0ec609..34ab622df0c249135de7acb1612f83131bd5acfa 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ofork.c,v 1.30.4.1 2010-02-01 10:56:08 franklahm Exp $
+ * $Id: ofork.c,v 1.30.4.2 2010-02-04 14:34:31 franklahm Exp $
  *
  * Copyright (c) 1996 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -286,12 +286,13 @@ int of_stat(struct path *path)
 {
     int ret;
 
-    LOG(log_maxdebug, logtype_afpd, "of_stat: {stat:'%s/%s'}", getcwdpath(), path->u_name);
-
     path->st_errno = 0;
     path->st_valid = 1;
-    if ((ret = stat(path->u_name, &path->st)) < 0)
+    if ((ret = stat(path->u_name, &path->st)) < 0) {
+        LOG(log_debug, logtype_afpd, "of_stat: {'%s/%s': %s}",
+            getcwdpath(), path->u_name, strerror(errno));
        path->st_errno = errno;
+    }
     return ret;
 }
 
index 2f12b2f0d695235c95466b90dd2e0ef53ca1f418..b915c65baea448c86c5ef985df7e458d06fd858b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_dbd.c,v 1.16 2010-01-21 14:14:49 didg Exp $
+ * $Id: cnid_dbd.c,v 1.16.2.1 2010-02-04 14:34:31 franklahm Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
@@ -146,8 +146,6 @@ static int write_vec(int fd, struct iovec *iov, size_t towrite)
     ssize_t len;
     size_t len1;
 
-    LOG(log_maxdebug, logtype_cnid, "write_vec: request to write %d bytes", towrite);
-
     len1 =  iov[1].iov_len;
     while (towrite > 0) {
         if (((len = writev(fd, iov, 2)) == -1 && errno == EINTR) || !len)
@@ -185,8 +183,6 @@ static int init_tsock(CNID_private *db)
     int len;
     struct iovec iov[2];
 
-    LOG(log_debug, logtype_cnid, "init_tsock: BEGIN. Opening volume '%s', CNID Server: %s/%s", db->db_dir, Cnid_srv, Cnid_port);
-
     if ((fd = tsock_getfd(Cnid_srv, Cnid_port)) < 0)
         return -1;
 
@@ -204,7 +200,8 @@ static int init_tsock(CNID_private *db)
         return -1;
     }
 
-    LOG(log_debug, logtype_cnid, "init_tsock: ok");
+    LOG(log_maxdebug, logtype_cnid, "init_tsock: BEGIN. Opening volume '%s', CNID Server: %s/%s",
+        db->db_dir, Cnid_srv, Cnid_port);
 
     return fd;
 }
@@ -215,8 +212,6 @@ static int send_packet(CNID_private *db, struct cnid_dbd_rqst *rqst)
     struct iovec iov[2];
     size_t towrite;
 
-    LOG(log_maxdebug, logtype_cnid, "send_packet: BEGIN");
-
     if (!rqst->namelen) {
         if (write(db->fd, rqst, sizeof(struct cnid_dbd_rqst)) != sizeof(struct cnid_dbd_rqst)) {
             LOG(log_warning, logtype_cnid, "send_packet: Error/short write rqst (db_dir %s): %s",
@@ -241,7 +236,7 @@ static int send_packet(CNID_private *db, struct cnid_dbd_rqst *rqst)
         return -1;
     }
     
-    LOG(log_maxdebug, logtype_cnid, "send_packet: OK");
+    LOG(log_maxdebug, logtype_cnid, "send_packet: {done}");
     return 0;
 }
 
@@ -301,8 +296,6 @@ static int dbd_rpc(CNID_private *db, struct cnid_dbd_rqst *rqst, struct cnid_dbd
     char *nametmp;
     size_t len;
 
-    LOG(log_maxdebug, logtype_cnid, "dbd_rpc: BEGIN");
-
     if (send_packet(db, rqst) < 0) {
         return -1;
     }
@@ -330,7 +323,7 @@ static int dbd_rpc(CNID_private *db, struct cnid_dbd_rqst *rqst, struct cnid_dbd
         return -1;
     }
 
-    LOG(log_maxdebug, logtype_cnid, "dbd_rpc: END");
+    LOG(log_maxdebug, logtype_cnid, "dbd_rpc: {done}");
 
     return 0;
 }
@@ -341,8 +334,6 @@ static int transmit(CNID_private *db, struct cnid_dbd_rqst *rqst, struct cnid_db
     time_t orig, t;
     int clean = 1; /* no errors so far - to prevent sleep on first try */
 
-    LOG(log_debug7, logtype_cnid, "transmit: BEGIN");
-
     if (db->changed) {
         /* volume and db don't have the same timestamp
          */
@@ -354,7 +345,7 @@ static int transmit(CNID_private *db, struct cnid_dbd_rqst *rqst, struct cnid_db
             struct cnid_dbd_rply rply_stamp;
             char  stamp[ADEDLEN_PRIVSYN];
 
-            LOG(log_debug, logtype_cnid, "transmit: connecting to cnid_dbd ...");
+            LOG(log_maxdebug, logtype_cnid, "transmit: connecting to cnid_dbd ...");
             if ((db->fd = init_tsock(db)) < 0) {
                 goto transmit_fail;
             }
@@ -383,11 +374,11 @@ static int transmit(CNID_private *db, struct cnid_dbd_rqst *rqst, struct cnid_db
                     memcpy(db->client_stamp, stamp, ADEDLEN_PRIVSYN);
                 memcpy(db->stamp, stamp, ADEDLEN_PRIVSYN);
             }
-            LOG(log_debug, logtype_cnid, "transmit: succesfully attached to cnid_dbd for volume '%s' with stamp '%08lx'.", 
+            LOG(log_debug, logtype_cnid, "transmit: attached to '%s', stamp: '%08lx'.", 
                 db->db_dir, *(uint64_t *)stamp);
         }
         if (!dbd_rpc(db, rqst, rply)) {
-            LOG(log_debug7, logtype_cnid, "transmit: END OK");
+            LOG(log_maxdebug, logtype_cnid, "transmit: {done}");
             return 0;
         }
     transmit_fail: