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 144845 Details for
Bug 221515
Idmapd should flush the server id<->name caches when its started.
[?]
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]
upstream patch
nfs-utils-1.0.7-pre2-02-idmapd_flush_cache.dif (text/plain), 1.69 KB, created by
Steve Dickson
on 2007-01-04 21:17:59 UTC
(
hide
)
Description:
upstream patch
Filename:
MIME Type:
Creator:
Steve Dickson
Created:
2007-01-04 21:17:59 UTC
Size:
1.69 KB
patch
obsolete
> > >Idmapd should flush the server id<->name caches when its started. > >--- > > nfs-utils-1.0.7-pre2-bfields/utils/idmapd/idmapd.c | 37 ++++++++++++++++++++- > 1 files changed, 36 insertions(+), 1 deletion(-) > >diff -puN utils/idmapd/idmapd.conf~idmapd_flush_cache utils/idmapd/idmapd.conf >diff -puN utils/idmapd/idmapd.c~idmapd_flush_cache utils/idmapd/idmapd.c >--- nfs-utils-1.0.7-pre2/utils/idmapd/idmapd.c~idmapd_flush_cache 2004-12-13 17:10:09.000000000 -0500 >+++ nfs-utils-1.0.7-pre2-bfields/utils/idmapd/idmapd.c 2004-12-13 17:11:39.000000000 -0500 >@@ -141,6 +141,34 @@ static struct idmap_client nfsd_ic[2]; > /* Used by cfg.c */ > char *conf_path; > >+static int >+flush_nfsd_cache(char *path, time_t now) >+{ >+ int fd; >+ char stime[20]; >+ >+ sprintf(stime, "%ld\n", now); >+ fd = open(path, O_RDWR); >+ if (fd == -1) >+ return -1; >+ write(fd, stime, strlen(stime)); >+ close(fd); >+ return 0; >+} >+ >+static int >+flush_nfsd_idmap_cache(void) >+{ >+ time_t now = time(NULL); >+ int ret; >+ >+ ret = flush_nfsd_cache("/proc/net/rpc/nfs4.idtoname/flush", now); >+ if (ret) >+ return ret; >+ ret = flush_nfsd_cache("/proc/net/rpc/nfs4.nametoid/flush", now); >+ return ret; >+} >+ > int > main(int argc, char **argv) > { >@@ -153,6 +181,7 @@ main(int argc, char **argv) > struct stat sb; > char *xpipefsdir = NULL; > int serverstart = 1, clientstart = 1; >+ int ret; > > conf_path = _PATH_IDMAPDCONF; > nobodyuser = NFS4NOBODY_USER; >@@ -230,8 +259,14 @@ main(int argc, char **argv) > > event_init(); > >- if (serverstart) >+ if (serverstart) { > nfsdret = nfsdopen(NFSD_DIR); >+ if (nfsdret == 0) { >+ ret = flush_nfsd_idmap_cache(); >+ if (ret) >+ errx(1, "Failed to flush nfsd idmap cache\n"); >+ } >+ } > > if (clientstart) { > struct timeval now = { >_
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 221515
: 144845