]> arthur.barton.de Git - netatalk.git/commitdiff
Enable CNID caching/backup in AppleDouble files by default.
authorfranklahm <franklahm>
Fri, 4 Sep 2009 07:59:50 +0000 (07:59 +0000)
committerfranklahm <franklahm>
Fri, 4 Sep 2009 07:59:50 +0000 (07:59 +0000)
New voloption nocnidcache disables it.

NEWS
config/AppleVolumes.default.tmpl
etc/afpd/volume.c

diff --git a/NEWS b/NEWS
index 809ce8fa2643b6956a231885a31a1ac5a30ee72d..cda4e302a765c0677354d91e3d89cf8eda9bdc7e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -14,8 +14,14 @@ Changes in 2.1
        will be able to upgrade the CNID databases.
 * NEW: AppleDouble compatible UNIX files utility suite `ad ...`.
        With 2.1 only `ad ls`.
+* NEW: afpd: AFP 3.2 support
 * NEW: afpd: ACL support with ZFS
 * NEW: afpd: ExtendedAttributes support with ZFS
+* NEW: afpd: store and read CNIDs to/from AppleDouble files by default.
+       This is used as a cache and as a backup in case the database
+       is deleted or corrupted. It can be disabled with a new volume
+       option "nocnidcache".
+       
 
 Changes in 2.0.x
 ================
index 95a3b7325a252ab2811d683dbc0d206507cdf069..74a5c35016b1ab7676c807704cfd27c525845999 100644 (file)
 #                        compatible filesystem (e.g. ZFS) and an ACL API
 #                        compatible to *Solaris. In other words: this requires
 #                        Solaris, Opensolaris or a derived distribution.
+# nocnidcache         -> Don't store and read CNID to/from AppleDouble file.
+#                        This should not be used as it also prevents a CNID
+#                        database rebuild with `dbd`!
 
 # dbpath:path         -> store the database stuff in the following path.
 # password:password   -> set a volume password (8 characters max)
index 346c9a9864dcb1a7cec2572f2fdf8cd64b853a69..04f53f75dd9c4695bb6e116f622e3178e0827bc5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: volume.c,v 1.88 2009-07-20 23:23:02 didg Exp $
+ * $Id: volume.c,v 1.89 2009-09-04 07:59:50 franklahm Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -180,7 +180,7 @@ static const _vol_opt_name vol_opt_names[] = {
     {AFPVOL_NODEV,      "NODEV"},       /* always use 0 for device number in cnid calls */
     {AFPVOL_CASEINSEN,  "CASEINSENSITIVE"}, /* volume is case insensitive */
     {AFPVOL_EILSEQ,     "ILLEGALSEQ"},     /* encode illegal sequence */
-    {AFPVOL_CACHE,      "CACHEID"},     /* Use adouble v2 CNID caching, default don't use it */
+    {AFPVOL_CACHE,      "CACHEID"},     /* Use adouble v2 CNID caching. Default: yes */
     {AFPVOL_EXT_ATTRS,  "EXT_ATTRS"},   /* Vol supports Extened Attributes */
     {AFPVOL_ACLS,       "ACLS"},        /* Vol supports ACLs */
     {0, NULL}
@@ -500,8 +500,8 @@ static void volset(struct vol_option *options, struct vol_option *save,
                 options[VOLOPT_FLAGS].i_value |= AFPVOL_CASEINSEN;
             else if (strcasecmp(p, "illegalseq") == 0)
                 options[VOLOPT_FLAGS].i_value |= AFPVOL_EILSEQ;
-            else if (strcasecmp(p, "cachecnid") == 0)
-                options[VOLOPT_FLAGS].i_value |= AFPVOL_CACHE;
+            else if (strcasecmp(p, "nocnidcache") == 0)
+                options[VOLOPT_FLAGS].i_value &= ~AFPVOL_CACHE;
 
             p = strtok(NULL, ",");
         }
@@ -1094,6 +1094,10 @@ struct passwd *pwent;
     }
 
     memset(save_options, 0, sizeof(save_options));
+
+    /* Enable some default options for all volumes */
+    save_options[VOLOPT_FLAGS].i_value |= AFPVOL_CACHE;
+
     while ( myfgets( buf, sizeof( buf ), fp ) != NULL ) {
         initline( strlen( buf ), buf );
         parseline( sizeof( path ) - 1, path );