From: neilbrown Date: Tue, 24 Jun 2003 06:51:59 +0000 (+0000) Subject: fix unexpiring X-Git-Tag: nfs-utils-1-1-0-pre6^0 X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=commitdiff_plain;h=182d7d59b5a9fdd43e74053ba779306eb7606b34 fix unexpiring --- diff --git a/ChangeLog b/ChangeLog index 9be3e99..7c22de7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-06-24 NeilBrown + + * 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" * utils/mountd/cache.c(nfsd_fh): don't export the export_ent diff --git a/support/nfs/nfsexport.c b/support/nfs/nfsexport.c index 97de651..0e8b52b 100644 --- a/support/nfs/nfsexport.c +++ b/support/nfs/nfsexport.c @@ -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;