|
@@ -119,6 +119,9 @@ struct nlm_file {
|
|
* couldn't be granted because of a conflicting lock).
|
|
* couldn't be granted because of a conflicting lock).
|
|
*/
|
|
*/
|
|
#define NLM_NEVER (~(unsigned long) 0)
|
|
#define NLM_NEVER (~(unsigned long) 0)
|
|
|
|
+/* timeout on non-blocking call: */
|
|
|
|
+#define NLM_TIMEOUT (7 * HZ)
|
|
|
|
+
|
|
struct nlm_block {
|
|
struct nlm_block {
|
|
struct kref b_count; /* Reference count */
|
|
struct kref b_count; /* Reference count */
|
|
struct list_head b_list; /* linked list of all blocks */
|
|
struct list_head b_list; /* linked list of all blocks */
|
|
@@ -130,6 +133,13 @@ struct nlm_block {
|
|
unsigned int b_id; /* block id */
|
|
unsigned int b_id; /* block id */
|
|
unsigned char b_granted; /* VFS granted lock */
|
|
unsigned char b_granted; /* VFS granted lock */
|
|
struct nlm_file * b_file; /* file in question */
|
|
struct nlm_file * b_file; /* file in question */
|
|
|
|
+ struct cache_req * b_cache_req; /* deferred request handling */
|
|
|
|
+ struct file_lock * b_fl; /* set for GETLK */
|
|
|
|
+ struct cache_deferred_req * b_deferred_req;
|
|
|
|
+ unsigned int b_flags; /* block flags */
|
|
|
|
+#define B_QUEUED 1 /* lock queued */
|
|
|
|
+#define B_GOT_CALLBACK 2 /* got lock or conflicting lock */
|
|
|
|
+#define B_TIMED_OUT 4 /* filesystem too slow to respond */
|
|
};
|
|
};
|
|
|
|
|
|
/*
|
|
/*
|