All of lore.kernel.org
 help / color / mirror / Atom feed
* Make sm-notify faster if there are no servers to notify
@ 2008-10-29  0:13 Phil Endecott
       [not found] ` <1225239200402-YnoLgZYwwYuCbKHnblo0pmrPP3OPMK55cpQHUIT47Ck@public.gmane.org>
  0 siblings, 1 reply; 29+ messages in thread
From: Phil Endecott @ 2008-10-29  0:13 UTC (permalink / raw)
  To: linux-nfs

Dear Experts,

sm-notify was taking a long time while my laptop booted.  This was odd because I 
use NFS only rarely - via autofs - on that machine, and sm-notify actually has 
no-one to notify most of the time.  So I have patched it as follows.  Is this a 
legitimate thing to do?


diff -ur nfs-utils-1.1.3.orig/utils/statd/sm-notify.c nfs-utils-1.1.3/utils/statd/sm-notify.c
--- nfs-utils-1.1.3.orig/utils/statd/sm-notify.c	2008-07-27 22:01:45.000000000 +0100
+++ nfs-utils-1.1.3/utils/statd/sm-notify.c	2008-10-13 19:02:54.000000000 +0100
@@ -169,6 +169,10 @@
 	backup_hosts(_SM_DIR_PATH, _SM_BAK_PATH);
 	get_hosts(_SM_BAK_PATH);
 
+	if (!hosts) {
+		return 0;
+	}
+
 	/* Get and update the NSM state. This will call sync() */
 	nsm_state = nsm_get_state(opt_update_state);
 	set_kernel_nsm_state(nsm_state);



Regards,  Phil.
(Please Cc: me in any replies.)


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

end of thread, other threads:[~2008-12-11 22:45 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-29  0:13 Make sm-notify faster if there are no servers to notify Phil Endecott
     [not found] ` <1225239200402-YnoLgZYwwYuCbKHnblo0pmrPP3OPMK55cpQHUIT47Ck@public.gmane.org>
2008-10-29 17:18   ` J. Bruce Fields
2008-10-29 17:30     ` Phil Endecott
     [not found]       ` <1225301403729-YnoLgZYwwYuCbKHnblo0pmrPP3OPMK55cpQHUIT47Ck@public.gmane.org>
2008-10-29 17:37         ` J. Bruce Fields
2008-10-29 17:45           ` Phil Endecott
     [not found]             ` <1225302305994-YnoLgZYwwYuCbKHnblo0pmrPP3OPMK55cpQHUIT47Ck@public.gmane.org>
2008-10-29 18:41               ` J. Bruce Fields
2008-10-29 20:30                 ` Chuck Lever
2008-10-29 21:11                   ` J. Bruce Fields
2008-11-09 19:25                     ` J. Bruce Fields
2008-11-10  0:52                       ` Chuck Lever
2008-11-10  0:55                         ` J. Bruce Fields
2008-11-10  1:00                           ` Chuck Lever
2008-11-10  9:40                         ` Phil Endecott
2008-11-10 13:41                     ` Steve Dickson
     [not found]                       ` <49183A12.7010707-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2008-12-04 21:10                         ` J. Bruce Fields
2008-12-05  3:34                           ` Neil Brown
     [not found]                             ` <18744.41310.635618.148281-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2008-12-05  3:58                               ` J. Bruce Fields
2008-12-05 13:26                                 ` Steve Dickson
     [not found]                                   ` <49392C14.7000709-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2008-12-05 16:38                                     ` J. Bruce Fields
2008-12-05 17:29                                       ` J. Bruce Fields
2008-12-05 18:41                                         ` Chuck Lever
2008-12-06  2:42                                           ` J. Bruce Fields
2008-12-08 19:50                                             ` Chuck Lever
2008-12-11 22:44                                               ` J. Bruce Fields
2008-12-05 19:12                                         ` Steve Dickson
     [not found]                                           ` <49397D1B.3000701-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2008-12-06  2:49                                             ` J. Bruce Fields
2008-12-05 18:42                                       ` Steve Dickson
     [not found]                                         ` <4939760A.9050304-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2008-12-06  3:08                                           ` J. Bruce Fields
2008-10-31 17:52           ` 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.