[PATCH 21/26] staging/lustre/clio: Do not shrink sublock at cancel

From: Peng Tao
Date: Thu Nov 14 2013 - 11:45:18 EST


From: Oleg Drokin <oleg.drokin@xxxxxxxxx>

Shrinking sublock at ldlm lock cancel time means whoever happened
to attach to this lock just before will reenqueue the wrong lock.

Lustre-change: http://review.whamcloud.com/7569
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3027
Signed-off-by: Oleg Drokin <oleg.drokin@xxxxxxxxx>
Signed-off-by: Jian Yu <jian.yu@xxxxxxxxx>
Signed-off-by: Jinshan Xiong <jinshan.xiong@xxxxxxxxx>
Reviewed-by: Patrick Farrell <paf@xxxxxxxx>
Reviewed-by: Bobi Jam <bobijam@xxxxxxxxx>
Signed-off-by: Peng Tao <bergwolf@xxxxxxxxx>
Signed-off-by: Andreas Dilger <andreas.dilger@xxxxxxxxx>
---
drivers/staging/lustre/lustre/lov/lovsub_lock.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/lov/lovsub_lock.c b/drivers/staging/lustre/lustre/lov/lovsub_lock.c
index 80305aa..b38c30d 100644
--- a/drivers/staging/lustre/lustre/lov/lovsub_lock.c
+++ b/drivers/staging/lustre/lustre/lov/lovsub_lock.c
@@ -208,7 +208,10 @@ int lov_sublock_modify(const struct lu_env *env, struct lov_lock *lov,
pd->cld_mode = parent_descr->cld_mode;
pd->cld_gid = parent_descr->cld_gid;
lovsub_lock_descr_map(d, subobj->lso_super, subobj->lso_index, pd);
- lov->lls_sub[idx].sub_got = *d;
+
+ /* LU-3027: only update extent of lock */
+ lov->lls_sub[idx].sub_got.cld_start = d->cld_start;
+ lov->lls_sub[idx].sub_got.cld_end = d->cld_end;
/*
* Notify top-lock about modification, if lock description changes
* materially.
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/