From 736330f2a0d4ebc12b4b47ca696916d76f292686 Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Thu, 4 Dec 2008 14:21:24 -0500 Subject: [PATCH] --- yaml --- r: 127451 b: refs/heads/master c: 1e49323c4ab044d05bbc68cf13cadcbd4372468c h: refs/heads/master i: 127449: ad33cc2cb797afcf7443bea22be6035c4e53f405 127447: 88b4455af1a64684501b23d78a98d402ec872dfd v: v3 --- [refs] | 2 +- trunk/fs/lockd/mon.c | 15 +++++++++++---- trunk/include/linux/lockd/lockd.h | 4 ++++ trunk/include/linux/lockd/sm_inter.h | 1 - 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index b273bfc28a6c..170dd2bfd421 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5d254b119823658cc318f88589c6c426b3d0a153 +refs/heads/master: 1e49323c4ab044d05bbc68cf13cadcbd4372468c diff --git a/trunk/fs/lockd/mon.c b/trunk/fs/lockd/mon.c index 07e16b81498d..aaaa08e7ae7a 100644 --- a/trunk/fs/lockd/mon.c +++ b/trunk/fs/lockd/mon.c @@ -69,11 +69,18 @@ nsm_mon_unmon(struct nsm_handle *nsm, u32 proc, struct nsm_res *res) return status; } -/* - * Set up monitoring of a remote host +/** + * nsm_monitor - Notify a peer in case we reboot + * @host: pointer to nlm_host of peer to notify + * + * If this peer is not already monitored, this function sends an + * upcall to the local rpc.statd to record the name/address of + * the peer to notify in case we reboot. + * + * Returns zero if the peer is monitored by the local rpc.statd; + * otherwise a negative errno value is returned. */ -int -nsm_monitor(struct nlm_host *host) +int nsm_monitor(const struct nlm_host *host) { struct nsm_handle *nsm = host->h_nsmhandle; struct nsm_res res; diff --git a/trunk/include/linux/lockd/lockd.h b/trunk/include/linux/lockd/lockd.h index d3c7247d23e8..f15a4f5ccbfb 100644 --- a/trunk/include/linux/lockd/lockd.h +++ b/trunk/include/linux/lockd/lockd.h @@ -242,6 +242,10 @@ extern void nlm_host_rebooted(const struct sockaddr_in *, const char *, unsigned int, u32); void nsm_release(struct nsm_handle *); +/* + * Host monitoring + */ +int nsm_monitor(const struct nlm_host *host); /* * This is used in garbage collection and resource reclaim diff --git a/trunk/include/linux/lockd/sm_inter.h b/trunk/include/linux/lockd/sm_inter.h index 5a5448bdb17d..546b6102b0d7 100644 --- a/trunk/include/linux/lockd/sm_inter.h +++ b/trunk/include/linux/lockd/sm_inter.h @@ -41,7 +41,6 @@ struct nsm_res { u32 state; }; -int nsm_monitor(struct nlm_host *); int nsm_unmonitor(struct nlm_host *); extern int nsm_local_state;