aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/lockd/lockd.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2008-12-05 19:02:45 -0500
committerJ. Bruce Fields <bfields@citi.umich.edu>2009-01-06 11:53:53 -0500
commit67c6d107a689243979a2b5f15244b5261634a924 (patch)
tree36e2093df96a449c284640c9cc329fc251e98bd0 /include/linux/lockd/lockd.h
parent03eb1dcbb799304b58730f4dba65812f49fb305e (diff)
NSM: Move nsm_find() to fs/lockd/mon.c
The nsm_find() function sets up fresh nsm_handle entries. This is where we will store the "priv" cookie used to lookup nsm_handles during reboot recovery. The cookie will be constructed when nsm_find() creates a new nsm_handle. As much as possible, I would like to keep everything that handles a "priv" cookie in fs/lockd/mon.c so that all the smarts are in one source file. That organization should make it pretty simple to see how all this works. To me, it makes more sense than the current arrangement to keep nsm_find() with nsm_monitor() and nsm_unmonitor(). So, start reorganizing by moving nsm_find() into fs/lockd/mon.c. The nsm_release() function comes along too, since it shares the nsm_lock global variable. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'include/linux/lockd/lockd.h')
-rw-r--r--include/linux/lockd/lockd.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
index 38344bfb814a..8d715363c6ac 100644
--- a/include/linux/lockd/lockd.h
+++ b/include/linux/lockd/lockd.h
@@ -247,6 +247,12 @@ extern void nlm_host_rebooted(const struct sockaddr_in *, const char *,
247int nsm_monitor(const struct nlm_host *host); 247int nsm_monitor(const struct nlm_host *host);
248void nsm_unmonitor(const struct nlm_host *host); 248void nsm_unmonitor(const struct nlm_host *host);
249 249
250struct nsm_handle *nsm_find(const struct sockaddr *sap, const size_t salen,
251 const char *hostname,
252 const size_t hostname_len,
253 const int create);
254void nsm_release(struct nsm_handle *nsm);
255
250/* 256/*
251 * This is used in garbage collection and resource reclaim 257 * This is used in garbage collection and resource reclaim
252 * A return value != 0 means destroy the lock/block/share 258 * A return value != 0 means destroy the lock/block/share