]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
See Changelog
authorneilbrown <neilbrown>
Thu, 20 Dec 2001 02:03:26 +0000 (02:03 +0000)
committerneilbrown <neilbrown>
Thu, 20 Dec 2001 02:03:26 +0000 (02:03 +0000)
ChangeLog
support/export/client.c
support/export/export.c
support/export/xtab.c
support/include/nfslib.h
support/nfs/exports.c

index 468c09a1ff3df0d296ebd07f1d2e0449c354ca99..451a7838d80c7233998b5ce16a57569695f86e27 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2001-12-20  NeilBrown <neilb@cse.unsw.edu.au>
+
+       * support/export/client.c (client_lookup): use strcasecmp when
+       comparing host names
+       * support/nfs/export.c (getexportent): add fromkernel arg and use
+       different defaults as kernels prior to 2.4.11 assume different
+       defaults in /proc/fs/nfs/exports
+       * support/include/nfslib.h, support/export/export.c,
+       support/export/xtab.c:  support extra "fromkernel" arg for
+       getexportent. 
+       
 2001-12-13  Chip Salzenberg  <chip@pobox.com>
 
        * debian/changelog: Version 0.3.3-5.
index da3a976bf41bf7657c548faf31ee77f5350dabb2..03f791721774b5937642cf83d150a8c8442636f4 100644 (file)
@@ -70,7 +70,7 @@ client_lookup(char *hname, int canonical)
                }
        } else {
                for (clp = clientlist[htype]; clp; clp = clp->m_next) {
-                       if (strcmp(hname, clp->m_hostname)==0)
+                       if (strcasecmp(hname, clp->m_hostname)==0)
                                break;
                }
        }
index 4cfb44810146aa4d74af12d60c4b3ceaf8ebc708..f95e729e63ee7eeb402bf0310e663716c9f1b973 100644 (file)
@@ -32,7 +32,7 @@ export_read(char *fname)
        nfs_export              *exp;
 
        setexportent(fname, "r");
-       while ((eep = getexportent()) != NULL) {
+       while ((eep = getexportent(0)) != NULL) {
          exp = export_lookup(eep->e_hostname, eep->e_path, 0);
          if (!exp)
            export_create(eep,0);
index 54470c1cfeb60171d808b073dad71e1e09c9756b..4daef00e8be85ed0d613bee5849e6469614b90a5 100644 (file)
@@ -32,7 +32,7 @@ xtab_read(char *xtab, int is_export)
        if ((lockid = xflock(xtab, "r")) < 0)
                return 0;
        setexportent(xtab, "r");
-       while ((xp = getexportent()) != NULL) {
+       while ((xp = getexportent(is_export==0)) != NULL) {
                if (!(exp = export_lookup(xp->e_hostname, xp->e_path, is_export != 1)) &&
                    !(exp = export_create(xp, is_export!=1))) {
                        continue;
index 8736d49da9fbd89dd13c3bc0272bd6becaa2bc58..92eb900e186a11d2c707c54e76263caa41ad3cdb 100644 (file)
@@ -84,7 +84,7 @@ struct rmtabent {
  * configuration file parsing
  */
 void                   setexportent(char *fname, char *type);
-struct exportent *     getexportent(void);
+struct exportent *     getexportent(int);
 void                   putexportent(struct exportent *xep);
 void                   endexportent(void);
 struct exportent *     mkexportent(char *hname, char *path, char *opts);
index 0c252779048d36e9561c09444b76c834a8ba007d..7e0decf0b4d12cb77b868aff7eb4f7b7a48f2f15 100644 (file)
@@ -61,7 +61,7 @@ setexportent(char *fname, char *type)
 }
 
 struct exportent *
-getexportent(void)
+getexportent(int fromkernel)
 {
        static struct exportent ee;
        char            exp[512];
@@ -74,6 +74,15 @@ getexportent(void)
 
        freesquash();
        ee.e_flags = EXPORT_DEFAULT_FLAGS;
+       /* some kernels assume the default is sync rather than
+        * async.  More recent kernels always report one or other,
+        * but this test makes sure we assume same as kernel
+        * Ditto for wgather
+        */
+       if (fromkernel) {
+               ee.e_flags &= ~NFSEXP_ASYNC;
+               ee.e_flags &= ~NFSEXP_GATHERED_WRITES;
+       }
        ee.e_maptype = CLE_MAP_IDENT;
        ee.e_anonuid = -2;
        ee.e_anongid = -2;