]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Remove warning if neither 'sync' or 'async' present.
authorNeil Brown <neilb@suse.de>
Mon, 7 Aug 2006 04:19:32 +0000 (14:19 +1000)
committerNeil Brown <neilb@suse.de>
Mon, 7 Aug 2006 04:19:32 +0000 (14:19 +1000)
Add warning of neither 'subtree_check' or 'no_subtree_check' present.

ChangeLog
support/nfs/exports.c
utils/exportfs/exports.man

index 2ea2184d98c396f18a5f5d2166216076cce00e13..364ec0f85477aac9ce5947f59fa8e6247a427499 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Author: NeilBrown <neilb@cse.unsw.edu.au>
+Date:  Mon Aug  7 14:01:35 EST 2006
+
+    Remove warning if neither 'sync' or 'async' present.
+    Add warning of neither 'subtree_check' or 'no_subtree_check' present.
+       
 commit 7194d7d6320736c14f40d31c3738d40f3119ead5
 Author: Kevin Coffman <kwc@citi.umich.edu>
 Date:   Sat Jul 8 10:01:40 2006 +1000
 commit 7194d7d6320736c14f40d31c3738d40f3119ead5
 Author: Kevin Coffman <kwc@citi.umich.edu>
 Date:   Sat Jul 8 10:01:40 2006 +1000
index e6de71aebfbce484e4c5aae3bf99b87c979408ea..2d3178171c2ae729f8ad4e967e3f51e3e8d5e26c 100644 (file)
@@ -312,7 +312,7 @@ updateexportent(struct exportent *eep, char *options)
 static int
 parseopts(char *cp, struct exportent *ep, int warn)
 {
 static int
 parseopts(char *cp, struct exportent *ep, int warn)
 {
-       int     had_sync_opt = 0;
+       int     had_subtree_opt = 0;
        char    *flname = efname?efname:"command line";
        int     flline = efp?efp->x_line:0;
 
        char    *flname = efname?efname:"command line";
        int     flline = efp?efp->x_line:0;
 
@@ -344,13 +344,11 @@ parseopts(char *cp, struct exportent *ep, int warn)
                        ep->e_flags &= ~NFSEXP_INSECURE_PORT;
                else if (!strcmp(opt, "insecure"))
                        ep->e_flags |= NFSEXP_INSECURE_PORT;
                        ep->e_flags &= ~NFSEXP_INSECURE_PORT;
                else if (!strcmp(opt, "insecure"))
                        ep->e_flags |= NFSEXP_INSECURE_PORT;
-               else if (!strcmp(opt, "sync")) {
-                       had_sync_opt = 1;
+               else if (!strcmp(opt, "sync"))
                        ep->e_flags &= ~NFSEXP_ASYNC;
                        ep->e_flags &= ~NFSEXP_ASYNC;
-               } else if (!strcmp(opt, "async")) {
-                       had_sync_opt = 1;
+               else if (!strcmp(opt, "async"))
                        ep->e_flags |= NFSEXP_ASYNC;
                        ep->e_flags |= NFSEXP_ASYNC;
-               else if (!strcmp(opt, "nohide"))
+               else if (!strcmp(opt, "nohide"))
                        ep->e_flags |= NFSEXP_NOHIDE;
                else if (!strcmp(opt, "hide"))
                        ep->e_flags &= ~NFSEXP_NOHIDE;
                        ep->e_flags |= NFSEXP_NOHIDE;
                else if (!strcmp(opt, "hide"))
                        ep->e_flags &= ~NFSEXP_NOHIDE;
@@ -370,11 +368,13 @@ parseopts(char *cp, struct exportent *ep, int warn)
                        ep->e_flags |= NFSEXP_ALLSQUASH;
                else if (strcmp(opt, "no_all_squash") == 0)
                        ep->e_flags &= ~NFSEXP_ALLSQUASH;
                        ep->e_flags |= NFSEXP_ALLSQUASH;
                else if (strcmp(opt, "no_all_squash") == 0)
                        ep->e_flags &= ~NFSEXP_ALLSQUASH;
-               else if (strcmp(opt, "subtree_check") == 0)
+               else if (strcmp(opt, "subtree_check") == 0) {
+                       had_subtree_opt = 1;
                        ep->e_flags &= ~NFSEXP_NOSUBTREECHECK;
                        ep->e_flags &= ~NFSEXP_NOSUBTREECHECK;
-               else if (strcmp(opt, "no_subtree_check") == 0)
+               } else if (strcmp(opt, "no_subtree_check") == 0) {
+                       had_subtree_opt = 1;
                        ep->e_flags |= NFSEXP_NOSUBTREECHECK;
                        ep->e_flags |= NFSEXP_NOSUBTREECHECK;
-               else if (strcmp(opt, "auth_nlm") == 0)
+               else if (strcmp(opt, "auth_nlm") == 0)
                        ep->e_flags &= ~NFSEXP_NOAUTHNLM;
                else if (strcmp(opt, "no_auth_nlm") == 0)
                        ep->e_flags |= NFSEXP_NOAUTHNLM;
                        ep->e_flags &= ~NFSEXP_NOAUTHNLM;
                else if (strcmp(opt, "no_auth_nlm") == 0)
                        ep->e_flags |= NFSEXP_NOAUTHNLM;
@@ -454,10 +454,10 @@ bad_option:
        ep->e_nsqgids = nsqgids;
 
 out:
        ep->e_nsqgids = nsqgids;
 
 out:
-       if (warn && !had_sync_opt && !(ep->e_flags & NFSEXP_READONLY))
-               xlog(L_WARNING, "%s [%d]: No 'sync' or 'async' option specified for export \"%s:%s\".\n"
-                               "  Assuming default behaviour ('sync').\n"
-                               "  NOTE: this default has changed from previous versions\n",
+       if (warn && !had_subtree_opt)
+               xlog(L_WARNING, "%s [%d]: Neither 'subtree_check' or 'no_subtree_check' specified for export \"%s:%s\".\n"
+                               "  Assuming default behaviour ('subtree_check').\n"
+                               "  NOTE: this default will change with nfs-utils version 1.1.0\n",
 
                                flname, flline,
                                ep->e_hostname, ep->e_path);
 
                                flname, flline,
                                ep->e_hostname, ep->e_path);
index 55bd36441f4a2dfbe3cadc6617ef2d8f07d98435..7aa60fc0b132d3e38992d5aca16a9201aa34709c 100644 (file)
@@ -117,7 +117,7 @@ storage (see
 above).
 
 In releases of nfs-utils upto and including 1.0.0, this option was the
 above).
 
 In releases of nfs-utils upto and including 1.0.0, this option was the
-default.  In this and future releases,
+default.  In all subsequence releases,
 .I sync
 is the default, and
 .I async
 .I sync
 is the default, and
 .I async
@@ -217,6 +217,16 @@ The default of having subtree checks enabled, can be explicitly
 requested with
 .IR subtree_check .
 
 requested with
 .IR subtree_check .
 
+From release 1.1.0 of nfs-utils onwards, the default will be
+.I no_subtree_check
+as subtree_checking tends to cause more problems than it is worth.
+If you genuinely require subtree checking, you should explicitly put
+that option in the
+.B exports
+file.  If you put neither option,
+.I exportfs
+will warn you that the change is pending.
+
 .TP
 .IR insecure_locks
 .TP
 .TP
 .IR insecure_locks
 .TP