diff options
author | Alex Shi <alex.shi@linaro.org> | 2017-03-20 12:02:33 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2017-03-20 12:02:33 +0800 |
commit | 156f7b56ee4b918b95991750e0f34da8ad416eae (patch) | |
tree | fd47da260b3c78631721f36edf01b2878358283a /fs/ocfs2/dlmglue.c | |
parent | 2e2fb031287a5946d97b85769f80ca60f0166e15 (diff) | |
parent | d97f745e1d2fea4d2f308e5e06eee81a9a84f3f5 (diff) |
Merge branch 'linux-linaro-lsk-v4.1' into linux-linaro-lsk-v4.1-rtlsk-v4.1-17.06-rtlsk-v4.1-17.05-rtlsk-v4.1-17.03-rtlinux-linaro-lsk-v4.1-rt
Diffstat (limited to 'fs/ocfs2/dlmglue.c')
-rw-r--r-- | fs/ocfs2/dlmglue.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c index 3623ab6fa97f..4a4ac9386d4d 100644 --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c @@ -3322,6 +3322,16 @@ static int ocfs2_downconvert_lock(struct ocfs2_super *osb, mlog(ML_BASTS, "lockres %s, level %d => %d\n", lockres->l_name, lockres->l_level, new_level); + /* + * On DLM_LKF_VALBLK, fsdlm behaves differently with o2cb. It always + * expects DLM_LKF_VALBLK being set if the LKB has LVB, so that + * we can recover correctly from node failure. Otherwise, we may get + * invalid LVB in LKB, but without DLM_SBF_VALNOTVALID being set. + */ + if (!ocfs2_is_o2cb_active() && + lockres->l_ops->flags & LOCK_TYPE_USES_LVB) + lvb = 1; + if (lvb) dlm_flags |= DLM_LKF_VALBLK; |