Whamcloud - gitweb
LU-1299 clio: a combo patch to fix cl_lock
authorJinshan Xiong <jinshan.xiong@whamcloud.com>
Tue, 22 May 2012 21:02:33 +0000 (14:02 -0700)
committerOleg Drokin <green@whamcloud.com>
Mon, 4 Jun 2012 16:27:03 +0000 (12:27 -0400)
commit1364ab2c166d69bc857a729f3eff2c965db847c9
tree91b34905d9de590234baf40769a744c82baf88de
parentca1cae1eaec9f37d55d54ecc2fa93ece3d146ff6
LU-1299 clio: a combo patch to fix cl_lock

In this patch, the following issues are fixed:
* redefine cl_lock_error(). There are two kinds of error when
  enqueuing a cl_lock: internal errors return from server side and
  local error for example interrupted by signal when waiting for a
  lock. Obviously the latter one is not fatal so we shouldn't err the
  lock out;
* for fault handling, only signal SIGKILL and SIGTERM is not allowed;
* handle return code of ll_fault correctly;
* redefine ->unuse() to release resource it held if enqueuing lock
  failed;
* in cl_lock_hold_release(), only CLS_CACHED mode lock will be cached,
  for locks in other states, they will be cancelled voluntarily;
* fix the problem that cfs_block_sigs() is wrongly used as
  cfs_restore_sigs() and implementation of cfs_block_sigs() was wrong
* other minor fixes.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: Ice6d237d367c54bfd84a4a33cea8a4c1081e7696
Reviewed-on: http://review.whamcloud.com/2654
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
15 files changed:
libcfs/include/libcfs/libcfs.h
libcfs/libcfs/darwin/darwin-prim.c
libcfs/libcfs/linux/linux-prim.c
libcfs/libcfs/user-prim.c
lustre/include/cl_object.h
lustre/include/lustre_lib.h
lustre/include/obd_support.h
lustre/llite/llite_mmap.c
lustre/lov/lov_lock.c
lustre/lov/lovsub_lock.c
lustre/obdclass/cl_lock.c
lustre/obdclass/obd_mount.c
lustre/osc/osc_lock.c
lustre/ptlrpc/client.c
lustre/tests/sanity.sh