diff options
-rw-r--r-- | fs/ocfs2/dlm/dlmast.c | 12 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmconvert.c | 3 |
2 files changed, 10 insertions, 5 deletions
diff --git a/fs/ocfs2/dlm/dlmast.c b/fs/ocfs2/dlm/dlmast.c index 87ee29cad50b..42775e2bbe2c 100644 --- a/fs/ocfs2/dlm/dlmast.c +++ b/fs/ocfs2/dlm/dlmast.c | |||
@@ -197,12 +197,14 @@ static void dlm_update_lvb(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, | |||
197 | lock->ml.node == dlm->node_num ? "master" : | 197 | lock->ml.node == dlm->node_num ? "master" : |
198 | "remote"); | 198 | "remote"); |
199 | memcpy(lksb->lvb, res->lvb, DLM_LVB_LEN); | 199 | memcpy(lksb->lvb, res->lvb, DLM_LVB_LEN); |
200 | } else if (lksb->flags & DLM_LKSB_PUT_LVB) { | ||
201 | mlog(0, "setting lvb from lockres for %s node\n", | ||
202 | lock->ml.node == dlm->node_num ? "master" : | ||
203 | "remote"); | ||
204 | memcpy(res->lvb, lksb->lvb, DLM_LVB_LEN); | ||
205 | } | 200 | } |
201 | /* Do nothing for lvb put requests - they should be done in | ||
202 | * place when the lock is downconverted - otherwise we risk | ||
203 | * racing gets and puts which could result in old lvb data | ||
204 | * being propagated. We leave the put flag set and clear it | ||
205 | * here. In the future we might want to clear it at the time | ||
206 | * the put is actually done. | ||
207 | */ | ||
206 | spin_unlock(&res->spinlock); | 208 | spin_unlock(&res->spinlock); |
207 | } | 209 | } |
208 | 210 | ||
diff --git a/fs/ocfs2/dlm/dlmconvert.c b/fs/ocfs2/dlm/dlmconvert.c index 70888b31e751..90cbaaff33a7 100644 --- a/fs/ocfs2/dlm/dlmconvert.c +++ b/fs/ocfs2/dlm/dlmconvert.c | |||
@@ -214,6 +214,9 @@ grant: | |||
214 | if (lock->ml.node == dlm->node_num) | 214 | if (lock->ml.node == dlm->node_num) |
215 | mlog(0, "doing in-place convert for nonlocal lock\n"); | 215 | mlog(0, "doing in-place convert for nonlocal lock\n"); |
216 | lock->ml.type = type; | 216 | lock->ml.type = type; |
217 | if (lock->lksb->flags & DLM_LKSB_PUT_LVB) | ||
218 | memcpy(res->lvb, lock->lksb->lvb, DLM_LVB_LEN); | ||
219 | |||
217 | status = DLM_NORMAL; | 220 | status = DLM_NORMAL; |
218 | *call_ast = 1; | 221 | *call_ast = 1; |
219 | goto unlock_exit; | 222 | goto unlock_exit; |