diff options
author | Jeff Layton <jlayton@redhat.com> | 2006-12-18 15:43:56 -0500 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2006-12-19 09:27:09 +1100 |
commit | 9e1aa7b9a04776bd43eb75bef50a53f41e17b813 (patch) | |
tree | 3abfe264ed7cb773231b354ea316f8e17c68dea3 /utils/mountd/cache.c | |
parent | 865a1070166deac80930229cd97bb7f99482a340 (diff) | |
download | nfs-utils-9e1aa7b9a04776bd43eb75bef50a53f41e17b813.tar.gz nfs-utils-9e1aa7b9a04776bd43eb75bef50a53f41e17b813.tar.xz nfs-utils-9e1aa7b9a04776bd43eb75bef50a53f41e17b813.zip |
remove extraneous mountlist_add/del calls and change remaining ones to use IP addresses
Neil suggested a patch to change the mountlist_add and mountlist_del calls to
use IP addresses instead of the names returned by client_compose based on a
command line option flag.
I don't see any real reason to put client_compose strings into the rmtab, so
this patch makes it so that it adds IP addresses instead of those strings to
the rmtab by default.
It also removes all mountlist_add calls that are being done from kernel cache
routines. My main concern there is NFSv4. We don't seem to make any upcalls to
mountd on NFSv4 unmounts, and I don't see a way to reliably remove NFSv4
entries. So, I figured I'd stick with having mountlist_add only called when
a v2 or v3 mount call is made, and mountlist_del called only on the
corresponding unmount call.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'utils/mountd/cache.c')
-rw-r--r-- | utils/mountd/cache.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c index c57d3b0..726b98f 100644 --- a/utils/mountd/cache.c +++ b/utils/mountd/cache.c @@ -83,9 +83,6 @@ void auth_unix_ip(FILE *f) qword_print(f, *client?client:"DEFAULT"); qword_eol(f); - if (client && strcmp(ipaddr, client)) - mountlist_add(ipaddr, *client?client:"DEFAULT"); - if (client) free(client); } @@ -295,7 +292,6 @@ void nfsd_export(FILE *f) qword_printint(f, found->m_export.e_anonuid); qword_printint(f, found->m_export.e_anongid); qword_printint(f, found->m_export.e_fsid); - mountlist_add(dom, path); } qword_eol(f); out: @@ -373,8 +369,6 @@ void cache_export_ent(char *domain, struct exportent *exp) qword_eol(f); fclose(f); - - mountlist_add(domain, exp->e_path); } void cache_export(nfs_export *exp) @@ -393,9 +387,6 @@ void cache_export(nfs_export *exp) fclose(f); - if (strcmp(inet_ntoa(exp->m_client->m_addrlist[0]), exp->m_client->m_hostname)) - mountlist_add(inet_ntoa(exp->m_client->m_addrlist[0]), exp->m_client->m_hostname); - cache_export_ent(exp->m_client->m_hostname, &exp->m_export); } |