Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 153430 Details for
Bug 236823
exportfs gives inconsistent results when run immediately after nfs service is restarted
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch -- make auth_reload take sub-second timestamps into account
nfs-utils-1.0.12-authreload-usec.patch (text/plain), 3.88 KB, created by
Jeff Layton
on 2007-04-25 17:20:05 UTC
(
hide
)
Description:
patch -- make auth_reload take sub-second timestamps into account
Filename:
MIME Type:
Creator:
Jeff Layton
Created:
2007-04-25 17:20:05 UTC
Size:
3.88 KB
patch
obsolete
>diff --git a/utils/mountd/auth.c b/utils/mountd/auth.c >index 183c9ea..54e7516 100644 >--- a/utils/mountd/auth.c >+++ b/utils/mountd/auth.c >@@ -42,28 +42,34 @@ auth_init(char *exports) > { > > export_file = exports; >- auth_reload(); >+ auth_reload(NULL); > xtab_mount_write(); > } > >-time_t >-auth_reload() >+void >+auth_reload(struct timespec *ts) > { > struct stat stb; >- static time_t last_modified = 0; >+ static struct timespec last_modified; > > if (stat(_PATH_ETAB, &stb) < 0) > xlog(L_FATAL, "couldn't stat %s", _PATH_ETAB); >- if (stb.st_mtime == last_modified) >- return last_modified; >- last_modified = stb.st_mtime; >+ if (stb.st_mtim.tv_sec == last_modified.tv_sec && >+ stb.st_mtim.tv_nsec == last_modified.tv_nsec) >+ goto out; > >+ last_modified.tv_sec = stb.st_mtim.tv_sec; >+ last_modified.tv_nsec = stb.st_mtim.tv_nsec; > export_freeall(); > memset(&my_client, 0, sizeof(my_client)); > // export_read(export_file); > xtab_export_read(); >- >- return last_modified; >+out: >+ if (ts) { >+ ts->tv_sec = stb.st_mtim.tv_sec; >+ ts->tv_nsec = stb.st_mtim.tv_nsec; >+ } >+ return; > } > > static nfs_export * >diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c >index d068843..77c559f 100644 >--- a/utils/mountd/cache.c >+++ b/utils/mountd/cache.c >@@ -90,7 +90,7 @@ void auth_unix_ip(FILE *f) > if (inet_aton(ipaddr, &addr)==0) > return; > >- auth_reload(); >+ auth_reload(NULL); > > /* addr is a valid, interesting address, find the domain name... */ > client = client_compose(addr); >@@ -354,7 +354,7 @@ void nfsd_fh(FILE *f) > break; > } > >- auth_reload(); >+ auth_reload(NULL); > > /* Now determine export point for this fsid/domain */ > for (i=0 ; i < MCL_MAXTYPES; i++) { >@@ -575,7 +575,7 @@ void nfsd_export(FILE *f) > if (qword_get(&cp, path, strlen(lbuf)) <= 0) > goto out; > >- auth_reload(); >+ auth_reload(NULL); > > /* now find flags for this export point in this domain */ > for (i=0 ; i < MCL_MAXTYPES; i++) { >diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c >index 04141d1..96d25a1 100644 >--- a/utils/mountd/mountd.c >+++ b/utils/mountd/mountd.c >@@ -241,7 +241,7 @@ bool_t > mount_umntall_1_svc(struct svc_req *rqstp, void *argp, void *resp) > { > /* Reload /etc/xtab if necessary */ >- auth_reload(); >+ auth_reload(NULL); > > mountlist_del_all((struct sockaddr_in *) svc_getcaller(rqstp->rq_xprt)); > return 1; >@@ -299,7 +299,7 @@ mount_pathconf_2_svc(struct svc_req *rqstp, dirpath *path, ppathcnf *res) > p = "/"; > > /* Reload /etc/xtab if necessary */ >- auth_reload(); >+ auth_reload(NULL); > > /* Resolve symlinks */ > if (realpath(p, rpath) != NULL) { >@@ -373,7 +373,7 @@ get_rootfh(struct svc_req *rqstp, dirpath *path, mountstat3 *error, int v3) > p = "/"; > > /* Reload /var/lib/nfs/etab if necessary */ >- auth_reload(); >+ auth_reload(NULL); > > /* Resolve symlinks */ > if (realpath(p, rpath) != NULL) { >@@ -465,18 +465,20 @@ static exports > get_exportlist(void) > { > static exports elist = NULL; >- static time_t etime = 0; >- time_t atime; >+ static struct timespec etime; >+ struct timespec atime; > struct exportnode *e, *ne; > struct groupnode *g, *ng, *c, **cp; > nfs_export *exp; > int i; > >- atime = auth_reload(); >- if (elist && atime == etime) >+ auth_reload(&atime); >+ if (elist && atime.tv_sec == etime.tv_sec && >+ atime.tv_nsec == etime.tv_nsec) > return elist; > >- etime = atime; >+ etime.tv_sec = atime.tv_sec; >+ etime.tv_nsec = atime.tv_nsec; > > for (e = elist; e != NULL; e = ne) { > ne = e->ex_next; >diff --git a/utils/mountd/mountd.h b/utils/mountd/mountd.h >index b539278..58694d9 100644 >--- a/utils/mountd/mountd.h >+++ b/utils/mountd/mountd.h >@@ -40,7 +40,7 @@ bool_t mount_mnt_3_svc(struct svc_req *, dirpath *, mountres3 *); > > void mount_dispatch(struct svc_req *, SVCXPRT *); > void auth_init(char *export_file); >-time_t auth_reload(void); >+void auth_reload(struct timespec *ts); > nfs_export * auth_authenticate(char *what, struct sockaddr_in *sin, > char *path); > void auth_export(nfs_export *exp);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 236823
:
153430
|
153433
|
153538
|
154024