NLM: Move the public declaration of nsm_monitor() to lockd.h
Clean up. Make the nlm_host argument "const," and move the public declaration to lockd.h with other NSM public function (nsm_release, eg) and global variable declarations. Add a documenting comment. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
This commit is contained in:
parent
5d254b1198
commit
1e49323c4a
|
@ -69,11 +69,18 @@ nsm_mon_unmon(struct nsm_handle *nsm, u32 proc, struct nsm_res *res)
|
||||||
return status;
|
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
|
int nsm_monitor(const struct nlm_host *host)
|
||||||
nsm_monitor(struct nlm_host *host)
|
|
||||||
{
|
{
|
||||||
struct nsm_handle *nsm = host->h_nsmhandle;
|
struct nsm_handle *nsm = host->h_nsmhandle;
|
||||||
struct nsm_res res;
|
struct nsm_res res;
|
||||||
|
|
|
@ -242,6 +242,10 @@ extern void nlm_host_rebooted(const struct sockaddr_in *, const char *,
|
||||||
unsigned int, u32);
|
unsigned int, u32);
|
||||||
void nsm_release(struct nsm_handle *);
|
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
|
* This is used in garbage collection and resource reclaim
|
||||||
|
|
|
@ -41,7 +41,6 @@ struct nsm_res {
|
||||||
u32 state;
|
u32 state;
|
||||||
};
|
};
|
||||||
|
|
||||||
int nsm_monitor(struct nlm_host *);
|
|
||||||
int nsm_unmonitor(struct nlm_host *);
|
int nsm_unmonitor(struct nlm_host *);
|
||||||
extern int nsm_local_state;
|
extern int nsm_local_state;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue