]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
fix unexpiring nfs-utils-1-1-0-pre6
authorneilbrown <neilbrown>
Tue, 24 Jun 2003 06:51:59 +0000 (06:51 +0000)
committerneilbrown <neilbrown>
Tue, 24 Jun 2003 06:51:59 +0000 (06:51 +0000)
ChangeLog
support/nfs/nfsexport.c

index 9be3e99d898a828b00f1218ec4c31d9153a8c970..7c22de77ec10f8fdb7b4b4d5fe2ca68c0fdf6c99 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-06-24 NeilBrown <neilb@cse.unsw.edu.au>
+
+       * support/nfs/nfsexport.c(exp_unexp): When unexporting filesystems
+       via /rpc/net/rpc/nfsd*/channel, set the expiry date to 1, not
+       'forever', so things disappear out of the cache rather than just
+       be ignored. 
+       
 2003-06-16  "J. Bruce Fields" <bfields@fieldses.org>
 
        * utils/mountd/cache.c(nfsd_fh): don't export the export_ent
index 97de651ab080a1490cc2784ab0bd0874ee401a69..0e8b52b334ba3e69e8bd676c64c7f3d66827e51a 100644 (file)
@@ -42,13 +42,15 @@ exp_unexp(struct nfsctl_export *exp, int export)
        if (f == NULL) return -1;
        qword_print(f, exp->ex_client);
        qword_print(f, exp->ex_path);
-       qword_printint(f, 0x7fffffff);
        if (export) {
+               qword_printint(f, 0x7fffffff);
                qword_printint(f, exp->ex_flags);
                qword_printint(f, exp->ex_anon_uid);
                qword_printint(f, exp->ex_anon_gid);
                qword_printint(f, exp->ex_dev);
-       }
+       } else
+               qword_printint(f, 1);
+
        qword_eol(f);
        fclose(f);
 
@@ -61,9 +63,12 @@ exp_unexp(struct nfsctl_export *exp, int export)
                qword_printint(f,1);
                fsid = exp->ex_dev;
                qword_printhex(f, (char*)&fsid, 4);
-               qword_printint(f, 0x7fffffff);
-               if (export)
+               if (export) {
+                       qword_printint(f, 0x7fffffff);
                        qword_print(f, exp->ex_path);
+               } else
+                       qword_printint(f, 1);
+
                qword_eol(f);
        }
        qword_print(f,exp->ex_client);
@@ -73,9 +78,11 @@ exp_unexp(struct nfsctl_export *exp, int export)
        inode = stb.st_ino; memcpy(fsidstr+4, &inode, 4);
        
        qword_printhex(f, fsidstr, 8);
-       qword_printint(f, 0x7fffffff);
-       if (export)
+       if (export) {
+               qword_printint(f, 0x7fffffff);
                qword_print(f, exp->ex_path);
+       } else
+               qword_printint(f, 1);
        qword_eol(f);
        fclose(f);
        return 0;