Whamcloud - gitweb
LU-3027 clio: Do not shrink sublock at cancel 69/7569/4
authorOleg Drokin <oleg.drokin@intel.com>
Thu, 29 Aug 2013 09:10:06 +0000 (17:10 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 24 Sep 2013 18:25:18 +0000 (18:25 +0000)
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 <oleg.drokin@intel.com>
Signed-off-by: Jian Yu <jian.yu@intel.com>
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I599da98ce364ccf459b5b5f3b72550115972c456
Reviewed-on: http://review.whamcloud.com/7569
Reviewed-by: Patrick Farrell <paf@cray.com>
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/lov/lovsub_lock.c

index 6963e59..51b3b22 100644 (file)
@@ -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);
         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.
         /*
          * Notify top-lock about modification, if lock description changes
          * materially.