]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - include/linux/lockd/lockd.h
[PATCH] knfsd: lockd: make nlm_traverse_* more flexible
[karo-tx-linux.git] / include / linux / lockd / lockd.h
index 777a91e1ac8f107147711db46e8ae815887bf1e3..8c1145669d06cb9ead394d4b3c6bc8a30265b09e 100644 (file)
@@ -133,13 +133,6 @@ struct nlm_block {
        struct nlm_file *       b_file;         /* file in question */
 };
 
-/*
- * Valid actions for nlmsvc_traverse_files
- */
-#define NLM_ACT_CHECK          0               /* check for locks */
-#define NLM_ACT_MARK           1               /* mark & sweep */
-#define NLM_ACT_UNLOCK         2               /* release all locks */
-
 /*
  * Global variables
  */
@@ -182,6 +175,12 @@ struct nsm_handle *nsm_find(const struct sockaddr_in *, const char *, int);
 void             nsm_release(struct nsm_handle *);
 
 
+/*
+ * This is used in garbage collection and resource reclaim
+ * A return value != 0 means destroy the lock/block/share
+ */
+typedef int      (*nlm_host_match_fn_t)(struct nlm_host *cur, struct nlm_host *ref);
+
 /*
  * Server-side lock handling
  */
@@ -193,7 +192,7 @@ u32           nlmsvc_testlock(struct nlm_file *, struct nlm_lock *,
 u32              nlmsvc_cancel_blocked(struct nlm_file *, struct nlm_lock *);
 unsigned long    nlmsvc_retry_blocked(void);
 void             nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *,
-                                       int action);
+                                       nlm_host_match_fn_t match);
 void     nlmsvc_grant_reply(struct svc_rqst *, struct nlm_cookie *, u32);
 
 /*