diff options
author | Benjamin Marzinski <bmarzins@redhat.com> | 2008-03-14 21:52:52 +0300 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2008-03-31 13:41:44 +0400 |
commit | 58e9fee13e579df44922172dbe3c9e3ba3edf7a3 (patch) | |
tree | 7b134f28032a3cd498b2d9a18c02ea085c0725e2 /include/linux/lm_interface.h | |
parent | f5a8cd020173c455705fc0095b7d299da6f8f87b (diff) | |
download | linux-58e9fee13e579df44922172dbe3c9e3ba3edf7a3.tar.xz |
[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/linux/lm_interface.h')
-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); * modify the filesystem. The lock module shouldn't assign a journal to the FS * mount. It shouldn't send recovery callbacks to the FS mount. If the node * dies or withdraws, all locks can be wiped immediately. + * + * LM_MFLAG_CONV_NODROP + * Do not allow the dlm to internally resolve conversion deadlocks by demoting + * the lock to unlocked and then reacquiring it in the requested mode. Instead, + * it should cancel the request and return LM_OUT_CONV_DEADLK. */ #define LM_MFLAG_SPECTATOR 0x00000001 +#define LM_MFLAG_CONV_NODROP 0x00000002 /* * lm_lockstruct flags @@ -110,6 +116,9 @@ typedef void (*lm_callback_t) (void *ptr, unsigned int type, void *data); * * LM_OUT_ASYNC * The result of the request will be returned in an LM_CB_ASYNC callback. + * + * LM_OUT_CONV_DEADLK + * The lock request was canceled do to a conversion deadlock. */ #define LM_OUT_ST_MASK 0x00000003 @@ -117,6 +126,7 @@ typedef void (*lm_callback_t) (void *ptr, unsigned int type, void *data); #define LM_OUT_CANCELED 0x00000008 #define LM_OUT_ASYNC 0x00000080 #define LM_OUT_ERROR 0x00000100 +#define LM_OUT_CONV_DEADLK 0x00000200 /* * lm_callback_t types |