All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nfs-utils: mountd: empty export list should not be treated as a failure
@ 2008-02-12  5:13 Harshula
       [not found] ` <1202793191.2890.36.camel-2WabGjdRN2LRvmHwrWB8BmjR7Gm6iKkz0E9HWUfgJXw@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Harshula @ 2008-02-12  5:13 UTC (permalink / raw)
  To: Steve Dickson; +Cc: NFS list

Hi Steve,

This patch is against:
git://git.linux-nfs.org/projects/steved/nfs-utils.git

In mountd, if get_exportlist() (utils/mountd/mountd.c) returns NULL it
should not be considered a failure. It just means that there are no
exports on the system.

The practical problem with the current code is that a showmount -e
results in a syslog message from mountd that looks like:

rpc.mountd: export request from 10.250.100.2 failed.


References: SGI: PV977213
Reviewed-by: Greg Banks <gnb@sgi.com>
Signed-off-by: Harshula Jayasuriya <harshula@sgi.com>
---

 utils/mountd/mountd.c |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

--- a/utils/mountd/mountd.c
+++ b/utils/mountd/mountd.c
@@ -254,10 +254,8 @@ mount_export_1_svc(struct svc_req *rqstp, void
*argp, exports *resp)
        struct sockaddr_in *addr =
                (struct sockaddr_in *) svc_getcaller(rqstp->rq_xprt);
 
-       if ((*resp = get_exportlist()) == NULL)
-               xlog(L_WARNING, "export request from %s failed.",
-                       inet_ntoa(addr->sin_addr));
-
+       xlog(D_CALL, "EXPORT1 request from %s.",
inet_ntoa(addr->sin_addr));
+       *resp = get_exportlist();
        return 1;
 }
 
@@ -267,9 +265,8 @@ mount_exportall_1_svc(struct svc_req *rqstp, void
*argp, exports *resp)
        struct sockaddr_in *addr =
                (struct sockaddr_in *) svc_getcaller(rqstp->rq_xprt);
 
-       if ((*resp = get_exportlist()) == NULL)
-               xlog(L_WARNING, "exportall request from %s failed.",
-                       inet_ntoa(addr->sin_addr));
+       xlog(D_CALL, "EXPORTALL1 request from %s.",
inet_ntoa(addr->sin_addr));
+       *resp = get_exportlist();
        return 1;
 }
 

cya,
#


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-02-22  3:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-12  5:13 [PATCH] nfs-utils: mountd: empty export list should not be treated as a failure Harshula
     [not found] ` <1202793191.2890.36.camel-2WabGjdRN2LRvmHwrWB8BmjR7Gm6iKkz0E9HWUfgJXw@public.gmane.org>
2008-02-12  8:33   ` nfs performance dropped when using 128 MB RAM Sagar Borikar
     [not found]     ` <340C71CD25A7EB49BFA81AE8C8392667013239CA-WnaG5mLaJUuZWFWj0wbTyA@public.gmane.org_nt.nt.pmc-sierra.bc.ca>
2008-02-12 18:25       ` J. Bruce Fields
2008-02-13  0:02         ` Sagar Borikar
2008-02-22  3:50       ` Sagar Borikar
2008-02-12 21:17   ` [PATCH] nfs-utils: mountd: empty export list should not be treated as a failure Steve Dickson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.