diff options
author | Alex Shi <alex.shi@linaro.org> | 2017-09-24 22:52:31 -0700 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2017-09-24 22:52:31 -0700 |
commit | 0810a1c64f504d9b272196337a7a2e39872b56d8 (patch) | |
tree | 0b8310deaad1b1a2fba43d3c671a2d30cf5e1fa9 /fs/ocfs2/dlmglue.c | |
parent | d886b82d2cc23b69aa1cc29a54cc77cf79f430e5 (diff) | |
parent | b52c9082f2eb3a6f7fbbc86fad3eaa2a1725da66 (diff) |
Merge remote-tracking branch 'lts/linux-4.4.y' into v4.4/topic/optee
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 b002acf50203..60a5f1548cd9 100644 --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c @@ -3321,6 +3321,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; |