From 7168ea89702ebf92eae714c9146c1f86ac7b3e06 Mon Sep 17 00:00:00 2001 From: Oleg Drokin Date: Thu, 29 Aug 2013 17:10:06 +0800 Subject: [PATCH] LU-3027 clio: Do not shrink sublock at cancel Shrinking sublock at ldlm lock cancel time means whoever happened to attach to this lock just before will reenqueue the wrong lock. Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes clientdistro=el6 serverdistro=el6 clientarch=x86_64 serverarch=x86_64 mdtcount=1 testlist=parallel-scale,parallel-scale-nfsv3,parallel-scale-nfsv4 Signed-off-by: Oleg Drokin Signed-off-by: Jian Yu Signed-off-by: Jinshan Xiong Change-Id: I599da98ce364ccf459b5b5f3b72550115972c456 Reviewed-on: http://review.whamcloud.com/7569 Reviewed-by: Patrick Farrell Tested-by: Hudson Reviewed-by: Bobi Jam Tested-by: Maloo --- lustre/lov/lovsub_lock.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lustre/lov/lovsub_lock.c b/lustre/lov/lovsub_lock.c index 6963e59..51b3b22 100644 --- a/lustre/lov/lovsub_lock.c +++ b/lustre/lov/lovsub_lock.c @@ -220,7 +220,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.8.3.1