diff options
author | Benjamin Marzinski <bmarzins@redhat.com> | 2008-03-14 14:52:52 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2008-03-31 05:41:44 -0400 |
commit | 58e9fee13e579df44922172dbe3c9e3ba3edf7a3 (patch) | |
tree | 7b134f28032a3cd498b2d9a18c02ea085c0725e2 /include | |
parent | f5a8cd020173c455705fc0095b7d299da6f8f87b (diff) |
[GFS2] Invalidate cache at correct point
GFS2 wasn't invalidating its cache before it called into the lock manager
with a request that could potentially drop a lock. This was leaving a
window where the lock could be actually be held by another node, but the
file's page cache would still appear valid, causing coherency problems.
This patch moves the cache invalidation to before the lock manager call
when dropping a lock. It also adds the option to the lock_dlm lock
manager to not use conversion mode deadlock avoidance, which, on a
conversion from shared to exclusive, could internally drop the lock, and
then reacquire in. GFS2 now asks lock_dlm to not do this. Instead, GFS2
manually drops the lock and reacquires it.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/lm_interface.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/lm_interface.h b/include/linux/lm_interface.h index 1418fdc9ac02..f274997bc283 100644 --- a/include/linux/lm_interface.h +++ b/include/linux/lm_interface.h | |||
@@ -21,9 +21,15 @@ typedef void (*lm_callback_t) (void *ptr, unsigned int type, void *data); | |||
21 | * modify the filesystem. The lock module shouldn't assign a journal to the FS | 21 | * modify the filesystem. The lock module shouldn't assign a journal to the FS |
22 | * mount. It shouldn't send recovery callbacks to the FS mount. If the node | 22 | * mount. It shouldn't send recovery callbacks to the FS mount. If the node |
23 | * dies or withdraws, all locks can be wiped immediately. | 23 | * dies or withdraws, all locks can be wiped immediately. |
24 | * | ||
25 | * LM_MFLAG_CONV_NODROP | ||
26 | * Do not allow the dlm to internally resolve conversion deadlocks by demoting | ||
27 | * the lock to unlocked and then reacquiring it in the requested mode. Instead, | ||
28 | * it should cancel the request and return LM_OUT_CONV_DEADLK. | ||
24 | */ | 29 | */ |
25 | 30 | ||
26 | #define LM_MFLAG_SPECTATOR 0x00000001 | 31 | #define LM_MFLAG_SPECTATOR 0x00000001 |
32 | #define LM_MFLAG_CONV_NODROP 0x00000002 | ||
27 | 33 | ||
28 | /* | 34 | /* |
29 | * lm_lockstruct flags | 35 | * lm_lockstruct flags |
@@ -110,6 +116,9 @@ typedef void (*lm_callback_t) (void *ptr, unsigned int type, void *data); | |||
110 | * | 116 | * |
111 | * LM_OUT_ASYNC | 117 | * LM_OUT_ASYNC |
112 | * The result of the request will be returned in an LM_CB_ASYNC callback. | 118 | * The result of the request will be returned in an LM_CB_ASYNC callback. |
119 | * | ||
120 | * LM_OUT_CONV_DEADLK | ||
121 | * The lock request was canceled do to a conversion deadlock. | ||
113 | */ | 122 | */ |
114 | 123 | ||
115 | #define LM_OUT_ST_MASK 0x00000003 | 124 | #define LM_OUT_ST_MASK 0x00000003 |
@@ -117,6 +126,7 @@ typedef void (*lm_callback_t) (void *ptr, unsigned int type, void *data); | |||
117 | #define LM_OUT_CANCELED 0x00000008 | 126 | #define LM_OUT_CANCELED 0x00000008 |
118 | #define LM_OUT_ASYNC 0x00000080 | 127 | #define LM_OUT_ASYNC 0x00000080 |
119 | #define LM_OUT_ERROR 0x00000100 | 128 | #define LM_OUT_ERROR 0x00000100 |
129 | #define LM_OUT_CONV_DEADLK 0x00000200 | ||
120 | 130 | ||
121 | /* | 131 | /* |
122 | * lm_callback_t types | 132 | * lm_callback_t types |